tuga Posted November 1, 2022 Share Posted November 1, 2022 Hi, I removed a payment gateway a while ago, but new client's invoices are still being generated using this payment gateway, which causes errors when clients try to pay. Any idea how to solve this? Tks 0 Quote Link to comment Share on other sites More sharing options...
xyzulu Posted November 1, 2022 Share Posted November 1, 2022 Reactivate the payment module. Then, deactivate it.. this time choose the new payment gateway customers using the one you are deactivating should be using. 0 Quote Link to comment Share on other sites More sharing options...
tuga Posted November 1, 2022 Author Share Posted November 1, 2022 (edited) I followed your advice and activated/deactivated the payment module and the invoices now show the correct payment method. The strange part is that I did this before and somehow the removed payment method was being reused on the daily cronjob invoice generation. I'll report back here after the next cronjob. tks. Edited November 1, 2022 by tuga 1 Quote Link to comment Share on other sites More sharing options...
tuga Posted November 2, 2022 Author Share Posted November 2, 2022 Unfortunately, the daily cronjob still generated invoices using the old payment method. Any idea of what can be causing the behavior? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS JimmyW Posted November 2, 2022 WHMCS Technical Analyst Share Posted November 2, 2022 In past occurrences, this error has been caused by a custom gateway leaving a hook behind for this particular payment method. I would recommend removing any related hooks you have within your /includes/hooks/ directory and any remnants of the payment gateway form your /modules/gateways/ directory and try to access the invoice again with the error. If this doesn't help to resolve the issue, you may wish to open a support ticket and we can have a closer look. 0 Quote Link to comment Share on other sites More sharing options...
tuga Posted November 2, 2022 Author Share Posted November 2, 2022 (edited) Hi Jimmy, I've checked the hooks dir and didn't find any hook from to the old payment gateway. I also removed all files related to the payment gateway from /modules/gateways/. I'd like to reinforce that it's only after the daily cronjob runs that the problem happens, before that, all is normal. Edited November 2, 2022 by tuga 0 Quote Link to comment Share on other sites More sharing options...
tuga Posted November 2, 2022 Author Share Posted November 2, 2022 I may have found the problem. Some clients add the old payment gateway set as "defaultgateway" on table "tblclients" and for some reason this wasn't changed when a payment gateway was removed. This may have been fixed on newer version of whmcs, but I'm still using an old one due to the many customization the system have. I'll report back after the next cronjob to (hopefully) confirm the problem is solved. 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted November 2, 2022 Share Posted November 2, 2022 4 hours ago, tuga said: I may have found the problem. Some clients add the old payment gateway set as "defaultgateway" on table "tblclients" and for some reason this wasn't changed when a payment gateway was removed. This may have been fixed on newer version of whmcs, but I'm still using an old one due to the many customization the system have. I'll report back after the next cronjob to (hopefully) confirm the problem is solved. Let us know please, does seem like odd behavior or something that was missed in development. 0 Quote Link to comment Share on other sites More sharing options...
tuga Posted November 3, 2022 Author Share Posted November 3, 2022 15 hours ago, tuga said: I may have found the problem. Some clients add the old payment gateway set as "defaultgateway" on table "tblclients" and for some reason this wasn't changed when a payment gateway was removed. This may have been fixed on newer version of whmcs, but I'm still using an old one due to the many customization the system have. I'll report back after the next cronjob to (hopefully) confirm the problem is solved. This didn't solve the problem and the invoices were still generated on the daily cronjob with the old payment gateway, but the problem was finally fixed. We had a cronjob setting new invoices default's payment gateway to the defunct payment gateway and found it doing s text search on all files inside the public_html (grep -irwn 'gatewayname' '/home/domain/public_html') I'm sorry for not noticing this before. Thank you very much to all of you. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.