Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into payout_validations
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif-m committed Jul 1, 2024
2 parents b0c39e8 + aa7f73a commit 084685f
Show file tree
Hide file tree
Showing 30 changed files with 214 additions and 53 deletions.
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
- @prafulkoppalkar @akash-c-k @ArushKapoorJuspay @PritishBudhiraja @seekshiva
- @akash-c-k @ArushKapoorJuspay @PritishBudhiraja @seekshiva @vsrivatsa-juspay

docs/ @akash-c-k
LICENSE @akash-c-k
README.md @akash-c-k
SECURITY.md @akash-c-k
.gitignore @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja
.gitignore @ArushKapoorJuspay @PritishBudhiraja

Hyperswitch-React-Demo-App/ @prafulkoppalkar @PritishBudhiraja @seekshiva @ArushKapoorJuspay
Hyperswitch-React-Demo-App/ @PritishBudhiraja @seekshiva @ArushKapoorJuspay @vsrivatsa-juspay

.husky/ @prafulkoppalkar @PritishBudhiraja @seekshiva
.github/ @prafulkoppalkar @PritishBudhiraja @seekshiva
.husky/ @PritishBudhiraja @seekshiva
.github/ @PritishBudhiraja @seekshiva

aws/ @prafulkoppalkar @seekshiva
aws/ @seekshiva

webpack.dev.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja @seekshiva
webpack.common.js @prafulkoppalkar @ArushKapoorJuspay @PritishBudhiraja @seekshiva
webpack.dev.js @ArushKapoorJuspay @PritishBudhiraja @seekshiva
webpack.common.js @ArushKapoorJuspay @PritishBudhiraja @seekshiva

src/ @seekshiva @PritishBudhiraja @ArushKapoorJuspay @prafulkoppalkar @vsrivatsa-juspay
src/ @seekshiva @PritishBudhiraja @ArushKapoorJuspay @vsrivatsa-juspay
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,59 @@
## [0.71.9](https://github.com/juspay/hyperswitch-web/compare/v0.71.8...v0.71.9) (2024-07-01)


### Bug Fixes

