Reputation: 13
I have a working (in the Sandbox) ExpressCheckout payment flow. I am attempting to add a parameter to the ReturnURL argument in the SetExpressCheckout call. As soon as I add a parameter the call fails with an error of invalid ReturnURL.
I've tried different parameter names, and always get the same error. If I remove all parameters it works fine.
Code that works: RETURNURL = 'http://mywebaddress.com'
Code that causes error: RETURNURL = 'http://mywebaddress.com?transid=123'
To add a little more detail, here is the error returned by paypal:
"TIMESTAMP":"2014-05-29T23:58:20Z", "CORRELATIONID":"3313de9c9e0cc", "ACK":"Failure", "VERSION":"111.0", "BUILD":"11196751", "L_ERRORCODE0":"10471", "L_SHORTMESSAGE0":"Transaction refused because of an invalid argument. See additional error messages for details.", "L_LONGMESSAGE0":"ReturnURL is invalid.", "L_SEVERITYCODE0":"Error"
Upvotes: 1
Views: 1161
Reputation: 1945
check your url encoding in the failing url. I think it might work like this: 'http://mywebaddress.com%2ftransid=123' (deleted ? and added correct url encoding for forward slash '%2f')
Upvotes: 1