简体   繁体   English

Stripe Checkout.js 令牌回调会在付款处理之前阻止吗?

[英]Does Stripe Checkout.js token callback block until payment processed?

I'm using Checkout.js to allow a delinquent customer to update their card details.我正在使用 Checkout.js 来允许拖欠客户更新他们的卡详细信息。

When they do this, I know that the outstanding invoice payment is retried.当他们这样做时,我知道未付款的发票付款被重试。

Does this happen as part of the checkout process?这是否作为结帐过程的一部分发生? ie does the token callback block until the payment has been retried and either succeeded or failed?即令牌回调会阻塞,直到付款被重试并且成功或失败?

Or does this happen asynchronously?或者这是异步发生的?

It is not blocking.它不是阻塞。 But it is using Promises.但它正在使用承诺。 I mean, when the promise returned ( then ), You can check the returned code.我的意思是,当承诺返回( then )时,您可以检查返回的代码。 If it's a success, it's mean you the credit card is valid, and you can use the token.如果成功,则表示您的信用卡有效,并且可以使用令牌。

If you got token, you send the token to your server, and try to capture the money.如果您获得令牌,则将令牌发送到您的服务器,并尝试获取资金。 This you can so also using non-blocking promises.这也可以使用非阻塞承诺。

Checkout only collects a customer's payment information and tokenizes it. Checkout仅收集客户的付款信息并将其标记化。 Once the token is created, you then send it to your backend server so that you can use it in an API request.创建令牌后,您将其发送到后端服务器,以便您可以在 API 请求中使用它。

In your case, you want to update the customer's card, so you'd pass the token ID as the source parameter in a customer update request .在您的情况下,您想要更新客户的卡,因此您将令牌 ID 作为客户更新请求中source参数传递。

Checkout's token callback is called when the token is created.创建令牌时会调用 Checkout 的token回调。 In most cases, its only job is to send the token ID to the backend, usually by submitting a form or via an AJAX request.在大多数情况下,它唯一的工作是将令牌 ID 发送到后端,通常是通过提交表单或通过 AJAX 请求。

暂无
暂无

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

相关问题 Stripe checkout.js - 将自定义参数传递给令牌回调 - Stripe checkout.js - passing custom params to token callback 条纹支付集成-将.js [checkout.js]移出循环的方法是什么? - Stripe payment integration - What is the way to move .js [checkout.js] outside of loop? 万事达支付网关 checkout.js 方法未触发完整回调 function - MasterCard payment gateway checkout.js method not triggering complete Callback function 如何设计类似于paypal或stripe的自己的checkout.js - How to design own checkout.js similar to paypal or stripe Stripe Checkout https://checkout.stripe.com/checkout.js 和 Elements https://js.stripe.com/v3/ 之间的区别 - Difference between Stripe Checkout https://checkout.stripe.com/checkout.js and Elements https://js.stripe.com/v3/ 如何从条纹 checkout.js 迁移到条纹元素? - how can I migrate from stripe checkout.js to stripe elements? 托管结帐交互页面 (Checkout.js) 的万事达卡支付网关服务 (MPGS) 问题 - Master Card Payment Gateway Services (MPGS) Issue With Hosted Checkout Interaction Page (Checkout.js) 数据完成事件在万事达卡支付网关 Checkout.js 集成中不起作用 - data-complete event not working in Mastercard Payment Gateway Checkout.js integration 从 checkout.js 迁移到 JavaScript SDK,但在执行付款之前授权? - Migrating from checkout.js to JavaScript SDK, but authorising before executing the payment? 可以在没有支付信息的情况下使用 Stripe JS 创建令牌 - Possible to create Token with Stripe JS with no payment information
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM