PayPal Payments Sandbox Environment produces 500 error on redirect

Started by Cpointcc, April 21, 2017, 20:52:04 PM

Previous topic - Next topic

Cpointcc

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/



GJC Web Design

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
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Cpointcc

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.

mcintyro

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

Cpointcc

No they did not.  I'm sure we will find out, though I did not produce the error until I went to sandbox mode.