首页 文章

PayPal IPN $ _POST ['txn_id']未设置

提问于
浏览
6

我正在使用PayPal沙箱进行订阅按钮,然后当我收到订阅或订阅取消的IPN响应时,永远不会设置$ _POST ['txn_id'] .

所以我不知道如何识别只接受唯一的交易

谢谢!

编辑:例如我在POST中为subscr_cancel提供的所有信息是:amount1,amount3,address_status,subscr_date,payer_id,address_street,mc_amount1,mc_amount3,charset,address_zip,first_name,reattempt,address_country_code,address_name,otify_version subscr_id custom payer_status business address_country address_city verify_sign payer_email btn_id last_name address_state receiver_email recurring txn_type item_name mc_currency residence_country test_ipn period1 period3 correlation_id

2 回答

  • 0

    根据Table 2. Summary of subscription variables

    对于订阅变量,交易ID(txn_id)仅适用于美元付款和多货币付款交易类型(txn_type) .

    正如预期的那样,PayPal不会将 txn_id 发送到您的IPN作为交易类型 subscr_cancel ,并且 only send txn_id if the transaction type is subscr_payment .

    有关根据您的交易将哪些变量发送到您的IPN URL的进一步说明,请查看IPN and PDT Variables .

  • 6

    您是否检查过 $_REQUEST['txn_id'] ,因为这可能会通过 GET 发送到您的服务器 .

相关问题