如何配置paypal定期付款IPN url
Posted
技术标签:
【中文标题】如何配置paypal定期付款IPN url【英文标题】:How to configure paypal recurring payment IPN url 【发布时间】:2013-06-30 08:43:42 【问题描述】:我正在使用 Paypal express checkout 进行定期付款,并已使用 php 成功地将其与我的网站集成。不过我有几个问题
-
创建循环配置文件时如何设置 IPN 侦听器 url?
当 paypal 服务器访问我的 IPN 侦听器时,哪些数据会发回给我?
如何模拟或测试定期付款 IPN?
我将不胜感激。
【问题讨论】:
【参考方案1】:1) 您可以在 PayPal 帐户资料中设置您的 IPN URL。不幸的是,API 请求中的 NotifyURL 不适用于定期付款。
2) 这是创建新配置文件时获得的 IPN 示例。
payment_cycle = Monthly
txn_type = recurring_payment_profile_created
last_name = Testerson
next_payment_date = 03:00:00 Jul 01, 2013 PDT
residence_country = US
initial_payment_amount = 0.00
rp_invoice_id = 5053
currency_code = USD
time_created = 11:39:03 Jul 01, 2013 PDT
verify_sign = AxuyKPFTDVhGvGlmhi1Hmnox3YnSAxMg2orZ0pTTDYZq.xNVLeRhMlVb
period_type = Regular
payer_status = unverified
tax = 0.00
payer_email = tester@testerson.com
first_name = Tester
receiver_email = payments@domain.com
payer_id = R2UKKKKXGXE
product_type = 1
shipping = 0.00
amount_per_cycle = 1.95
profile_status = Active
charset = windows-1252
notify_version = 3.7
amount = 1.95
outstanding_balance = 0.00
recurring_payment_id = I-JM567DDW38E
product_name = USBSwiper Monthly Subscription
ipn_track_id = 5263496da8a39
这是您从该个人资料完成付款后获得的 IPN 样本。
mc_gross = 1.95
period_type = Regular
outstanding_balance = 0.00
next_payment_date = 03:00:00 Aug 01, 2013 PDT
protection_eligibility = Ineligible
payment_cycle = Monthly
tax = 0.00
payer_id = RLKKKKKFFFGMAJ
payment_date = 03:18:43 Jul 01, 2013 PDT
payment_status = Completed
product_name = USBSwiper Monthly Subscription
charset = windows-1252
rp_invoice_id = 3420
recurring_payment_id = I-W0HKYYYIIIKN
first_name = Tester
mc_fee = 0.39
notify_version = 3.7
amount_per_cycle = 1.95
payer_status = unverified
currency_code = USD
business = payments@domain.com
verify_sign = AX9DPPxdksE8vxjYRM3zoykf7dT4APAKCGYTvrJ1cP7slIeYHUE9eqDh
payer_email = tester@testerson.com
initial_payment_amount = 29.95
profile_status = Active
amount = 1.95
txn_id = 33S38844SG269083S
payment_type = instant
last_name = Testerson
receiver_email = payments@domain.com
payment_fee = 0.39
receiver_id = M5VRAQYEFCSK6
txn_type = recurring_payment
mc_currency = USD
residence_country = US
receipt_id = 4101-1432-9533-3734
transaction_subject =
payment_gross = 1.95
shipping = 0.00
product_type = 1
time_created = 08:50:12 Mar 01, 2012 PST
ipn_track_id = b9df4ac317b53
要测试定期付款 IPN,您需要在沙盒中真实运行它们,或者您可以创建一个基本的 html 表单,其中包含一堆与您期望在实际 IPN 中获得的内容相匹配的隐藏字段。将此表单的操作设置为您的 IPN URL,然后您可以在浏览器中提交它以在屏幕上查看结果。这将帮助您清除脚本的任何问题,并允许您运行测试而无需等待 PayPal 系统发送通知。
请记住,如果您以这种方式进行测试,则数据实际上并非来自 PayPal,因此将无法验证。您需要确保在测试期间在您的代码中进行相应的处理。
【讨论】:
【参考方案2】:IPN URL 可以从您的 PayPal 帐户/个人资料中设置。
这里是分步指南:--http://net.tutsplus.com/tutorials/php/how-to-setup-recurring-payments/
【讨论】:
链接不工作以上是关于如何配置paypal定期付款IPN url的主要内容,如果未能解决你的问题,请参考以下文章