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 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 组策略中的计算机配置策略无法下发
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作
  • ¥15 用友U8:向一个无法连接的网络尝试了一个套接字操作,如何解决?
  • ¥30 我的代码按理说完成了模型的搭建、训练、验证测试等工作(标签-网络|关键词-变化检测)
  • ¥50 mac mini外接显示器 画质字体模糊