Is there a way find the country code (using vuejs/elements) before handling stripe payment? I'd like to have the country drive specific events such as calculating the fees etc before payment.
You can create a PaymentMethod using Stripe Elements, check the country and then proceed with the payment using the saved 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
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.