donglv9813 2014-02-18 17:22
浏览 62
已采纳

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

I have implemented PayPal payments pro in my web application for recurring billing. 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). 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. 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. 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.

Thanks,

Paul

  • 写回答

1条回答 默认 最新

  • dou11655853 2014-02-19 03:02
    关注

    Unfortunately, PayPal's IPN documentation has been rather lacking for years.

    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

    I'll see if I can find one specific to the initial payment failing and add it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类