XF 2.2 Stripe Payment Error

Razed-

New member
Edit: I solved the problem. The issue was the 'User Upgrade' price was set too low ($0.01) for testing purposes. Increasing that to $1 fixed it.

Hello,

Getting an error when trying to pay for a user upgrade via Stripe. Any idea what could be the cause? I'm running v2.2.10 Patch 1.
Payment Provider log is empty.

When trying to pay from a regular user account:


[E_WARNING] Attempt to read property "status" on null - src/XF/Payment/Stripe.php:393
Code:
#0 src/XF/Payment/Stripe.php(393): XF::handlePhpError(2, '[E_WARNING] Att...', '/var/www/html/g...', 393)
#1 src/XF/Pub/Controller/Purchase.php(60): XF\Payment\Stripe->processPayment(Object(XF\Pub\Controller\Purchase), Object(XF\Entity\PurchaseRequest), Object(XF\Entity\PaymentProfile), Object(XF\Purchasable\Purchase))
#2 src/XF/Mvc/Dispatcher.php(352): XF\Pub\Controller\Purchase->actionProcess(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XFurchase', 'Process', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#4 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#5 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#6 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#7 src/XF.php(524): XF\App->run()
#8 index.php(20): XF::runApp('XF\\Pub\\App')
#9 {main}

Line 393 on Stripe.php is:

Code:
$paymentStatus = $latestInvoice->payment_intent->status;

My Stripe webhook is reading the following endpoints:

account.updated
charge.dispute.funds_withdrawn
charge.dispute.funds_reinstated
charge.refunded
charge.succeeded
invoice.payment_succeeded
review.closed

Thanks for your help
 
Last edited:
Top Bottom