我有一个rails应用程序,现在我试图与Paypal集成订阅。
我使用paypal checkout api成功地完成了一个非复现产品的结账。我的身体是为了这个命令
body = {
intent: 'CAPTURE',
application_context: {
return_url: "#{Rails.application.secrets.app_host}#{return_path}",
cancel_url: "#{Rails.application.secrets.app_host}#{cancel_path}"
},
purchase_units: [
{
amount: {
currency_code: 'USD',
value: '220.00'
}
}
]
}我将所需的计划保存在db中:
#<Plan id: 6, name: "Daimond", fee: 45, created_at: "2019-08-19 08:40:13", updated_at: "2019-10-11 03:42:26", recuring: true, period: "Month", cycles: 12>这种循环订单的主体是什么?
发布于 2020-05-04 20:21:58
一旦您有了计划,订阅就需要由支付者批准。获得批准的最佳方法在下面的步骤4中讨论:https://developer.paypal.com/docs/subscriptions/integrate/#4-create-a-subscription
https://stackoverflow.com/questions/61589092
复制相似问题