【问题标题】:Paypal IPN - hidden "return" field receives information tooPaypal IPN - 隐藏的“退货”字段也接收信息
【发布时间】:2012-10-03 15:14:34
【问题描述】:

我正在处理一些 Paypal IPN 项目,但我发现了一些让我开始担心的事情。

在我的表单中设置了以下字段:

<input type="hidden" name="return" value="http://mysite.com/succes.php" />
<input type="hidden" name="notify_url" value="http://mysite.com/ipn_handler.php" />

无论如何,当用户付款时,他将返回到success.php页面并且不会与ipn_handler.php有任何关系,但是我的success.php url(在地址栏中)返回后看起来像这样贝宝:

http://mysite.com/success.php?transaction_subject=57&txn_type=web_accept&payment_date=07%3A53%3A24+Oct+03%2C+2012+PDT&last_name=SOMETHING&residence_country=US&pending_reason=multi_currency&item_name=SOMETHING&payment_gross=&mc_currency=EUR&business=seller%40paypalsandbox.com&payment_type=instant&protection_eligibility=Ineligible&payer_status=verified&verify_sign=Adm5TcLO5.Dgm0ttCdwtx43iz69qAOB8yELzqmpoKwztT.v5nX7naEIQ&txn_id=77L26596YM827223E&payer_email=dugagj_1346872586_per%40gmail.com&tax=0.00&test_ipn=1&first_name=SOMETHING&receiver_email=seller%40paypalsandbox.com&quantity=0&payer_id=4D9U3R4S4D7CC&receiver_id=Y2CCK4NAA75Q2&item_number=&payment_status=Pending&mc_gross=25.00&custom=57&charset=windows-1252&notify_version=3.7&merchant_return_link=Return+to+Sandbox&auth=AqXhaNS8jZidb-pkJqUa3t2qAy-SPrpCt12155Ku703imQ3302J0cHyBD36AdiSVrY6hMc3JN6gwQo9gmRlxQjA

我不喜欢我的地址栏显示所有这些信息。这很危险吗?设置 HTML 时我做错了吗?

请帮忙。

P.S:上面的网址是通过 Paypal Sandbox 创建的,因此您不必担心,因为它不包含任何来自真实付款的内容。

【问题讨论】:

  • 您是否启用了支付数据传输 (PDT)?
  • 我不知道,我还没有尝试过使用实时支付的脚本,我只使用沙盒和默认沙盒帐户 seller@paypalsandbox.com 来尝试。

标签: html paypal paypal-ipn


【解决方案1】:

在将表单提交到 paypal 时检查您的 rm 变量。

您可能已将 rm 变量设置为 0、1 或根本没有设置(默认为 0)。如果你提交这个值为 2 的变量,那么所有信息都将通过 POST 到达你的 success.php 页面。

所以在您的表单中设置以下内容:

<input type="hidden" name="rm" value="2" />

请参阅rm 变量here 的文档

您可以阅读更多here

【讨论】:

  • 还要确保您已关闭“自动退货”和“付款数据传输”。
猜你喜欢
  • 2017-10-17
  • 2015-10-05
  • 2015-02-17
  • 2012-12-08
  • 2014-04-29
  • 2020-03-19
  • 2011-08-15
  • 2011-01-17
  • 2015-07-11
相关资源
最近更新 更多