【问题标题】:IPN of recurring payments in Paypal have any different parameters than the normal invoice payment?Paypal 中定期付款的 IPN 与普通发票付款有什么不同的参数吗?
【发布时间】:2016-06-30 04:11:50
【问题描述】:

我正在开发一个 IPN 侦听器,它必须能够捕获定期付款、发票付款和订阅付款。我已经查看了很多关于这个主题的文档。 我希望有人能告诉我,当 txn_type 变量将其值更改为时,paypal 发送给我的听众的 POST 之间的主要区别:

  • txn_type=invoice_payment
  • txn_type=recurring_payment
  • txn_type=subscr_payment

我已经与 txn_type=invoice_payment 进行了交易,这是 IPN 重新发送:

invoice_number=0003
invoice_id=XXXX-XXXX-XXXX-XXXX-XXXX
mc_gross_1=58.00
mc_handling1=0.00
num_cart_items=1
payer_id=DJ77XLF8321SCCQ
address_country_code=
ipn_track_id=901559bfkk956f2d
address_zip=6546
invoice=xxxx-xxxx-xxxx-xxxx-xxxx
charset=windows-1252
payment_gross=
address_status=unconfirmed
address_street=
verify_sign=AFcWxVudFQq8ZSboMdT0X3W4ahu5PTNt
tax1=0.00
txn_type=invoice_payment
receiver_id=5VPNPEENCQ
payment_fee=
item_number1=
mc_currency=
transaction_subject=
custom=
protection_eligibility=Eligible
quantity1=1
address_country=
payer_status=verified
first_name=
item_name1=Pago+0003
address_name=
mc_gross=58.00
mc_shipping1=0.00
payment_date=10%3a24%3a19+Mar+08%2c+2016+PST
payment_status=Completed
business=
last_name=
address_state=
txn_id=9GE9035442720
mc_fee=7.30
resend=true
payment_type=instant
notify_version=3.8
payer_email=
receiver_email=
address_city=
residence_country=

我主要想知道变量 invoice_id= 是否出现在定期付款和订阅付款中。 谢谢!

【问题讨论】:

    标签: c# paypal paypal-ipn


    【解决方案1】:

    对于定期付款,如果您在 CreateRecurringPaymentsProfile 请求的 PROFILEREFERENCE 参数中传递了发票 ID,它将在 IPN 中返回为 rp_invoice_id。

    对于订阅,如果包含在请求中,它将作为“发票”返回。

    要进行 API 调用,您可以将 HTTP 请求作为 NVP 字符串发送,也可以使用 SOAP。

    【讨论】:

    • 感谢 Andrew,但这对我没有用,我正在使用 paypal api 处理 C#,没有 createRecurringPaymentsProfile 方法。我正在这样工作:github.com/paypal/PayPal-NET-SDK/blob/develop/Samples/Source/…。问候!
    • 我没有查看您引用的 SDK,但可以从任何语言使用 CreateRecurringPaymentsProfile API。只需自己进行 HTTP 调用。您不需要 SDK。我已经用 API 参考链接更新了答案。
    • 非常感谢@Andrew Angell,但是当我创建一个新的“计划”(developer.paypal.com/docs/rest/api/payments.billing-plans/…)和“协议”(@987654325 @) 使用 paypal SDK,paypal API 向我返回计划中的令牌和协议中的协议 ID,这将对我的目的有用。
    猜你喜欢
    • 2014-01-23
    • 2012-11-07
    • 1970-01-01
    • 2013-01-19
    • 2014-08-19
    • 2016-10-27
    • 2011-12-02
    • 2013-06-09
    • 2017-03-07
    相关资源
    最近更新 更多