diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fcd00ed..4ecd3868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [0.102.8](https://github.com/juspay/hyperswitch-web/compare/v0.102.7...v0.102.8) (2024-11-19) + +## [0.102.7](https://github.com/juspay/hyperswitch-web/compare/v0.102.6...v0.102.7) (2024-11-19) + +## [0.102.6](https://github.com/juspay/hyperswitch-web/compare/v0.102.5...v0.102.6) (2024-11-19) + ## [0.102.5](https://github.com/juspay/hyperswitch-web/compare/v0.102.4...v0.102.5) (2024-11-19) ## [0.102.4](https://github.com/juspay/hyperswitch-web/compare/v0.102.3...v0.102.4) (2024-11-14) diff --git a/package-lock.json b/package-lock.json index 0e27eb88..1608562b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.102.5", + "version": "0.102.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.102.5", + "version": "0.102.8", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 3d92ca51..17c25785 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.102.5", + "version": "0.102.8", "main": "index.js", "private": true, "dependencies": { diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index 2758da9e..7af2f4b2 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -154,6 +154,9 @@ let make = ( defaultCardBody } if confirm.doSubmit { + // * Sending card expiry to handle cases where the card expires before the use date. + messageParentWindow([("expiryDate", cardExpiry->JSON.Encode.string)]) + let isCardDetailsValid = isCVCValid->Option.getOr(false) && isCardValid->Option.getOr(false) && diff --git a/src/Payments/PazeTypes.res b/src/Payments/PazeTypes.res index 1452ee62..133f1748 100644 --- a/src/Payments/PazeTypes.res +++ b/src/Payments/PazeTypes.res @@ -36,8 +36,9 @@ type complete = { transactionValue: transactionValue, } +type canCheckoutReturnType = {consumerPresent: bool} type digitalWalletSdk = { - canCheckout: canCheckout => promise, + canCheckout: canCheckout => promise, checkout: checkout => promise, complete: complete => promise, initialize: initialize => promise, diff --git a/src/Payments/PazeWallet.res b/src/Payments/PazeWallet.res index 9008954d..a4d421f9 100644 --- a/src/Payments/PazeWallet.res +++ b/src/Payments/PazeWallet.res @@ -41,12 +41,12 @@ let make = () => { Console.log2("PAZE --- init completed", val) - let consumerPresent = await digitalWalletSdk.canCheckout({ + let canCheckout = await digitalWalletSdk.canCheckout({ emailAddress: emailAddress, }) Console.log("PAZE --- canCheckout completed") - Console.log2("PAZE --- consumerPresent: ", consumerPresent) + Console.log2("PAZE --- canCheckout: ", canCheckout.consumerPresent) let transactionValue = { transactionAmount, @@ -61,7 +61,7 @@ let make = () => { let checkoutResponse = await digitalWalletSdk.checkout({ acceptedPaymentCardNetworks: ["VISA", "MASTERCARD"], - emailAddress, + emailAddress: canCheckout.consumerPresent ? emailAddress : "", sessionId, actionCode: "START_FLOW", transactionValue,