1

I'm trying to find a way to pass a custom parameter through paypal's express checkout using NVP. I've tried using the deprecated PAYMENTREQUEST_n_CUSTOM, the supposedly not deprecated PAYMENTREQUEST_0_CUSTOM and the CUSTOM parameters but none of them worked.

The only ways I can see right now (which I'd rather not use) are: 1. use one of the other parameters that I'm not using (like shipping) 2. use the return url and add to it the parameter as a GET parameter 3. use sessions.

According to the error page my version is 92.0. And the rest of the parameters are:

$nvpstr="&SHIPPINGAMT=0&L_SHIPPINGOPTIONNAME0=test&L_SHIPPINGOPTIONAMOUNT0=0&REQCONFIRMSHIPPING=0&NOSHIPPING=1&L_SHIPPINGOPTIONISDEFAULT0=true&ADDRESSOVERRIDE=1$shiptoAddress&".
               "&ALLOWNOTE=0&CUSTOM=".$CUSTOM.
               "&L_NAME0=".$L_NAME0."&L_AMT0=".$L_AMT0."&L_QTY0=".$L_QTY0.
               "&MAXAMT=".(string)$maxamt."&AMT=".(string)$amt."&ITEMAMT=".(string)$itemamt.
               "&CALLBACKTIMEOUT=4&CALLBACK=https://www.ppcallback.com/callback.pl&ReturnUrl=".$returnURL."&CANCELURL=".$cancelURL .
               "&CURRENCYCODE=".$currencyCodeType."&PAYMENTREQUEST_0_PAYMENTACTION=".$paymentType;
Steve McLeod
  • 51,737
  • 47
  • 128
  • 184
ginge
  • 1,962
  • 16
  • 23

1 Answers1

0
  1. Don't mix PAYMENTREQUEST_0_* variables and their deprecated counterparts -- use one or the other. (E.g., don't use PAYMENTREQUEST_0_PAYMENTACTION and AMT in the same API call -- either use PAYMENTREQUEST_0_PAYMENTACTION and PAYMENTREQUEST_0_AMT, or use PAYMENTACTION and AMT.)
  2. This appears to be the SetExpressCheckout call. You can pass a CUSTOM value in here, but if you do, the only place it will show up is in the response to your GetExpressCheckoutDetails call. You need to supply the CUSTOM value in your DoExpressCheckoutPayment call in order for it to be recorded to your account.
Matt Cole
  • 2,552
  • 1
  • 13
  • 21