我的问题是我已经成功实现了 Stripe 的即时付款方式支付网关,但由于某些要求,现在我想将即时支付更改为两步支付方法。
我指的是 Does Stripe support auth and capture? .他们是这样说的
Note that a charge must be captured within seven days or it will be cancelled.
但我希望Auto Capture Charge 不会在 1 或 2 天内取消(如果可能的话)。
如果有任何想法,请帮助我。
我们将不胜感激。
最佳答案
https://stripe.com/docs/api#create_charge
捕获
可选,默认为真
Whether or not to immediately capture the charge. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire in 7 days. For more information, see authorizing charges and settling later.
因此,首先,您将像现在一样创建电荷,但将 capture
设置为 false。
然后,当您真正想向客户收费时,您可以调用 charge capture方法,传入上一步创建的费用ID。
不幸的是,没有办法自动执行此操作,因此您将需要编写一些代码 - 也许作为 cron 作业或计划任务来触发 x 数量的捕获费用部分几天
关于payment-gateway - Stripe 身份验证和捕获,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30529544/