带注册卡条的 CVC 认证

CVC authentication with registered card stripe

我目前正在使用 stripe 并要求客户注册卡(通过 stripe)。

第一次结帐后,客户注册了他的卡。这位顾客可以再次使用这张卡进行另一次结账,我想请教 CVC / Card Security Code 以防止低安全性密码。

这个 "CVC authentication" 有调用条带 api 吗?

谢谢

很遗憾,目前无法使用 Stripe 执行此操作。没有 API 你可以调用它来使用保存的卡,你可以在哪里传递 CVC,以便它被发送到银行并再次检查。

您要么需要再次询问完整的卡片详细信息,要么只依赖于保存的卡片本身。当您创建客户和卡时,您可以检查 cvc_check 是否设置为 pass 以确保 CVC 已发送并由银行验证,这样您就不必再次请求它以后。

现在这是可能的。来自 Stripe docs:

When creating subsequent payments on a saved card, you may want to recollect the CVC of the card as an additional fraud measure to verify the user.

Start by creating a PaymentIntent on your server with the amount, currency, and your Customer ID. List the PaymentMethods associated with your Customer to determine which PaymentMethods to show for CVC recollection.

After passing the PaymentIntent’s client secret to the browser, you’re ready to recollect CVC information with Stripe Elements on your client. Use the cardCvc Element to recollect a CVC value from your user, and then confirm the payment from your client using stripe.confirmCardPayment. Set payment_method to your PaymentMethod ID, and payment_method_options[card][cvc] to your cardCvc Element.

stripe.confirmCardPayment(clientSecret, {
  payment_method: '{{PAYMENT_METHOD_ID}}',
  payment_method_options: {
    card: {
      cvc: cardCvcElement
    }
  },
}).then(function(result) {
  if (result.error) {
    // Show error to your customer
    console.log(result.error.message);
  } else {
    if (result.paymentIntent.status === 'succeeded') {
      // Show a success message to your customer
      // There's a risk of the customer closing the window before callback
      // execution. Set up a webhook or plugin to listen for the
      // payment_intent.succeeded event that handles any business critical
      // post-payment actions.
    }
  }
});