问题描述
有没有办法在处理条带支付之前找到国家代码(使用 vuejs/elements)?我想让国家在付款前推动特定事件,例如计算费用等。
解决方法
您可以使用 Stripe Elements create a PaymentMethod,勾选 country,然后使用保存的 PaymentMethod 继续付款:
stripe
.confirmCardPayment('{PAYMENT_INTENT_CLIENT_SECRET}',{
payment_method: "pm_abc123",// id of the saved payment method
})
.then(function(result) {
// Handle result.error or result.paymentIntent
});