* codeowner changes ([#465](https://github.com/juspay/hyperswitch-web/issues/465)) ([f9a9ff7](https://github.com/juspay/hyperswitch-web/commit/f9a9ff7034c008350ca8f871b149050eb93ebd97))

## [0.71.8](https://github.com/juspay/hyperswitch-web/compare/v0.71.7...v0.71.8) (2024-07-01)


### Bug Fixes

* googlePay and applePay billing details not being passed in confirm call for saved methods ([#464](https://github.com/juspay/hyperswitch-web/issues/464)) ([19db1d3](https://github.com/juspay/hyperswitch-web/commit/19db1d398fc77ca99bb6d296da5f39d1b0d1aca3))

## [0.71.7](https://github.com/juspay/hyperswitch-web/compare/v0.71.6...v0.71.7) (2024-07-01)


### Bug Fixes

* manual retries ([#453](https://github.com/juspay/hyperswitch-web/issues/453)) ([39a51d8](https://github.com/juspay/hyperswitch-web/commit/39a51d8a62b9691b6390dcf27f5fc52e35bc8282))

## [0.71.6](https://github.com/juspay/hyperswitch-web/compare/v0.71.5...v0.71.6) (2024-06-28)


### Bug Fixes

* browser name changes - temp ([#463](https://github.com/juspay/hyperswitch-web/issues/463)) ([3f36342](https://github.com/juspay/hyperswitch-web/commit/3f36342fa4c1684856ae811095c3b4e4be08ee5a))

## [0.71.5](https://github.com/juspay/hyperswitch-web/compare/v0.71.4...v0.71.5) (2024-06-28)


### Bug Fixes

* fixed Appearance and Headless PaymentMethodId ([#462](https://github.com/juspay/hyperswitch-web/issues/462)) ([facda4a](https://github.com/juspay/hyperswitch-web/commit/facda4aca234d82fcbbe55a7543d996d35132606))

## [0.71.4](https://github.com/juspay/hyperswitch-web/compare/v0.71.3...v0.71.4) (2024-06-27)


### Bug Fixes

* add a console.log ([8026d50](https://github.com/juspay/hyperswitch-web/commit/8026d50d61f7f0db29ff80aa667d3360a36ee160))

## [0.71.3](https://github.com/juspay/hyperswitch-web/compare/v0.71.2...v0.71.3) (2024-06-26)


### Bug Fixes

* v0.71.2 ([28f40de](https://github.com/juspay/hyperswitch-web/commit/28f40de551eec4be5302f1ec2ae7a1263038fcc0))

## [0.71.1](https://github.com/juspay/hyperswitch-web/compare/v0.71.0...v0.71.1) (2024-06-26)


### Bug Fixes

* added Env to disable sentry by default ([#459](https://github.com/juspay/hyperswitch-web/issues/459)) ([c622e4f](https://github.com/juspay/hyperswitch-web/commit/c622e4f7a80d418112b605d1352d8b88c2baf801))

# [0.71.0](https://github.com/juspay/hyperswitch-web/compare/v0.70.7...v0.71.0) (2024-06-25)


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.71.0",
"version": "0.71.9",
"main": "index.js",
"private": true,
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/Components/SavedMethods.res
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ let make = (
let {themeObj, localeString} = Recoil.useRecoilValueFromAtom(RecoilAtoms.configAtom)
let (showFields, setShowFields) = Recoil.useRecoilState(RecoilAtoms.showCardFieldsAtom)
let areRequiredFieldsValid = Recoil.useRecoilValueFromAtom(RecoilAtoms.areRequiredFieldsValid)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let (requiredFieldsBody, setRequiredFieldsBody) = React.useState(_ => Dict.make())
let loggerState = Recoil.useRecoilValueFromAtom(RecoilAtoms.loggerAtom)
let setUserError = message => {
Expand Down Expand Up @@ -176,6 +177,7 @@ let make = (
->getArrayOfTupleFromDict,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
}
Expand All @@ -193,6 +195,7 @@ let make = (
->getArrayOfTupleFromDict,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
}
Expand All @@ -205,6 +208,7 @@ let make = (
->getArrayOfTupleFromDict,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
}
Expand Down Expand Up @@ -233,6 +237,7 @@ let make = (
isCustomerAcceptanceRequired,
applePayToken,
gPayToken,
isManualRetryEnabled,
))
useSubmitPaymentData(submitCallback)

Expand Down
2 changes: 2 additions & 0 deletions src/LoaderController.res
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ open Utils
@react.component
let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger, ~initTimestamp) => {
open RecoilAtoms

Console.log("in LoaderController")
//<...>//
let (configAtom, setConfig) = Recoil.useRecoilState(configAtom)
let (keys, setKeys) = Recoil.useRecoilState(keys)
Expand Down
9 changes: 8 additions & 1 deletion src/Payment.res
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let make = (~paymentMode, ~integrateError, ~logger) => {
let cardScheme = Recoil.useRecoilValueFromAtom(cardBrand)
let showFields = Recoil.useRecoilValueFromAtom(showCardFieldsAtom)
let selectedOption = Recoil.useRecoilValueFromAtom(selectedOptionAtom)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isManualRetryEnabled)
let paymentToken = Recoil.useRecoilValueFromAtom(paymentTokenAtom)
let paymentMethodListValue = Recoil.useRecoilValueFromAtom(PaymentUtils.paymentMethodListValue)

Expand Down Expand Up @@ -220,7 +221,13 @@ let make = (~paymentMode, ~integrateError, ~logger) => {
}

let submitAPICall = (body, confirmParam) => {
intent(~bodyArr=body, ~confirmParam, ~handleUserError=false, ())
intent(
~bodyArr=body,
~confirmParam,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
}
React.useEffect(() => {
setCvcNumber(_ => "")
Expand Down
11 changes: 9 additions & 2 deletions src/Payments/ACHBankDebit.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ open PaymentModeType
@react.component
let make = (~paymentType: CardThemeType.mode) => {
let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isManualRetryEnabled)

let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom)

Expand Down Expand Up @@ -76,15 +77,21 @@ let make = (~paymentType: CardThemeType.mode) => {
~state=state.value,
~paymentType=paymentMethodListValue.payment_type,
)
intent(~bodyArr=body, ~confirmParam=confirm.confirmParams, ~handleUserError=false, ())
intent(
~bodyArr=body,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
| None => ()
}
()
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
}
}
}, (email, modalData, fullName))
}, (email, modalData, fullName, isManualRetryEnabled))
useSubmitPaymentData(submitCallback)

<div className="flex flex-col animate-slowShow" style={gridGap: themeObj.spacingGridColumn}>
Expand Down
4 changes: 3 additions & 1 deletion src/Payments/ACHBankTransfer.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ open Utils
let make = (~paymentType: CardThemeType.mode) => {
let {iframeId} = Recoil.useRecoilValueFromAtom(keys)
let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isManualRetryEnabled)
let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom)
let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), BankTransfer)
let (email, _) = Recoil.useLoggedRecoilState(userEmailAddress, "email", loggerState)
Expand Down Expand Up @@ -32,13 +33,14 @@ let make = (~paymentType: CardThemeType.mode) => {
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~iframeId,
~manualRetry=isManualRetryEnabled,
(),
)
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
}
}
}, [email])
}, (email, isManualRetryEnabled))
useSubmitPaymentData(submitCallback)

<div className="flex flex-col animate-slowShow" style={gridGap: themeObj.spacingTab}>
Expand Down
3 changes: 3 additions & 0 deletions src/Payments/ApplePay.res
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ let make = (~sessionObj: option<JSON.t>) => {
let (showApplePay, setShowApplePay) = React.useState(() => false)
let (showApplePayLoader, setShowApplePayLoader) = React.useState(() => false)
let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), Applepay)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let sync = PaymentHelpers.usePaymentSync(Some(loggerState), Applepay)
let options = Recoil.useRecoilValueFromAtom(RecoilAtoms.optionAtom)
let (applePayClicked, setApplePayClicked) = React.useState(_ => false)
Expand Down Expand Up @@ -228,6 +229,7 @@ let make = (~sessionObj: option<JSON.t>) => {
~intent,
~options,
~publishableKey,
~isManualRetryEnabled,
)
} else {
ApplePayHelpers.handleApplePayButtonClicked(~sessionObj, ~componentName)
Expand All @@ -241,6 +243,7 @@ let make = (~sessionObj: option<JSON.t>) => {
~intent,
~options,
~publishableKey,
~isManualRetryEnabled,
)
}
} else {
Expand Down
10 changes: 8 additions & 2 deletions src/Payments/BacsBankDebit.res
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let cleanSortCode = str => str->String.replaceRegExp(%re("/-/g"), "")
@react.component
let make = (~paymentType: CardThemeType.mode) => {
let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom)

let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let {config, themeObj, localeString} = Recoil.useRecoilValueFromAtom(configAtom)

let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), BankDebits)
Expand Down Expand Up @@ -89,7 +89,13 @@ let make = (~paymentType: CardThemeType.mode) => {
~country=getCountryCode(country.value).isoAlpha2,
~bankAccountHolderName=fullName.value,
)
intent(~bodyArr=body, ~confirmParam=confirm.confirmParams, ~handleUserError=false, ())
intent(
~bodyArr=body,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
()
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
Expand Down
4 changes: 3 additions & 1 deletion src/Payments/BacsBankTransfer.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ let default = (paymentType: CardThemeType.mode) => {
let {iframeId} = Recoil.useRecoilValueFromAtom(keys)
let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom)
let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), BankTransfer)
let (email, _) = Recoil.useLoggedRecoilState(userEmailAddress, "email", loggerState)
let (fullName, _) = Recoil.useLoggedRecoilState(userFullName, "fullName", loggerState)
Expand Down Expand Up @@ -36,13 +37,14 @@ let default = (paymentType: CardThemeType.mode) => {
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~iframeId,
~manualRetry=isManualRetryEnabled,
(),
)
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
}
}
}, [email, fullName])
}, (isManualRetryEnabled, email, fullName))
useSubmitPaymentData(submitCallback)

