简体   繁体   English

为已保存的卡条充电

[英]Charging a saved card in stripe

I want to charge a saved card in stripe.我想以条纹形式为保存的卡充电。 But while charging the save card I also want user to enter the CVV, just as an additional check (kind of like what happens in amazon).但是在为保存卡充电时,我还希望用户输入 CVV,作为额外的检查(有点像亚马逊上发生的事情)。

So far I've tried payment intent and payment method.到目前为止,我已经尝试了付款意图和付款方式。 So while creating the payment intent I'll pass the payment method id, which is in format of card_***.因此,在创建付款意图时,我将传递格式为 card_*** 的付款方式 ID。 And I can see that the payment_intent.succeeded event on stripe dashboard and even in webhook.我可以在条带仪表板上甚至在 webhook 中看到 payment_intent.succeeded 事件。 But in this flow I'm unable to ask the user for CVV information.但在此流程中,我无法向用户询问 CVV 信息。

Is there anyway to achieve this through Stripe.有没有办法通过 Stripe 实现这一点。

Here's some useful links that I found.这是我找到的一些有用的链接。

payment method付款方法

This is the link that I followed to achieve, it's just that I also want to ask for CVV before actual charging.这是我遵循的链接来实现的,只是我还想在实际充电之前询问CVV。 stripe doc for charging saved card用于为保存的卡充电的条纹文档

It is possible to recollect the CVC from your customer.可以从您的客户那里收回 CVC。 As you mentioned, you'll reuse the existing Payment Method, but additionally you'll include a cardCvc element on the page where your customer can provide the CVC for their card.正如您所提到的,您将重用现有的付款方式,但另外您将在页面上包含一个cardCvc元素,您的客户可以在其中为其卡提供 CVC。 Then when you're making the call to confirm the payment, you'll pass that element into the payment_method_options.card.cvc parameter.然后,当您拨打电话以确认付款时,您将该元素传递到payment_method_options.card.cvc参数中。

This is covered in more detail here: https://stripe.com/docs/payments/save-during-payment-cards-only#web-recollect-cvc这里有更详细的介绍: https : //stripe.com/docs/payments/save-during-payment-cards-only#web-recollect-cvc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM