【问题标题】:Access custom variable without using IPN在不使用 IPN 的情况下访问自定义变量
【发布时间】:2015-02-07 21:04:52
【问题描述】:

是否可以在不使用 IPN 的情况下获取 custom 变量的值?

我有一个非常简单的项目,不需要自动付款验证或类似的东西,一切都是手动完成的。我只需要喜欢付款页面中的一项输入以及该付款即可。

那么是否可以从贝宝的付款确认电子邮件或贝宝付款收据中的custom 变量中获取信息?

签出按钮示例:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="paypal-form" target="_top">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="paypal@email.com">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Item Name">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="src" value="1">
<input type="hidden" name="a3" value="10.00">
<input type="hidden" name="p3" value="1">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="custom" id="payment-custom" value="CUSTOM VALUE">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHostedGuest">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

所以我想在不使用 ipn 脚本的情况下获得“自定义值”,这可能吗?

【问题讨论】:

    标签: html paypal


    【解决方案1】:

    【讨论】:

    • 安德鲁是正确的; CUSTOM 字段被假定为机器可读/有用,但不一定可显示/对人类有用(人们经常将 ID 甚至复合键放在 CUSTOM 字段中)。因此它不会出现在电子邮件中,但可以通过 getTransactionDetails API(以及 IPN 或 PDT)检索。它还会在交易流程结束时在帖子中返回到您的站点,因此您的 Web 服务器可以在那里捕获它并对其进行处理(包括通过电子邮件将其发送给您,或将其放入您管理的某个履行队列中),如果这有帮助。这不需要 API 集成。
    • 如果您想在用户返回时处理您网站中的 CUSTOM 字段,请参阅paypalobjects.com/webstatic/en_US/developer/docs/pdf/… 中有关“传递变量”的部分。当然,如果您这样做,请确保您将 PayPal 按钮设置为返回用户,并注意如果他们的互联网中断(或他们关闭浏览器或其他东西),他们可能会付款然后不返回。很少见,但它可能会发生。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-05
    • 1970-01-01
    • 2022-01-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多