VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Cpointcc on April 21, 2017, 20:52:04 PM

Title: PayPal Payments Sandbox Environment produces 500 error on redirect
Post by: Cpointcc on April 21, 2017, 20:52:04 PM
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/


Title: Re: PayPal Payments Sandbox Environment produces 500 error on redirect
Post by: GJC Web Design on April 21, 2017, 23:08:59 PM
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
Title: Re: PayPal Payments Sandbox Environment produces 500 error on redirect
Post by: Cpointcc on April 24, 2017, 16:31:58 PM
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.
Title: Re: PayPal Payments Sandbox Environment produces 500 error on redirect
Post by: mcintyro on May 02, 2017, 10:23:45 AM
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
Title: Re: PayPal Payments Sandbox Environment produces 500 error on redirect
Post by: Cpointcc on May 02, 2017, 14:51:40 PM
No they did not.  I'm sure we will find out, though I did not produce the error until I went to sandbox mode.