Skip to content

Commit

Permalink
Merge branch 'main' into paypal-tabs-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored Nov 19, 2024
2 parents 65b5923 + bcd781d commit 034f7b4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
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.102.5",
"version": "0.102.8",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
3 changes: 3 additions & 0 deletions src/Payments/CardPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
3 changes: 2 additions & 1 deletion src/Payments/PazeTypes.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ type complete = {
transactionValue: transactionValue,
}

type canCheckoutReturnType = {consumerPresent: bool}
type digitalWalletSdk = {
canCheckout: canCheckout => promise<JSON.t>,
canCheckout: canCheckout => promise<canCheckoutReturnType>,
checkout: checkout => promise<JSON.t>,
complete: complete => promise<JSON.t>,
initialize: initialize => promise<JSON.t>,
Expand Down
6 changes: 3 additions & 3 deletions src/Payments/PazeWallet.res
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -61,7 +61,7 @@ let make = () => {

let checkoutResponse = await digitalWalletSdk.checkout({
acceptedPaymentCardNetworks: ["VISA", "MASTERCARD"],
emailAddress,
emailAddress: canCheckout.consumerPresent ? emailAddress : "",
sessionId,
actionCode: "START_FLOW",
transactionValue,
Expand Down

0 comments on commit 034f7b4

Please sign in to comment.