英文:
stripe is there a function to use confirmCardPayment in serverside
问题
在服务器端存在与confirmCardPayment
等效的函数吗?
我需要在服务器端使用这个函数:
const confirmPayment = await stripe?.confirmCardPayment(data, {
payment_method: paymentMethodReq?.paymentMethod.id
});
英文:
exists are function that is equavilent to confirmCardPayment but in serverside ?
I need this function in serverside:
const confirmPayment = await stripe?.confirmCardPayment(data, {
payment_method: paymentMethodReq?.paymentMethod.id
});
答案1
得分: 1
Stripe在服务器上提供了与stripe.confirmCardPayment
等效的Payment Intent Confirmation API。您可以在确认PI时在payment_method
参数中设置支付方法ID(pm_xxx)。例如,
const paymentIntent = await stripe.paymentIntents.confirm(
'pi_xxx',
{payment_method: 'pm_xxx'}
);
英文:
Stripe provides Payment Intent Confirmation API at the server, which is equivalent to stripe.confirmCardPayment
.
You may set the payment method ID (pm_xxx) in payment_method
parameter when confirming the PI. For example,
const paymentIntent = await stripe.paymentIntents.confirm(
'pi_xxx',
{payment_method: 'pm_xxx'}
);
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论