<div className="flex flex-col animate-slowShow" style={gridGap: themeObj.spacingTab}>
Expand Down
11 changes: 9 additions & 2 deletions src/Payments/BecsBankDebit.res
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ let make = (~paymentType: CardThemeType.mode) => {
let (postalCode, _) = Recoil.useLoggedRecoilState(userAddressPincode, "postal_code", loggerState)
let (state, _) = Recoil.useLoggedRecoilState(userAddressState, "state", loggerState)
let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), BankDebits)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)

let complete =
email.value != "" &&
Expand Down Expand Up @@ -68,15 +69,21 @@ let make = (~paymentType: CardThemeType.mode) => {
~postalCode=postalCode.value,
~state=state.value,
)
intent(~bodyArr=body, ~confirmParam=confirm.confirmParams, ~handleUserError=false, ())
intent(
~bodyArr=body,
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
}
| None => ()
}
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
}
}
}, (email, fullName, modalData))
}, (email, fullName, modalData, isManualRetryEnabled))
useSubmitPaymentData(submitCallback)

<div className="flex flex-col animate-slowShow" style={gridGap: themeObj.spacingGridColumn}>
Expand Down
5 changes: 3 additions & 2 deletions src/Payments/Boleto.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let make = (~paymentType: CardThemeType.mode) => {
let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom)
let {config, themeObj, localeString} = Recoil.useRecoilValueFromAtom(configAtom)
let {iframeId} = Recoil.useRecoilValueFromAtom(keys)

