Hoping someone can help, since we've tried absolutely everything to reproduce and fix this issue, but we're unable to. I'd really love for someone UK based to weigh in here because we're at our wits end.
Our client has recently started reporting that some of their customers are unable to complete their order when paying by SagePay.
We checked out the error log and we discovered this error:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to a member function getData() on null in /var/www/vhosts/site.com/httpdocs/app/code/Magenest/SagePay/Controller/Direct/PostBack.php:65
{closure}
(Object(Magento\\Framework\\App\\Request\\Http))\n#4 /var...\n', referer: https://secure7.arcot.com/acspage/cap?RID=1111&VAA=A
The line in question:
$payment = $order->getPayment();
Looking into the access log, it looks like all these customers reach this 3D secure page and then get a 500 error. Refreshing the page returns them to checkout. The only thing all these customers have in common is the fact that they're using Chrome (on both desktop and android). Literally there's nothing else tying them together.
The order does get created, but stays at pending (instead of complete). In their SagePay terminal, the transaction is registered, but cancelled because it's awaiting completion and thus expires after 15 minutes.
We've turned off 3D secure checking from the SagePay admin and that seems to have solved the issue, but that's not ideal because the client has to pay to process unsecure transactions.
I would also like to stress this isn't all 3D secure transactions - we've tried this with 3d secure both using Monzo and Barclaycard and they were successful.
So here are the specifics:
- Magento 2.3.2 store
- MageNest SagePay extension
- PHP 7.2
So it's a mighty weird one for sure. I appreciate it's a very specific issue, but if anyone has any experience with getData() issues on the checkout (specifically if it's for 3d secure) then I would be most grateful.
But like I say, we cannot reproduce this no matter what. That's the most frustrating part.
We've contacted the plugin vendors, who are unable to help to a degree because we can't grant them SSH access.
Thanks