PDA

View Full Version : WHMCS how to bulk change default payment gateway for users



Fli
07-19-2015, 04:51 PM
When one disable one payment gateway in WHMCS and want to use different payment gateway with different name, one may want all current users and packages do not have outdated gateway set.

Here is mysql query i run to change it. Before executing, make sure you have WHMCS database backup.


UPDATE tblhosting SET paymentmethod='coinpayments' WHERE paymentmethod='bitpay';
UPDATE tblhostingaddons SET paymentmethod='coinpayments' WHERE paymentmethod='bitpay';
UPDATE tbldomains SET paymentmethod='coinpayments' WHERE paymentmethod='bitpay';
UPDATE tblinvoices SET paymentmethod='coinpayments' WHERE paymentmethod='bitpay' AND status='Unpaid';
UPDATE tblclients SET defaultgateway='coinpayments' WHERE defaultgateway='bitpay';

In this case i wanted to replace bitpay payment gateway by coinpayments