let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let intent = PaymentHelpers.usePaymentIntent(Some(loggerState), Other)
let setComplete = Recoil.useSetRecoilState(fieldsComplete)
let (socialSecurityNumber, setSocialSecurityNumber) = React.useState(_ => "")
Expand Down Expand Up @@ -64,13 +64,14 @@ let make = (~paymentType: CardThemeType.mode) => {
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~iframeId,
~manualRetry=isManualRetryEnabled,
(),
)
} else {
postFailedSubmitResponse(~errortype="validation_error", ~message="Please enter all fields")
}
}
}, [socialSecurityNumber])
}, (socialSecurityNumber, isManualRetryEnabled))
useSubmitPaymentData(submitCallback)

let changeSocialSecurityNumber = ev => {
Expand Down
3 changes: 3 additions & 0 deletions src/Payments/CardPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let make = (
open UtilityHooks

let {config, themeObj, localeString} = Recoil.useRecoilValueFromAtom(RecoilAtoms.configAtom)
let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(RecoilAtoms.isManualRetryEnabled)
let {innerLayout} = config.appearance
let options = Recoil.useRecoilValueFromAtom(RecoilAtoms.optionAtom)
let loggerState = Recoil.useRecoilValueFromAtom(RecoilAtoms.loggerAtom)
Expand Down Expand Up @@ -174,6 +175,7 @@ let make = (
},
~confirmParam=confirm.confirmParams,
~handleUserError=false,
~manualRetry=isManualRetryEnabled,
(),
)
} else {
Expand Down Expand Up @@ -206,6 +208,7 @@ let make = (
isCustomerAcceptanceRequired,
nickname,
isCardBrandValid,
isManualRetryEnabled
))
useSubmitPaymentData(submitCallback)

Expand Down
Loading

0 comments on commit 084685f

Please sign in to comment.