简体   繁体   English

如何测试定期结算(Paypal Payments Pro)

[英]How to test Recurring Billing (Paypal Payments Pro)

I have implemented PayPal payments pro in my web application for recurring billing. 我已经在Web应用程序中实现了PayPal Payments Pro的定期计费功能。 When a user creates a subscription, I change an initial amount for the current year, and set the profile start date to one year from today's date. 当用户创建订阅时,我会更改当年的初始金额,并将配置文件的开始日期设置为从今天起的一年。 I have it set to cancel the profile if the initial payment fails, and also have the maxfailedpayments set to 1. Immediately after creating the profile, I check the status to see if it is Active (initial payment successful). 如果初始付款失败,我将其设置为取消配置文件,并且将maxfailedpayments设置为1。创建配置文件后,我立即检查状态以查看其是否为有效(初始付款成功)。 If so, I process the initial payment transaction. 如果是这样,我将处理初始付款交易。 Otherwise, if it is pending, I alert the user that the payment is pending and rely on the IPN listener. 否则,如果它正在等待处理,我会提醒用户付款正在等待处理,并依靠IPN侦听器。 This works well if every payment is successful, but this will not be the case in the real world. 如果每次付款都成功,则效果很好,但实际情况并非如此。 I am wondering what other cases must be tested, and how can I test them. 我想知道还必须测试其他哪些案例,以及如何测试它们。 Right now, my IPN listener only handles cases where 'txn_type' is recurring_payment_profile_created and the profile_status is active. 现在,我的IPN侦听器仅处理'txn_type'为recurring_payment_profile_created并且profile_status处于活动状态的情况。 I don't know what the IPN notification will look like if the initial transaction failed, if a subsequent recurring transaction failed, etc. I've looked through PayPal's documentation extensively but it has not given much information. 我不知道如果初始交易失败,随后的重复交易失败等等,IPN通知会是什么样子。我已经仔细阅读了PayPal的文档,但没有提供太多信息。

Thanks, 谢谢,

Paul 保罗

Unfortunately, PayPal's IPN documentation has been rather lacking for years. 不幸的是,多年来贝宝(PayPal)的IPN文档相当缺乏。

Here's a question I answered awhile back with lots of recurring payments IPN samples from IPN's I've gotten from using it: Send Paypal Recurring Payments commands with IPN Simulator 这是我不久前用很多重复付款回答的一个问题,我从使用IPN的过程中得到了很多IPN样本: 使用IPN Simulator发送Paypal重复付款命令

I'll see if I can find one specific to the initial payment failing and add it. 我将查看是否可以找到特定于初始付款失败的付款并将其添加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM