作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在我的 API 中使用了 strip 连接,我想更新和处理现有的支付意图。使用NodeJS stripe包创建paymentIntent成功
const paymentIntent = await stripe.paymentIntents.create(
{
payment_method_types: ["card"],
amount: 1499, // in cents
currency: "usd"
},
{
stripe_account: "acct_xxx"
}
)
Error: No such payment_intent: pi_yyy
最佳答案
就我而言,我在 中看到了错误:没有这样的支付意图:pi_yyy浏览器 在没有将 stripeAccount 传递给 Stripe 的情况下确认 PaymentIntent 时。确保您传递的是 stripeAccount
:
//pass stripeAccount to Stripe when using Stripe Connect in the browser
let stripe = Stripe(stripePublishableKey, {
stripeAccount: stripeAccountId,
})
let result = await stripe.confirmCardPayment(clientSecret,{
...
})
https://stripe.com/docs/connect/enable-payment-acceptance-guide
关于node.js - Stripe Connect PaymentIntent 错误 : No such payment_intent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57624880/
我是一名优秀的程序员,十分优秀!