我正在尝试使用 PayPal API 创建无限计费计划,但我不确定如何创建它。
如果我尝试将total_cycles 设置为0,API 会将此视为无效输入而拒绝,并响应total_cycles 必须介于1-999 之间。
使用total_cycles: 999作为值返回该值作为无效输入,响应total_cycles必须在1-999之间!
使用total_cycles:接受998!哎呀!
API 中至少存在“偏离 1”错误。
那么:如何创建无限订阅?我不希望订阅在出现 998 次后结束。
最佳答案
根据自己的documentation , 0
是正确的值。
The number of times this billing cycle runs. Trial billing can only have maximum value of 1 for total_cycles. In case of infinite regular billing cycle, total_cycles can be set to 0. For finite regular billing cycle, total_cycles can be set between 1 and 999. Default: 1.
Minimum value: 0.
Maximum value: 999.
听起来像是一个错误。如果问题仍然存在,您应该报告问题:https://github.com/paypal/paypal-checkout-components/issues
更新
我刚刚在沙箱环境中使用 0
进行了尝试,它似乎有效。
关于PayPal 无限计费计划 - 如何创建?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56847952/