Skip to content

Commit

Permalink
Merge branch 'main' into logs-added
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Dec 3, 2024
2 parents 79bdc5e + bf64610 commit 621d539
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [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)

# [0.104.0](https://github.com/juspay/hyperswitch-web/compare/v0.103.2...v0.104.0) (2024-11-26)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orca-payment-page",
"version": "0.104.0",
"version": "0.104.3",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions src/Payment.res
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ 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)
Expand Down
3 changes: 0 additions & 3 deletions src/Payments/CardPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
3 changes: 3 additions & 0 deletions src/Utilities/PaymentHelpers.res
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 621d539

Please sign in to comment.