diff --git a/src/Payments/ApplePay.res b/src/Payments/ApplePay.res index 6ddc06d7e..183240ddd 100644 --- a/src/Payments/ApplePay.res +++ b/src/Payments/ApplePay.res @@ -294,16 +294,17 @@ let make = ( ) }, (isInvokeSDKFlow, requiredFieldsBody)) - React.useEffect3(() => { + React.useEffect4(() => { if ( (isInvokeSDKFlow || paymentExperience == PaymentMethodsRecord.RedirectToURL) && - isApplePayReady + isApplePayReady && + isWallet ) { setShowApplePay(_ => true) setIsShowOrPayUsing(._ => true) } None - }, (isApplePayReady, isInvokeSDKFlow, paymentExperience)) + }, (isApplePayReady, isInvokeSDKFlow, paymentExperience, isWallet)) let submitCallback = React.useCallback((ev: Window.event) => { if !isWallet { diff --git a/src/Payments/GPay.res b/src/Payments/GPay.res index e7b7086a7..a5fb58acf 100644 --- a/src/Payments/GPay.res +++ b/src/Payments/GPay.res @@ -187,6 +187,7 @@ let make = ( paymentExperience == PaymentMethodsRecord.RedirectToURL) && isWallet ) { + setIsShowOrPayUsing(._ => true) addGooglePayButton() } None @@ -221,8 +222,6 @@ let make = ( paymentExperience == PaymentMethodsRecord.RedirectToURL || isDelayedSessionToken) && isWallet - setIsShowOrPayUsing(.prev => prev || isRenderGooglePayButton) - let submitCallback = React.useCallback((ev: Window.event) => { if !isWallet { let json = ev.data->Js.Json.parseExn