如何在Paypal express checkout PHP中设置1/3/5年的计费周期


How to set 1/3/5 years billing period in Paypal express checkout PHP

我正在使用paypal作为支付网关,并希望创建像

这样的循环配置文件
  • 1年计划$20
  • $40的3年计划
  • 50美元的5年计划

但是当我添加BILLINGPERIOD=year&BILLINGFREQUENCY=3作为参数时,从paypal API获取错误:

并得到Error:

Billing frequency must be > 0 and be less than or equal to one year
Error Message: Invalid billing frequencyError Code: 11516
Error Severity Code: Error 

这在paypal api中是不可能的,你需要创建自己的机制。

From paypal api:

BillingPeriod和BillingFrequency的组合不能超过一年。

如果billingperiodMonth,则billingfrequency可以设置为1,4,9和12,但不能设置为13。

如果billingperiodYear,则只能设置billingfrequency为1。

来源:https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/