News:

Support the VirtueMart project and become a member

Main Menu

PayPal Checkout - Sandbox - Error 500

Started by eliotrayner, December 17, 2024, 11:30:04 AM

Previous topic - Next topic

eliotrayner

Hi Milbo

PHP 7.4.24 / J3.10.12 / VM4.4.0 / paypal_checkout_plgvm_4.4.1

I see an issue with new PayPal checkout in sandbox mode.

Quote500
An error has occurred while processing your request.

0  Object of class stdClass could not be converted to string

PayPal sandbox is returning:

'COMPLETED' for $res->status,
'PENDING' for $res->purchase_units[0]->payments->captures[0]->status
'PENDING_REVIEW' for 'PENDING' for $res->purchase_units[0]->payments->captures[0]->status_details->reason
and $res->purchase_units[0]->custom_id is not empty (it contains the vm order_number) so vmError is called in file plugins\vmpayment\paypal_checkout\helpers\ppc_order.php on line 868

vmError('captureOrder Ordernumber not found ', $res);
However the order_number in $res->purchase_units[0]->custom_id does exist in VM.

$res is an object so this crashes the website with error 500 on return.

Hope you can help. I've included screenshot of where error occurs.


thanks
Eliot


eliotrayner

#1
FYI If you set Payment Review to OFF in Paypal under Sandbox account info -> Settings, then you wont see this error.

This is an issue if you want to review your payments on paypal first.

Settings screenshot attached.