diff --git a/src/Utilities/ApplePayHelpers.res b/src/Utilities/ApplePayHelpers.res index e3a0dc0b7..3de8335a3 100644 --- a/src/Utilities/ApplePayHelpers.res +++ b/src/Utilities/ApplePayHelpers.res @@ -36,12 +36,13 @@ let getApplePayFromResponse = ( ~stateJson, ~connectors, ~isPaymentSession=false, + ~isSavedMethodsFlow=false, ) => { let billingContact = billingContactDict->ApplePayTypes.billingContactItemToObjMapper let shippingContact = shippingContactDict->ApplePayTypes.shippingContactItemToObjMapper - let requiredFieldsBody = if isPaymentSession { + let requiredFieldsBody = if isPaymentSession || isSavedMethodsFlow { DynamicFieldsUtils.getApplePayRequiredFields( ~billingContact, ~shippingContact, @@ -179,6 +180,7 @@ let useHandleApplePayResponse = ( ~requiredFields=paymentMethodTypes.required_fields, ~stateJson, ~connectors, + ~isSavedMethodsFlow, ) processPayment( diff --git a/src/Utilities/GooglePayHelpers.res b/src/Utilities/GooglePayHelpers.res index b2519d690..aaf32f480 100644 --- a/src/Utilities/GooglePayHelpers.res +++ b/src/Utilities/GooglePayHelpers.res @@ -8,6 +8,7 @@ let getGooglePayBodyFromResponse = ( ~requiredFields=[], ~stateJson, ~isPaymentSession=false, + ~isSavedMethodsFlow=false, ) => { let obj = gPayResponse->getDictFromJson->GooglePayType.itemToObjMapper let gPayBody = PaymentUtils.appendedCustomerAcceptance( @@ -35,7 +36,7 @@ let getGooglePayBodyFromResponse = ( ->getDictFromJson ->getString("email", "") - let requiredFieldsBody = if isPaymentSession { + let requiredFieldsBody = if isPaymentSession || isSavedMethodsFlow { DynamicFieldsUtils.getGooglePayRequiredFields( ~billingContact, ~shippingContact, @@ -112,6 +113,7 @@ let useHandleGooglePayResponse = (~connectors, ~intent, ~isSavedMethodsFlow=fals ~connectors, ~requiredFields=paymentMethodTypes.required_fields, ~stateJson, + ~isSavedMethodsFlow, ) processPayment( ~body,