From 6c525a62739f808ecb54149cc34ee341d8bed57b Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Mon, 2 Dec 2024 11:59:12 +0530 Subject: [PATCH 1/6] chore: added payment id in query params (#813) --- src/Utilities/PaymentHelpers.res | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Utilities/PaymentHelpers.res b/src/Utilities/PaymentHelpers.res index 259342fa..9340e664 100644 --- a/src/Utilities/PaymentHelpers.res +++ b/src/Utilities/PaymentHelpers.res @@ -340,6 +340,7 @@ let rec intentCall = ( let url = makeUrl(confirmParam.return_url) url.searchParams.set("payment_intent_client_secret", clientSecret) url.searchParams.set("status", "failed") + url.searchParams.set("payment_id", clientSecret->getPaymentId) messageParentWindow([("confirmParams", confirmParam->anyTypeToJson)]) if statusCode->String.charAt(0) !== "2" { @@ -485,6 +486,7 @@ let rec intentCall = ( let url = makeUrl(confirmParam.return_url) url.searchParams.set("payment_intent_client_secret", clientSecret) + url.searchParams.set("payment_id", clientSecret->getPaymentId) url.searchParams.set("status", intent.status) let handleProcessingStatus = (paymentType, sdkHandleOneClickConfirmPayment) => { @@ -827,6 +829,7 @@ let rec intentCall = ( try { let url = makeUrl(confirmParam.return_url) url.searchParams.set("payment_intent_client_secret", clientSecret) + url.searchParams.set("payment_id", clientSecret->getPaymentId) url.searchParams.set("status", "failed") let exceptionMessage = err->formatException logApi( From 046f5778a205e0c993c0a0ef7fddab256fe13d6b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 2 Dec 2024 06:31:16 +0000 Subject: [PATCH 2/6] chore(release): 0.104.1 [skip ci] ## [0.104.1](https://github.com/juspay/hyperswitch-web/compare/v0.104.0...v0.104.1) (2024-12-02) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee7d918..44f218b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.104.1](https://github.com/juspay/hyperswitch-web/compare/v0.104.0...v0.104.1) (2024-12-02) + # [0.104.0](https://github.com/juspay/hyperswitch-web/compare/v0.103.2...v0.104.0) (2024-11-26) diff --git a/package-lock.json b/package-lock.json index 8b4eeec1..0e463b96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.104.0", + "version": "0.104.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.104.0", + "version": "0.104.1", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index ef9f5200..5fb846fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.104.0", + "version": "0.104.1", "main": "index.js", "private": true, "dependencies": { From cfa8aa3ddc3150bd16e59922681f4c435b0ee8ce Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:29:56 +0530 Subject: [PATCH 3/6] refactor: moved the expiry message to on change (#814) --- src/Payment.res | 2 ++ src/Payments/CardPayment.res | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Payment.res b/src/Payment.res index 250dfe3a..a99badcf 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -115,6 +115,8 @@ let make = (~paymentMode, ~integrateError, ~logger) => { } setExpiryValid(formattedExpiry, setIsExpiryValid) setCardExpiry(_ => formattedExpiry) + // * Sending card expiry to handle cases where the card expires before the use date. + Utils.messageParentWindow([("expiryDate", formattedExpiry->JSON.Encode.string)]) } let changeCVCNumber = ev => { diff --git a/src/Payments/CardPayment.res b/src/Payments/CardPayment.res index 7af2f4b2..2758da9e 100644 --- a/src/Payments/CardPayment.res +++ b/src/Payments/CardPayment.res @@ -154,9 +154,6 @@ 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) && From 75994d83330987a4967423fddd84954dfee54548 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 2 Dec 2024 09:01:53 +0000 Subject: [PATCH 4/6] chore(release): 0.104.2 [skip ci] ## [0.104.2](https://github.com/juspay/hyperswitch-web/compare/v0.104.1...v0.104.2) (2024-12-02) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44f218b8..4cd60ae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.104.2](https://github.com/juspay/hyperswitch-web/compare/v0.104.1...v0.104.2) (2024-12-02) + ## [0.104.1](https://github.com/juspay/hyperswitch-web/compare/v0.104.0...v0.104.1) (2024-12-02) # [0.104.0](https://github.com/juspay/hyperswitch-web/compare/v0.103.2...v0.104.0) (2024-11-26) diff --git a/package-lock.json b/package-lock.json index 0e463b96..d3c54188 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.104.1", + "version": "0.104.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.104.1", + "version": "0.104.2", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 5fb846fc..0b960008 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.104.1", + "version": "0.104.2", "main": "index.js", "private": true, "dependencies": { From 3dcf3c7c8d3da2dbac54ea2e00883e3dbc2ecaa6 Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:07:53 +0530 Subject: [PATCH 5/6] refactor: added checks for expiry (#815) --- src/Payment.res | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Payment.res b/src/Payment.res index a99badcf..e10c1b30 100644 --- a/src/Payment.res +++ b/src/Payment.res @@ -112,11 +112,12 @@ let make = (~paymentMode, ~integrateError, ~logger) => { let formattedExpiry = val->formatCardExpiryNumber if isExipryValid(formattedExpiry) { handleInputFocus(~currentRef=expiryRef, ~destinationRef=cvcRef) + + // * Sending card expiry to handle cases where the card expires before the use date. + Utils.messageParentWindow([("expiryDate", formattedExpiry->JSON.Encode.string)]) } setExpiryValid(formattedExpiry, setIsExpiryValid) setCardExpiry(_ => formattedExpiry) - // * Sending card expiry to handle cases where the card expires before the use date. - Utils.messageParentWindow([("expiryDate", formattedExpiry->JSON.Encode.string)]) } let changeCVCNumber = ev => { From bf64610c8af37a2e311fb3392a5bf4e303eb8386 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 2 Dec 2024 09:43:58 +0000 Subject: [PATCH 6/6] chore(release): 0.104.3 [skip ci] ## [0.104.3](https://github.com/juspay/hyperswitch-web/compare/v0.104.2...v0.104.3) (2024-12-02) --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cd60ae4..663736ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## [0.104.3](https://github.com/juspay/hyperswitch-web/compare/v0.104.2...v0.104.3) (2024-12-02) + ## [0.104.2](https://github.com/juspay/hyperswitch-web/compare/v0.104.1...v0.104.2) (2024-12-02) ## [0.104.1](https://github.com/juspay/hyperswitch-web/compare/v0.104.0...v0.104.1) (2024-12-02) diff --git a/package-lock.json b/package-lock.json index d3c54188..cb3adc20 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.104.2", + "version": "0.104.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.104.2", + "version": "0.104.3", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 0b960008..5fddcd17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.104.2", + "version": "0.104.3", "main": "index.js", "private": true, "dependencies": {