1stripe.confirmWechatPayPayment(
2 '{PAYMENT_INTENT_CLIENT_SECRET}',
3 {
4 payment_method: {
5 billing_details: {
6 name: '{NAME}',
7 email: '{EMAIL}'
8 },
9 wechat_pay: {},
10 },
11 }
12).then(function({error, paymentIntent}) {
13 if (error) {
14 // Inform the customer that there was an error.
15 } else if (paymentIntent.status === 'succeeded') {
16 // Inform the customer that the payment was successful
17 } else if (paymentIntent.status === 'requires_action') {
18 // Inform the customer that the payment did not go through
19 }
20});