[英]PayPal Subscription Integration | Confusion with Capturing Funds
I am currently working on a PayPal Subscription Integration for a client.我目前正在为客户开发 PayPal 订阅集成。 But I had some issues with PayPal, do I need to capture the funds when the subscription is activated, and do I need to capture the funds every time the next billing cycle is hit?
但是我在使用 PayPal 时遇到了一些问题,是否需要在订阅激活时提取资金,是否需要在每次到达下一个计费周期时提取资金? Or do I only need to do 1 of them?
还是我只需要做其中之一?
Like, how does this work?就像,这是如何工作的?
And how do I cancel a subscription when an error occurs when the user is trying to activate his subscription?当用户尝试激活其订阅时发生错误时,如何取消订阅? Should I just cancel it using an API request from my server, or is there a function in the PayPal JS SDK (in the frontend) to cancel it?
Should I just cancel it using an API request from my server, or is there a function in the PayPal JS SDK (in the frontend) to cancel it? Since there is a method to
actions.restart()
restart the payment flow, but that is not what I want and doesn't work actually since that gives me an error again for some reason.由于有一种方法可以让
actions.restart()
重新启动支付流程,但这不是我想要的并且实际上不起作用,因为由于某种原因这再次给了我一个错误。
It's very confusing, the documentation also isn't helping me on that and PayPal's Community forums are kinda dead.这非常令人困惑,文档也没有帮助我,而且 PayPal 的社区论坛已经死了。
Thank you.谢谢你。
When a PayPal Subscription is approved by the payer, it will become active and bill (capture) automatically.当付款人批准PayPal 订阅时,它将变为活动状态并自动计费(捕获)。 This will be immediate if no start_date is specified.
如果未指定 start_date,这将立即生效。
There is no server-side activation and hence no need for an actions.restart() equivalent.没有服务器端激活,因此不需要 actions.restart() 等效项。
(An exception to this is if you override the application_context's user_action; this changes the verbiage to indicate you are going to show a review page, and do the activation with an API call) (例外情况是,如果您覆盖 application_context 的 user_action;这会更改措辞以指示您将显示评论页面,并使用 API 调用进行激活)
Cancellations are done using API calls, not the JS SDK.取消是使用 API 调用完成的,而不是 JS SDK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.