python - Paypal Payflow Pro return url does not work correctly - 'processTransaction.do' appended - raises 404 -
currently trying migrate working php paypal payflow implementation new python-based system.
i use secure token hosted checkout pages. secure token works fine , redirected checkout page (although has horrible formatting errors).
the problem: after payment should redirect return url. works 'processtransaction.do' appended it. return url defined as:
'https://mywebsite.com/paypal/succes/'
redirected to
'https://mywebsite.com/paypal/succes/processtransaction.do'
, raises 404.
my secure token request parameters:
params = {} params["partner"] = "paypal" params["vendor"] = "...." params["trxtype"] = "s" params["amt"] = payment_amount #amount pay params["createsecuretoken"] = "y" params["securetokenid"] = time.time() #needs unique params["user"] = "...." params["pwd"] = "...."
then send request , catch return looks this:
result=0&securetoken=qqqc0rqz8tkksnmqu3mg2og7o securetokenid=1431563231.24&respmsg=approved
afterwards send request checkout page following paramters:
params["securetoken"] = securetoken params["securetokenid"] = securetokenid
to: https://payflowpro.paypal.com
i use code send requests:
data = urllib.urlencode(params) request = urllib2.request(url, data) response = urllib2.urlopen(request) response_text = response.read()
the return url set in paypal manager return type post , "show confirmation page" set "on website".
does know wrong , how fix it?
thanks!
Comments
Post a Comment