Guides & Tutorials7.8 Update TroubleshootingTroubleshooting Invoices not marked paid via Remote Card Payment (eg. Stripe)

Troubleshooting Invoices not marked paid via Remote Card Payment (eg. Stripe)

Symptom

After applying the 7.8.0 update, clients who have previously paid with a remote token payment gateway (eg. Stripe) may find that invoices are not automatically marked as paid, despite some cards being charged.

The following error will be output from the daily automation tasks cron job:

Call to a member function isCreditCard() on null in /path/to/whmcs/includes/ccfunctions.php:0

Cause

In some circumstances remote token values are not migrated to a Pay Method prior to attempting payment

Workaround

Migration of payment tokens occurs when a member of staff views  the client's Summary tab or the client logs in. Performing this action  for all clients will migrate the data into Pay Methods.

Solution

A hotfix has been created which will resolve this error by including  additional logic to handle this scenario. It can be downloaded from:

https://whmcs.community/files/file/109-core-13678-remote-gateway-credit-card-captures-fail-when-cards-have-not-been-migrated/

Once the hotfix is applied, existing remote card tokens can be charged successfully.