From 61b46959a7a37462a87d6257de50b703affedec0 Mon Sep 17 00:00:00 2001 From: Maria Mattlin Date: Tue, 5 Jul 2022 10:06:26 -0700 Subject: [PATCH] PROD-2374 #comment Removed reference to payment response.data #time 1h --- src/services/payment.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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({}) ); }