I've got a request that looks like this:
data = {
'USER': params['PARTNER'],
'PWD': params['PWD'],
'RETURNURL': 'https://my-site.com/',
'CURRENCY': 'USD',
}
request = requests.post(url=URL, data=data, verify=False)
When I run this command in an identical cURL command in the shell, there's no problem at all. But when I do it through requests, it seems like something gets messed up with the RETURNURL parameter. It's preserved perfectly in cURL, but when processed from requests, it ends up looking like this when I see it on the other side of the request and things just don't work:
https%3A%2F%2Fmy-site.com%2F
Thanks in advance, been at this forever!
The actual command being used successfully in cURL is this:
curl https://pilot-payflowpro.paypal.com \
-s \
--insecure \
-d PARTNER=PayPal \
-d PWD=MyPassword \
-d VENDOR=MyMerchantID \
-d USER=MyMerchantID \
-d TENDER=C \
-d ACCT=5105105105105100 \
-d TRXTYPE=S \
-d EXPDATE=1221 \
-d RETURNURL=https://my-site.com/
-d AMT=1.00
Note that everything is working perfectly, but the parameter I submit which is a URL is the one that simply won't work and the formatting is all messsed up.