Jump to content

Stripe Gateway Error - WHMCS 8.7 w/PHP 8.1


Recommended Posts

After upgrading to WHMCS 8.7 with PHP 8.1. The Daily Cron isnt working.

Ran: php -q cron.php -vvv do --ProcessCreditCardPayments

Getting the following error:

 Credit Card Charges

 1/1 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%  1 min/1 min  62.5

MiBDivisionByZeroError: Division by zero in /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Billing/Currency.php:2097152

#0 /home/user/public_html/whmcs/modules/gateways/stripe/lib/ApiPayload.php(0): WHMCS\Billing\Currency->convertTo(0.0, Object(WHMCS\Billing\Currency))
#1 /home/user/public_html/whmcs/modules/gateways/stripe.php(0): WHMCS\Module\Gateway\Stripe\ApiPayload::transactionFee(Object(Stripe\BalanceTransaction), Object(WHMCS\Billing\Currency))
#2 [internal function]: stripe_capture(Array)
#3 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/AbstractModule.php(0): call_user_func('stripe_capture', Array)
#4 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Module/Gateway.php(0): WHMCS\Module\AbstractModule->call('capture', Array)
#5 /home/user/public_html/whmcs/includes/ccfunctions.php(0): WHMCS\Module\Gateway->call('capture', Array)
#6 /home/user/public_html/whmcs/includes/ccfunctions.php(0): captureCCPayment(309163)
#7 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Cron/Task/ProcessCreditCardPayments.php(0): ccProcessing(Object(WHMCS\Cron\Task\ProcessCreditCardPayments))
#8 [internal function]: WHMCS\Cron\Task\ProcessCreditCardPayments->__invoke()
#9 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): call_user_func_array(Object(WHMCS\Cron\Task\ProcessCreditCardPayments), Array)
#10 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\AbstractTask->execute()
#11 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Scheduling\Task\AbstractTask->run()
#12 /home/user/public_html/whmcs/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection))
#13 /home/user/public_html/whmcs/vendor/symfony/console/Command/Command.php(298): WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /home/user/public_html/whmcs/vendor/symfony/console/Application.php(1028): Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /home/user/public_html/whmcs/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\DoCommand), Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /home/user/public_html/whmcs/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /home/user/public_html/whmcs/crons/cron.php(0): Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
 

Also, when going to https://domain.tld/whmcs/modules/gateways/callback/stripe.php getting a 500 error in the browser.

No error in the error logs.

Any ideas on how to fix it?

 

Link to comment
Share on other sites

  • 3 months later...

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