CVC认证注册卡条纹



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

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

这个"CVC认证"是否调用了stripe api ?

谢谢

不幸的是,目前没有办法在Stripe中做到这一点。没有API可以调用使用保存的卡,你可以在那里传递CVC,以便它被发送到银行并再次检查。

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

现在可以了。从Stripe文档:

在已保存的卡上创建后续支付时,您可能希望重新收集该卡的CVC,作为验证用户的附加欺诈措施。

首先在服务器上创建一个包含金额、货币和客户ID的PaymentIntent。列出与您的客户相关联的PaymentMethods,以确定为CVC回收显示哪些PaymentMethods。

在将PaymentIntent的客户端秘密传递给浏览器后,您就可以在您的客户端上使用Stripe Elements重新收集CVC信息了。使用cardCvc元素从用户那里重新收集CVC值,然后使用stripe.confirmCardPayment从客户端确认付款。将payment_method设置为你的PaymentMethod ID,将payment_method_options[card][cvc]设置为你的cardCvc元素。

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.
    }
  }
});

最新更新