Paypal integration throws error 500 after purchase
Posted: Fri Jul 05, 2024 6:02 am
I added the Paypal integration and connected it to my Paypal account. I can see in the extension that it is configured with a valid Merchant ID, Client ID, Secret, Webhook ID, and Environment is set to "production". I also have Debug Logging set to "On".
When I look at a product and click "Buy it now" the Paypal window pops up and I can see that the details have passed to Paypal correctly.
When I complete the transaction at Paypal, the popup windows exits ok, and I see the "Confirm Order" screen. When I click the "Confirm" button opencart throws a 500 error. I get an invoice from Paypal that the transaction was completed correctly and my payment is processed.
According to my access_log, the last page accessed before the error is: paypal.completeOrder
The purchase does not show up in my purchase history on opencart.
I see the following in error.log:
PHP Warning: Trying to access array offset on value of type null in .../catalog/controller/mail/order.php on line 151
In the paypal.log file I can see the "Create Order", "Capture Order", and "Webhook". Also, when I refund the order from Paypal's dash I can see the webhook hit for that as well.
When I look at a product and click "Buy it now" the Paypal window pops up and I can see that the details have passed to Paypal correctly.
When I complete the transaction at Paypal, the popup windows exits ok, and I see the "Confirm Order" screen. When I click the "Confirm" button opencart throws a 500 error. I get an invoice from Paypal that the transaction was completed correctly and my payment is processed.
According to my access_log, the last page accessed before the error is: paypal.completeOrder
The purchase does not show up in my purchase history on opencart.
I see the following in error.log:
PHP Warning: Trying to access array offset on value of type null in .../catalog/controller/mail/order.php on line 151
In the paypal.log file I can see the "Create Order", "Capture Order", and "Webhook". Also, when I refund the order from Paypal's dash I can see the webhook hit for that as well.