I am trying to find where to make a change recommended by PayPal for a sandbox testing environment that is producing a 500 error on redirect.
they attached a
The PayPal tech support team told me to make the following changes:
The issue is actually with the variables that your shopping cart sent over to PayPal:
Here is the full list of the variables: (please see attachment).
cmd=_ext-enter
redirect_cmd=_xclick
Please remove the red highlighted line and replace it with just
"cmd=_xclick"
this should resolve this issue.
I am not sure where to make this change.
Can you help me?
In this documentation there is "cmd" variable with a value of "_ext-enter" and there is no variable "redirect_cmd".
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/
depends on what method of Paypal your using but in e.g. Standard all the vars are formed in plugins\vmpayment\paypal\paypal\helpers\paypalstd.php
Yes in the paypalstd.php file there is at line 220 these variables:
$post_variables['cmd'] = '_ext-enter';
$post_variables['redirect_cmd'] = $payment_type;
I changed the line below to the developers suggestion and removed the second line completely.
$post_variables['cmd'] = '_xclick';
This appears to have resolved this issue as i was able to get to PayPal Sandbox.
This solved my identical 500 Internal Server error sandbox issue - thank you.
Question - will this change work with the production PayPal instance when the site goes live or will these changes need to be reverted? Did PayPal comment on that.
Thanks
Ross
No they did not. I'm sure we will find out, though I did not produce the error until I went to sandbox mode.