diff --git a/src/services/payment.js b/src/services/payment.js index f70ca87c0..1b9aea4c3 100644 --- a/src/services/payment.js +++ b/src/services/payment.js @@ -48,11 +48,10 @@ export async function processPayment( const url = `${config.API.V5}/customer-payments`; let response = await xhrPostAsync(url, body); - const customerPayment = response.data; - if (customerPayment.status === "requires_action") { - await stripe.handleCardAction(customerPayment.clientSecret); + if (response.status === "requires_action") { + await stripe.handleCardAction(response.clientSecret); response = await xhrPatchAsync( - `${config.API.V5}/customer-payments/${customerPayment.id}/confirm`, + `${config.API.V5}/customer-payments/${response.id}/confirm`, JSON.stringify({}) ); }