贝宝透明重定向RETURNURL参数后 [英] Paypal Transparent Redirect RETURNURL post parameters

查看:333
本文介绍了贝宝透明重定向RETURNURL参数后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

结果
目前想实现与Paypal透明的重定向,但却无法得到回报的URL包含我设置的参数。看来,贝宝是从RETURNURL查询字符串剥离出来的参数,因此我的网站是不是重定向后正常行为。我的顺序如下:
搜索结果
1 - 做一个安全令牌要求贝宝传递RETURNURL和errorurl作为令牌请求的一部分。
结果
2 - 我​​的嵌入表单中来自PayPal获得的安全令牌值(职位直接向PayPal)。
结果
3 - 的贝宝重定向回RETURNURL但参数缺少....试图回重定向到的 https://www.somesite.com/site.w?location=results.w&parameter1=value1 但我不是重定向到的 HTTPS://www.somesite.comt/site.w位置= results.w (缺少参数1 =值)。
搜索结果
我曾尝试URL编码的RETURNURL所以&号和问号都设有codeD,但根据PayPal的文档中的值返回URL是不被EN codeD。


Currently trying to implement transparent redirect with Paypal but unable to get the return url to contain the parameters I am setting. Appears that paypal is stripping out the parameters from the returnurl querystring and as such my site is not behaving properly after the redirect. My sequence is as follows:

1- Make a secure token request to Paypal passing the returnurl and errorurl as part of the token request.
2- Embed the secure token value obtained from paypal within my form (which posts directly to paypal).
3- Paypal redirects back to the returnurl but the parameters are missing....attempting to redirect back to https://www.somesite.com/site.w?location=results.w&parameter1=value1 but am instead redirected to https://www.somesite.comt/site.w?location=results.w (missing the parameter1=value1).

I have tried url-encoding the returnurl so the ampersands and question mark are encoded but as per the paypal documentation values in the return url are not to be encoded.

有谁知道我怎么能得到RETURNURL期间包含正确的GET参数贝宝重定向?

Does anyone know how I can get the returnurl to contain the proper GET parameters during the paypal redirect?

再次感谢,
托尼

Thanks again, Tony

推荐答案

只是跟进....好了,所以编码符号(&安培; - > 26%),并增加长度与RETURNURL参数没工作,没传递值虽然浏览器没有正确间preT后重定向的URL。我再次尝试没有编码与符号,但保留了RETURNURL的长度完整和URL参数在重定向为preserved!所以,我最后的解决方案是包含含有长度功能,使贝宝能够正确解析RETURNURL值(维护查询字符串参数)的RETURNURL安全令牌的请求。举例如下:
结果
结果

Just to follow up....Ok so encoding the ampersand (& -> %26) and adding the length to the RETURNURL parameter did work and did pass the value although the browser did not properly interpret the url upon redirect. I tried again without encoding the ampersands but kept the length of the RETURNURL intact and the url parameters were preserved upon redirect! So my final solution would be a secure token request containing the RETURNURL which contains the length feature so that Paypal can properly parse the returnurl value (maintaining the querystring parameters). Example as follows:

的/ opt / pware /斌/卷曲-s -S -k --connect超时30 --max时间120 -HX-VPS-CLIENT-TIMEOUT:45-d \"PARTNER=PayPal&VENDOR=somevendor&USER=someuser&PWD=somepassword&TENDER=C&CREATESECURETOKEN=Y&SECURETOKENID=0000050&SILENTTRAN=TRUE&rm=2&TRXTYPE=A&AMT=40.00&RETURNURL[123]=https://somesite.com/cgi-bin/test/site.w?location=b2c/retail-checkout.w&frames=no&target=main&lang=en-US\" https://pilot-payflowpro.paypal.com
结果
结果

/opt/pware/bin/curl -s -S -k --connect-timeout 30 --max-time 120 -H "X-VPS-CLIENT-TIMEOUT:45" -d "PARTNER=PayPal&VENDOR=somevendor&USER=someuser&PWD=somepassword&TENDER=C&CREATESECURETOKEN=Y&SECURETOKENID=0000050&SILENTTRAN=TRUE&rm=2&TRXTYPE=A&AMT=40.00&RETURNURL[123]=https://somesite.com/cgi-bin/test/site.w?location=b2c/retail-checkout.w&frames=no&target=main&lang=en-US" https://pilot-payflowpro.paypal.com

有关谁都知道,一旦你获得安全令牌做什么简单地嵌入令牌的形式和RETURNURL应该包含适当的参数....继承人样品静态的HTML页面,你可以用来测试的职位您的安全令牌/安全令牌ID组合:
搜索结果

For anyone else wondering what to do once you obtain the secure token simply embed the token in your form and the returnurl should contain the proper parameters....heres a sample static html page which you can use for testing the post of your secure token/ secure token ID combo:

<html>
<head>
</head>
<body>
<form id="form" method="POST" action="https://pilot-payflowlink.paypal.com">
<input type="hidden" id="SILENTTRAN" name="SILENTTRAN" value="true"/>
<input type="hidden" id="CURRENCY" name="CURRENCY" value="USD"/>
<input name="VERBOSITY" type="hidden" value="HIGH">
<input type="hidden" name="rm" value="2">
<!--<input name="MODE" type="hidden" value="TEST">-->
<p>SECURETOKEN</p><input type="text" id="SECURETOKEN" name="SECURETOKEN" />
<p>SECURETOKENID</p><input type="text" id="SECURETOKENID" name="SECURETOKENID" />
<p>Address:</p><input type="text" id="BILLTOSTREET" name="BILLTOSTREET" value="123 Test"/>
<p>Zip:</p><input type="text" id="BILLTOZIP" name="BILLTOZIP" value="90210"/>
<p>AMOUNT:</p><input type="text" id="AMT" name="AMT" value="33.00"/>
<p>CSC:</p><input name="CVV2" type="text" value="123">
<p>TRXTYPE:</p><input type="text" id="TRXTYPE" name="TRXTYPE" value="S">
<p>Card Number:</p><input type="text" id="ACCT" name="ACCT" maxlength=16 value="4111111111111111">
<p>Expiry MONTH:</p><input type="text" id="EXPMONTH" name="EXPMONTH" maxlength=2 value="01">
<p>Expiry YEAR:</p><input type="text" id="EXPYEAR" name="EXPYEAR" maxlength=2 value="16">
<input type="submit" value="Submit"> 
</form>
</body>
</html>

这篇关于贝宝透明重定向RETURNURL参数后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