From 217f8a6def36602d2f9a8daeb1ead5609a6c305b Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Thu, 14 Mar 2024 14:31:51 +0530 Subject: [PATCH 1/2] docs: pull-req template added (#231) --- .github/{workflows => }/PULL_REQUEST_TEMPLATE.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => }/PULL_REQUEST_TEMPLATE.md (100%) diff --git a/.github/workflows/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/workflows/PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md From c31db694caca29aa78b59f284f9aba4e98aff93c Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Thu, 14 Mar 2024 14:37:12 +0530 Subject: [PATCH 2/2] fix: not require_cvc disable the pay now button (#230) --- src/Components/PayNowButton.res | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Components/PayNowButton.res b/src/Components/PayNowButton.res index 85d1ce3dc..f9619cc5e 100644 --- a/src/Components/PayNowButton.res +++ b/src/Components/PayNowButton.res @@ -79,18 +79,26 @@ let make = ( let buttonText = sdkHandleConfirmPayment.buttonText->Option.getOr(localeString.payNowButton) - React.useEffect4(() => { + React.useEffect5(() => { if showFields { if selectedOption === Card { setIsDisabled(_ => !validFormat) } else { setIsDisabled(_ => !areRequiredFieldsValidValue) } + } else if !customerMethod.requiresCvv { + setIsDisabled(_ => customerMethod.requiresCvv) } else { setIsDisabled(_ => !isSavedMethodCheck) } None - }, (validFormat, areRequiredFieldsValidValue, selectedOption, isSavedMethodCheck)) + }, ( + validFormat, + areRequiredFieldsValidValue, + selectedOption, + isSavedMethodCheck, + customerMethod.requiresCvv, + ))