Jump to content

TIP: To stop Stripe Credit & Debit Auto trying


NickJ

Recommended Posts

I recently swapped to using the latest stripe module and noticed CC data was now being auto tried, when i didn't want it to be

so if you ONLY want your cart client to manually make payment via stripe and stop the system trying their saved card info see below that resolved it for me

1) first

Create the file /includes/hooks/disableautocc.php and add this code replacing the admin username with your own:

<?php function hook_disable_auto_cc($vars) { $command = "updateclient"; $adminuser = "admin"; $values["clientid"] = $vars['userid']; $values["disableautocc"] = true; $results = localAPI($command,$values,$adminuser); } add_hook("ClientAdd",1,"hook_disable_auto_cc"); ?>

The above only stops it happening for any "NEW" client 

To stop it happening for any existing client

you either have to go through in admin all their profile pages and tick to disable it, or do this that i found much easier on SQL

goto your phpmyadmin and goto the database, click on SQL and use the command below

Update tblclients set disableautocc = '1';

The above will tick the Disable Automatic CC Processing on all clients profiles you have on your WHMCS, untick it for any that want it to auto try payment but if you don't want it to auto attempt to take payment this i found very good.

Hope it helps someone else

Cheers

 

Screenshot 2020-08-02 at 13.41.17.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated