diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index 8dfef2d89..96b9d0eef 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -147,7 +147,7 @@ let make = ( ~isCvcValidValue, ) - let submitCallback = React.useCallback((ev: Window.event) => { + let submitCallback = React.useCallback2((ev: Window.event) => { let json = ev.data->Js.Json.parseExn let confirm = json->getDictFromJson->ConfirmType.itemToObjMapper let (month, year) = CardUtils.getExpiryDates(cardExpiry) @@ -224,7 +224,7 @@ let make = ( } } } - }) + }, (areRequiredFieldsValid, requiredFieldsBody)) submitPaymentData(submitCallback) let paymentMethod = isBancontact ? "bank_redirect" : "card"