From 7e6729559d7d95b4bcb4f28e6c24c5264ab46920 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Tue, 23 Jul 2024 13:52:48 +0200 Subject: [PATCH] add isVerifying param --- src/libs/API/parameters/VerifySetupIntentParams.ts | 1 + src/libs/actions/PaymentMethods.ts | 4 ++-- .../settings/Subscription/CardAuthenticationModal/index.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/API/parameters/VerifySetupIntentParams.ts b/src/libs/API/parameters/VerifySetupIntentParams.ts index 1e9234efaaee..60138f607ad4 100644 --- a/src/libs/API/parameters/VerifySetupIntentParams.ts +++ b/src/libs/API/parameters/VerifySetupIntentParams.ts @@ -1,4 +1,5 @@ type VerifySetupIntentParams = { accountID: number; + isVerifying: boolean; }; export default VerifySetupIntentParams; diff --git a/src/libs/actions/PaymentMethods.ts b/src/libs/actions/PaymentMethods.ts index 81559c5815f7..bac3739af810 100644 --- a/src/libs/actions/PaymentMethods.ts +++ b/src/libs/actions/PaymentMethods.ts @@ -305,8 +305,8 @@ function clearPaymentCard3dsVerification() { * Properly updates the nvp_privateStripeCustomerID onyx data for 3DS payment * */ -function verifySetupIntent(accountID: number) { - API.write(WRITE_COMMANDS.VERIFY_SETUP_INTENT, {accountID}); +function verifySetupIntent(accountID: number, isVerifying = true) { + API.write(WRITE_COMMANDS.VERIFY_SETUP_INTENT, {accountID, isVerifying}); } /** diff --git a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx index 9fedfc98a27b..bdf9c30052d5 100644 --- a/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx +++ b/src/pages/settings/Subscription/CardAuthenticationModal/index.tsx @@ -39,7 +39,7 @@ function CardAuthenticationModal({headerTitle}: CardAuthenticationModalProps) { return; } - PaymentMethods.verifySetupIntent(session?.accountID ?? -1); + PaymentMethods.verifySetupIntent(session?.accountID ?? -1, true); }, false, );