遵循本指南(https://stripe.com/docs/payments/checkout/subscriptions/updating)来通过 Stripe checkout 来收集付款明细,但在步骤4中全部失败,因为未定义stripe.setupIntents。
有人知道什么可能是错误的吗?
const stripe = require("stripe")("sk_test_key_here");
...
case "checkout.session.completed":
if (event.data.object.setup_intent) {
if (stripe.setupIntents) {
const setupIntent = stripe.setupIntents.retrieve(
event.data.object.setup_intent
);
UnhandledPromiseRejectionWarning:TypeError:无法读取未定义的属性“检索”