简体   繁体   English

在nodejs中在stripe中添加3D安全验证

[英]Add 3D secure verification in stripe in nodejs

I accept payment via Stripe.我接受通过 Stripe 付款。 I handled all the payment-related queries on the backend.我在后端处理了所有与支付相关的查询。 I just need a basic stripe token and authentication key(of my API) to access this API.我只需要一个基本的条带令牌和身份验证密钥(我的 API)来访问这个 API。

Code for accepting payment接受付款的代码

//if subscription added with user then accept the payment
stripe.customers.create({
    email: token.email,
    source: token.id
})
    .then(customer => {
        const idempotencyKey = uuid();
        stripe.charges.create(
            {
                amount: product.price * 100,
                currency: "usd",
                customer: customer.id,
                receipt_email: token.email,
                description: `Purchased the ${product.name}`,
                shipping: {
                    name: token.card.name,
                    address: {
                        line1: token.card.address_line1,
                        line2: token.card.address_line2,
                        city: token.card.address_city,
                        country: token.card.address_country,
                        postal_code: token.card.address_zip
                    }
                }
            },
            {
                idempotencyKey
            }
        );
    })

I searched on google about 3D secure but all solutions seem be of payment_intent hook.我在谷歌上搜索了有关 3D 安全的信息,但所有解决方案似乎都是 pay_intent 挂钩。 How can I add the 3D secure authenticity in stripe.charge method.如何在 stripe.charge 方法中添加 3D 安全真实性。

How can I add the 3D secure authenticity in stripe.charge method.如何在 stripe.charge 方法中添加 3D 安全真实性。

You can't.你不能。

It's a legacy API and it doesn't support 3D Secure.它是一个遗留 API,不支持 3D Secure。 You have to migrate to using SCA-ready integrations like PaymentIntents(as you mention) or Checkout.您必须迁移到使用 SCA 就绪的集成,如 PaymentIntents(如您所述)或 Checkout。

https://stripe.com/docs/payments https://stripe.com/docs/payments

https://stripe.com/docs/payments/older-apis#comparing-the-apis https://stripe.com/docs/payments/older-apis#comparing-the-apis

https://stripe.com/docs/strong-customer-authentication#preparing https://stripe.com/docs/strong-customer-authentication#preparing

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

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