PayPal PDT未在查询字符串中返回tx值

Dal*_*ark 11 paypal eclipse-pdt query-string

我已经完成了(不那么有帮助的)PayPal文档,但找不到这个问题的简单答案.当用户从PayPal返回时,URL不包含查询字符串,因此我没有收到'tx'值(或任何其他值).

这是我发送给PayPal的一个例子:

<form accept-charset="utf-8" action="https://www.sandbox.paypal.com/au/cgi-bin/webscr" id="paypal-form" method="post">
    <input type="hidden" name="business" value="dallas_bus@dallasjclark.com">
    <input type="hidden" name="cancel_return" value="http://localhost/checkout">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="charset" value="utf-8">
    <input type="hidden" name="currency_code" value="AUD">
    <input type="hidden" name="custom" value="155">
    <input type="hidden" name="lc" value="AU">
    <input type="hidden" name="notify_url" value="http://localhost/paypal-ipn">
    <input type="hidden" name="return" value="http://localhost/checkout">           
    <input type="hidden" name="item_name" value="ABC Company - Order #155">
    <input type="hidden" name="item_number" value="155">
    <input type="hidden" name="amount" value="8.95">
    <input type="hidden" name="discount_amount" value="0.00">
    <input type="hidden" name="shipping" value="25.00">
    <input type="image" src="https://www.paypal.com/en_AU/i/btn/btn_buynowCC_LG.gif" name="submit" alt="Buy Now">
</form>
Run Code Online (Sandbox Code Playgroud)

提前致谢 !

Dan*_*iel 16

您应该检查https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_profile-website-payments上的设置并确保

  1. 自动返回设置为ON
  2. 您已指定了返回URL
  3. 付款数据传输设置为ON

还有一个不太明显的事情我必须通过实验来学习:你的表单不能包含"返回"值,否则会覆盖你设置中的返回URL并阻止自动返回工作,你将在没有必要的情况下结束tx参数.这是Paypal的一个相对较新的开发(bug?),因为它曾经工作过.

  • 我在实时网站上工作但沙盒(dev)网站无法正常工作.该死的沙箱区域并不总是按预期工作或活区域工作:@. (2认同)

ipr*_*101 5

我已经为此苦苦挣扎了一段时间,看似没有任何tx价值的另一件事是,如果您有免费试用版。

因此,如果您的服务费用在前20天是免费的,则其后为4.99,那么您将无法获得tx首笔免费付款的价值。如果您在最初的“免费”期间内收取一分钱(或任何相关的货币),那么您将获得tx返回的值。


小智 5

我们实际上使用PayPal商户技术服务记录了一张票,以便深入了解这一点.我们发现,随着时间的推移,一些paypal商家帐户似乎忘记了他们的AutoReturn/PDT设置.

即使您可以进入网站首选项,AutoReturn和PDT都已启用; 该帐户的行为就像他们没有启用一样.

请按照此过程重置设置....

  • 点击个人资料.
  • 点击"我的销售偏好">
  • 点击"网站首选项"

(*)直接链接到此部分,如果您找不到它 - > https://www.paypal.com/cgi-bin/customerprofileweb?cmd=_profile-website-payments

  • 禁用自动退货和付款数据传输.
  • 保存更改.
  • 再次访问网站首选项.
  • 再次启用自动退货和付款数据转帐.
  • 保存更改.