From 96a81e0363ade432fb288cc59a5dfb64ad029e48 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <77892330+PritishBudhiraja@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:13:06 +0530 Subject: [PATCH 1/4] fix: commit-msg file changes & README.md file updated. (#65) --- .githooks/commit-msg | 3 + .github/PULL_REQUEST_TEMPLATE.md | 1 - .gitignore | 3 +- README.md | 72 +++++++++++++++++++ .../hyperswitch/EntryPointUtils.res | 2 +- .../hyperswitch/Provider/GlobalProvider.res | 10 --- .../hyperswitch/Provider/ProviderHelper.res | 12 ---- .../hyperswitch/Provider/ProviderTypes.res | 2 - 8 files changed, 78 insertions(+), 27 deletions(-) diff --git a/.githooks/commit-msg b/.githooks/commit-msg index 26b4e3eb0..3a1276348 100755 --- a/.githooks/commit-msg +++ b/.githooks/commit-msg @@ -43,9 +43,12 @@ else echo "~~~~**** Error: Commit Signature Missing. ****~~~~" echo "Please make sure to sign your commits. You can sign your commit by using the '-S' option with 'git commit'." echo "Example: git commit -S -m 'Your commit message'" + echo "Signing commits is crucial for verifying contributions. Consult GitHub's documentation on commit signature verification for guidance: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits" exit 1 fi # If the commit message matches the convention, the script exits successfully. +echo echo "*****~~~~~ Commit hook completed ~~~~~~*****" +echo exit 0 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 987dd59bb..c91742e85 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -39,4 +39,3 @@ Or did you test this change manually (provide relevant screenshots)? - [ ] I ran `npm run re:build` - [ ] I reviewed submitted code - [ ] I added unit tests for my changes where possible -- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable diff --git a/.gitignore b/.gitignore index 3fdff3ada..c1ebc1891 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ env-config.js yarn.lock #package-lock.json user_data.sh -*.pem \ No newline at end of file +*.pem +.bsb.lock diff --git a/README.md b/README.md index 29d5b0d3f..c93b1e70f 100644 --- a/README.md +++ b/README.md @@ -267,10 +267,82 @@ curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aw --- +## Changelog + +For a detailed list of changes made in each version, please refer to the [Changelog](./CHANGELOG.md) file. + +--- + ## Contributing We welcome contributions from the community! If you would like to contribute to Hyperswitch, please follow our contribution guidelines. +### Commit Conventions + +We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification for our commit messages. Each commit message should have a structured format: + +`(): ` + +The commit message should begin with one of the following keywords followed by a colon: 'feat', 'fix', 'chore', 'refactor', 'docs', 'test' or 'style'. For example, it should be formatted like this: `feat: - ` + +### Signing Commits + +All commits should be signed to verify the authenticity of contributors. Follow the steps below to sign your commits: + +1. Generate a GPG key if you haven't already: + + ```bash + gpg --gen-key + ``` + +2. List your GPG keys and copy the GPG key ID:: + + ```bash + gpg --list-secret-keys --keyid-format LONG + ``` + + #### Identify the GPG key you want to add to your GitHub account. + + a. Run the following command to export your GPG public key in ASCII-armored format: + + ```bash + gpg --armor --export + Replace with the actual key ID. + ``` + + b. Copy the entire output, including the lines that start with "-----BEGIN PGP PUBLIC KEY BLOCK-----" and "-----END PGP PUBLIC KEY BLOCK-----". + + c. Go to your GitHub Settings. + + d. Click on "SSH and GPG keys" in the left sidebar. + + e. Click the "New GPG key" button. + + f. Paste your GPG public key into the provided text box. + + g. Click the "Add GPG key" button. + + h. Now your GPG public key is associated with your GitHub account, and you can sign your commits for added security. + +3. Configure Git to use your GPG key: + + ```bash + git config --global user.signingkey + ``` + +4. Set Git to sign all your commits by default: + + ```bash + git config --global commit.gpgSign true + ``` + +5. Commit your changes with the -S option to sign the commit: + ```bash + git commit -S -m "your commit message" + ``` + +For further assistance, please refer to the [GitHub documentation on signing commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). + --- ## License diff --git a/src/entryPoints/hyperswitch/EntryPointUtils.res b/src/entryPoints/hyperswitch/EntryPointUtils.res index 5b67e4f6d..8c3e13a98 100644 --- a/src/entryPoints/hyperswitch/EntryPointUtils.res +++ b/src/entryPoints/hyperswitch/EntryPointUtils.res @@ -37,7 +37,7 @@ module ContextWrapper = { } } -let renderDashboardApp = (~uiConfig=UIConfig.defaultUIConfig, children) => { +let renderDashboardApp = (~uiConfig, children) => { switch ReactDOM.querySelector("#app") { | Some(container) => open ReactDOM.Client diff --git a/src/entryPoints/hyperswitch/Provider/GlobalProvider.res b/src/entryPoints/hyperswitch/Provider/GlobalProvider.res index 10a8b7365..894350380 100644 --- a/src/entryPoints/hyperswitch/Provider/GlobalProvider.res +++ b/src/entryPoints/hyperswitch/Provider/GlobalProvider.res @@ -8,8 +8,6 @@ let defaultValue = { setShowProdIntentForm: _ => (), integrationDetails: defaultIntegrationValue, setIntegrationDetails: _ => (), - tabIndexForDevelopers: 0, - setTabIndexForDevelopers: _ => (), dashboardPageState: #DEFAULT, setDashboardPageState: _ => (), permissionInfo: [], @@ -23,11 +21,6 @@ let defaultValue = { let defaultContext = React.createContext(defaultValue) module Provider = { - let makeProps = (~value, ~children, ()) => - { - "value": value, - "children": children, - } let make = React.Context.provider(defaultContext) } @@ -35,7 +28,6 @@ module Provider = { let make = (~children) => { let (showFeedbackModal, setShowFeedbackModal) = React.useState(_ => false) let (showProdIntentForm, setShowProdIntentForm) = React.useState(_ => false) - let (tabIndexForDevelopers, setTabIndexForDevelopers) = React.useState(_ => 0) let (dashboardPageState, setDashboardPageState) = React.useState(_ => #DEFAULT) let (permissionInfo, setPermissionInfo) = React.useState(_ => []) let (isProdIntentCompleted, setIsProdIntentCompleted) = React.useState(_ => false) @@ -56,8 +48,6 @@ let make = (~children) => { integrationDetails, showProdIntentForm, setShowProdIntentForm, - tabIndexForDevelopers, - setTabIndexForDevelopers, dashboardPageState, setDashboardPageState, permissionInfo, diff --git a/src/entryPoints/hyperswitch/Provider/ProviderHelper.res b/src/entryPoints/hyperswitch/Provider/ProviderHelper.res index 2b77f3d3e..1618d9dbd 100644 --- a/src/entryPoints/hyperswitch/Provider/ProviderHelper.res +++ b/src/entryPoints/hyperswitch/Provider/ProviderHelper.res @@ -47,18 +47,6 @@ let itemToObjMapperForGetInfo = dict => { } } -let getDefaultValueOfGetInfo = { - module_: "", - description: "", - permissions: [ - { - enum_name: "", - description: "", - isPermissionAllowed: false, - }, - ], -} - let getDefaultValueOfEnum = { { enum_name: "", diff --git a/src/entryPoints/hyperswitch/Provider/ProviderTypes.res b/src/entryPoints/hyperswitch/Provider/ProviderTypes.res index 8bddb58da..8d04f0306 100644 --- a/src/entryPoints/hyperswitch/Provider/ProviderTypes.res +++ b/src/entryPoints/hyperswitch/Provider/ProviderTypes.res @@ -38,8 +38,6 @@ type contextType = { setShowFeedbackModal: (bool => bool) => unit, showProdIntentForm: bool, setShowProdIntentForm: (bool => bool) => unit, - tabIndexForDevelopers: int, - setTabIndexForDevelopers: (int => int) => unit, dashboardPageState: dashboardPageStateTypes, setDashboardPageState: (dashboardPageStateTypes => dashboardPageStateTypes) => unit, integrationDetails: integrationDetailsType, From 1930bd294de22a962304c4389426b741429fd1dc Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <77892330+PritishBudhiraja@users.noreply.github.com> Date: Wed, 6 Dec 2023 14:21:26 +0530 Subject: [PATCH 2/4] fix: Update README.md (#66) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c93b1e70f..8420c0dca 100644 --- a/README.md +++ b/README.md @@ -267,9 +267,9 @@ curl https://raw.githubusercontent.com/juspay/hyperswitch-control-center/main/aw --- -## Changelog +## Versioning -For a detailed list of changes made in each version, please refer to the [Changelog](./CHANGELOG.md) file. +For a detailed list of changes made in each version, please refer to the [CHANGELOG](./CHANGELOG.md) file. --- From 844920b6fd09aa07edbf33ba83ff2aaa394c7a78 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <77892330+PritishBudhiraja@users.noreply.github.com> Date: Wed, 6 Dec 2023 16:18:15 +0530 Subject: [PATCH 3/4] fix: Live Mode SDK Fixes. (#67) --- README.md | 8 ++------ config/FeatureFlag.json | 3 +-- .../hyperswitch/FeatureFlagUtils.res | 6 ++---- .../hyperswitch/HyperSwitchApp.res | 8 ++++---- .../hyperswitch/HyperSwitchEntry.res | 2 +- .../Connectors/ConnectorAccountDetails.res | 4 ++-- .../ConnectorAccountDetailsHelper.res | 2 +- .../HyperSwitch/Connectors/ConnectorList.res | 2 +- .../HyperSwitch/FraudAndRisk/FRMConfigure.res | 2 +- .../FraudAndRisk/FRMIntegrationFields.res | 2 +- .../ConfigureConnector.res | 1 - .../CommonConnectorFlow/SetupConnector.res | 2 +- src/screens/HyperSwitch/Home/HomeUtils.res | 10 +++++----- .../HyperSwitch/Order/OrderUIUtils.res | 6 +++--- .../HyperSwitch/SDKPayment/TestPayment.res | 1 + .../ProdOnboardingUIUtils.res | 19 +++++++++++-------- .../SetupConnectorCredentials.res | 4 ++-- .../HyperSwitchAuthScreen.res | 4 ++-- .../HSwitchLoginFlow/HyperSwitchAuthUtils.res | 4 ++-- 19 files changed, 43 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 8420c0dca..0a849af3f 100644 --- a/README.md +++ b/README.md @@ -136,9 +136,9 @@ The `home_page` feature flag controls whether the dashboard home page is enabled The `test_live_toggle` feature flag enables users to toggle between test and live modes when signing in. When enabled, users will see an option during sign-in to actively switch between test and live environments. -#### Test Live Mode +#### Is Live Mode -The `test_live_mode` feature flag enables displaying the current mode - test or live - that the user is accessing. When enabled, it will show a visual indicator within the dashboard signaling whether the user is currently in a test environment or live production environment. +The `is_live_mode` feature flag enables the live mode - that the user is accessing. When enabled, it will show a visual indicator within the dashboard signaling whether the user is currently in a test environment or live production environment. #### Magic Link @@ -152,10 +152,6 @@ The `production_access` feature flag enables a flow for users to request live pr The `quick_start` feature flag enables the simplified onboarding flow for new users, where he connects to processors, configure payment routing and testing a payment, all in one flow. -#### Open SDK - -The `open_sdk` feature flag enables access to the Checkout Page web SDK from within the dashboard. When enabled, developers can preview the SDK from within the dashboard and make payments. - --- ## Deployment diff --git a/config/FeatureFlag.json b/config/FeatureFlag.json index 99a695198..b31e3882e 100644 --- a/config/FeatureFlag.json +++ b/config/FeatureFlag.json @@ -1,10 +1,9 @@ { "test_live_toggle": false, - "test_live_mode": false, + "is_live_mode": false, "magic_link": false, "production_access": false, "quick_start": false, - "open_sdk": false, "switch_merchant": false, "audit_trail": false, "system_metrics": false, diff --git a/src/entryPoints/hyperswitch/FeatureFlagUtils.res b/src/entryPoints/hyperswitch/FeatureFlagUtils.res index fa322ff39..8d1eda500 100644 --- a/src/entryPoints/hyperswitch/FeatureFlagUtils.res +++ b/src/entryPoints/hyperswitch/FeatureFlagUtils.res @@ -4,9 +4,8 @@ type featureFlag = { testLiveToggle: bool, magicLink: bool, quickStart: bool, - openSDK: bool, switchMerchant: bool, - testLiveMode: bool, + isLiveMode: bool, auditTrail: bool, systemMetrics: bool, sampleData: bool, @@ -32,9 +31,8 @@ let featureFlagType = (featureFlags: Js.Json.t) => { testLiveToggle: dict->getBool("test_live_toggle", false), magicLink: dict->getBool("magic_link", false), quickStart: dict->getBool("quick_start", false), - openSDK: dict->getBool("open_sdk", false), switchMerchant: dict->getBool("switch_merchant", false), - testLiveMode: dict->getBool("test_live_mode", false), + isLiveMode: dict->getBool("is_live_mode", false), auditTrail: dict->getBool("audit_trail", false), systemMetrics: dict->getBool("system_metrics", false), sampleData: dict->getBool("sample_data", false), diff --git a/src/entryPoints/hyperswitch/HyperSwitchApp.res b/src/entryPoints/hyperswitch/HyperSwitchApp.res index a23eeb93e..309be7437 100644 --- a/src/entryPoints/hyperswitch/HyperSwitchApp.res +++ b/src/entryPoints/hyperswitch/HyperSwitchApp.res @@ -50,10 +50,10 @@ let make = () => { let getEnumDetails = EnumVariantHook.useFetchEnumDetails() let verificationDays = getFromMerchantDetails("verification")->LogicUtils.getIntFromString(-1) let userRole = getFromUserDetails("user_role") - let modeText = featureFlagDetails.testLiveMode ? "Live Mode" : "Test Mode" + let modeText = featureFlagDetails.isLiveMode ? "Live Mode" : "Test Mode" let titleComingSoonMessage = "Coming Soon!" let subtitleComingSoonMessage = "We are currently working on this page." - let modeStyles = featureFlagDetails.testLiveMode + let modeStyles = featureFlagDetails.isLiveMode ? "bg-hyperswitch_green_trans border-hyperswitch_green_trans text-hyperswitch_green" : "bg-orange-600/80 border-orange-500 text-grey-700" @@ -125,7 +125,7 @@ let make = () => { let _featureFlag = await fetchInitialEnums() } - if featureFlagDetails.testLiveMode { + if featureFlagDetails.isLiveMode { getAgreementEnum()->ignore } else { setDashboardPageState(_ => #HOME) @@ -331,7 +331,7 @@ let make = () => { | list{"sdk"} => - + | list{"3ds"} => diff --git a/src/entryPoints/hyperswitch/HyperSwitchEntry.res b/src/entryPoints/hyperswitch/HyperSwitchEntry.res index c8a4b29cc..2ab9ea88c 100644 --- a/src/entryPoints/hyperswitch/HyperSwitchEntry.res +++ b/src/entryPoints/hyperswitch/HyperSwitchEntry.res @@ -43,7 +43,7 @@ module HyperSwitchEntryComponent = { let setPageName = pageTitle => { let page = pageTitle->LogicUtils.snakeToTitle - let title = featureFlagDetails.testLiveMode + let title = featureFlagDetails.isLiveMode ? `${page} - Dashboard` : `${page} - Dashboard [Test]` DOMUtils.document.title = title diff --git a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res index 95b1456ce..f1075e08b 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetails.res @@ -343,7 +343,7 @@ let make = ( ~connector, ~bodyType, ~isPayoutFlow, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, (), ) setScreenState(_ => Loading) @@ -396,7 +396,7 @@ let make = ( ~connector, ~bodyType, ~isPayoutFlow, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, (), )->ignoreFields(connectorID, verifyConnectorIgnoreField) diff --git a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetailsHelper.res b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetailsHelper.res index 050a1f127..9bbb1c54e 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorAccountDetailsHelper.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorAccountDetailsHelper.res @@ -132,7 +132,7 @@ module RenderConnectorInputFields = { ~selectedConnector, ~dict=details, ~fieldName=formName, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, )} /> diff --git a/src/screens/HyperSwitch/Connectors/ConnectorList.res b/src/screens/HyperSwitch/Connectors/ConnectorList.res index 9abaa340a..91f6dccc4 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorList.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorList.res @@ -11,7 +11,7 @@ module NewProcessorCards = { ->LogicUtils.safeParse ->FeatureFlagUtils.featureFlagType - let connectorsAvailableForIntegration = featureFlagDetails.testLiveMode + let connectorsAvailableForIntegration = featureFlagDetails.isLiveMode ? ConnectorUtils.connectorListForLive : isPayoutFlow ? ConnectorUtils.payoutConnectorList diff --git a/src/screens/HyperSwitch/FraudAndRisk/FRMConfigure.res b/src/screens/HyperSwitch/FraudAndRisk/FRMConfigure.res index f3594d1c7..b6df5589b 100644 --- a/src/screens/HyperSwitch/FraudAndRisk/FRMConfigure.res +++ b/src/screens/HyperSwitch/FraudAndRisk/FRMConfigure.res @@ -32,7 +32,7 @@ let make = () => { setInitialValues(_ => { generateInitialValuesDict( ~selectedFRMInfo=frmInfo, - ~isLiveMode=featureFlagDetails.testLiveMode, + ~isLiveMode=featureFlagDetails.isLiveMode, (), ) }) diff --git a/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res b/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res index ca20884e5..0feccdd07 100644 --- a/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res +++ b/src/screens/HyperSwitch/FraudAndRisk/FRMIntegrationFields.res @@ -228,7 +228,7 @@ let make = ( } | None => - generateInitialValuesDict(~selectedFRMInfo, ~isLiveMode={featureFlagDetails.testLiveMode}, ()) + generateInitialValuesDict(~selectedFRMInfo, ~isLiveMode={featureFlagDetails.isLiveMode}, ()) } }, [retrivedValues]) diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res index 3fec27740..cee497604 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/ConfigureConnector.res @@ -6,7 +6,6 @@ let make = (~connectProcessorValue: connectProcessor) => { open QuickStartUtils open APIUtils let updateDetails = useUpdateMethod() - let usePostEnumDetails = EnumVariantHook.usePostEnumDetails() let {quickStartPageState, setQuickStartPageState, setDashboardPageState} = React.useContext( GlobalProvider.defaultContext, diff --git a/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res b/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res index 621364994..fd08653c9 100644 --- a/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res +++ b/src/screens/HyperSwitch/Home/CommonConnectorFlow/SetupConnector.res @@ -91,7 +91,7 @@ module ConfigureProcessor = { ~connector=connectorName, ~bodyType, ~isPayoutFlow=false, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, (), ) setInitialValues(_ => body) diff --git a/src/screens/HyperSwitch/Home/HomeUtils.res b/src/screens/HyperSwitch/Home/HomeUtils.res index e87ce358c..5e90d7b80 100644 --- a/src/screens/HyperSwitch/Home/HomeUtils.res +++ b/src/screens/HyperSwitch/Home/HomeUtils.res @@ -269,7 +269,7 @@ module ControlCenter = { let url = RescriptReactRouter.useUrl() let hyperswitchMixPanel = HSMixPanel.useSendEvent() let merchantDetailsValue = useMerchantDetailsValue() - let {testLiveMode} = + let {isLiveMode} = HyperswitchAtom.featureFlagAtom ->Recoil.useRecoilValueFromAtom ->LogicUtils.safeParse @@ -277,13 +277,13 @@ module ControlCenter = { let pageName = url.path->getPageNameFromUrl - let isLiveModeEnabledStyles = testLiveMode + let isLiveModeEnabledStyles = isLiveMode ? "flex flex-col md:flex-row gap-5 w-full" : "flex flex-col gap-5 md:w-1/2 w-full"
- + - +
- +
diff --git a/src/screens/HyperSwitch/Order/OrderUIUtils.res b/src/screens/HyperSwitch/Order/OrderUIUtils.res index c84381ed3..24a37eb6b 100644 --- a/src/screens/HyperSwitch/Order/OrderUIUtils.res +++ b/src/screens/HyperSwitch/Order/OrderUIUtils.res @@ -81,14 +81,14 @@ module GenerateSampleDataButton = { module NoData = { @react.component let make = (~isConfigureConnector, ~paymentModal, ~setPaymentModal) => { - let {testLiveMode} = + let {isLiveMode} = HyperswitchAtom.featureFlagAtom ->Recoil.useRecoilValueFromAtom ->LogicUtils.safeParse ->FeatureFlagUtils.featureFlagType onProceed(~paymentId)->ignore} customWidth bgColor="bg-green-success_page_bg" + isButtonVisible={paymentId->Js.String2.length > 0} /> | FAILED(_err) => diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res index 5728292af..996c8258b 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/ProdOnboardingUIUtils.res @@ -137,20 +137,23 @@ module BasicAccountSetupSuccessfulPage = { ~customWidth="w-full", ~bgColor="bg-green-success_page_bg", ~buttonState=Button.Normal, + ~isButtonVisible=true, ) => {

{statusText->React.string}

-
} } diff --git a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res index 8779bcedf..8037916c9 100644 --- a/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res +++ b/src/screens/HyperSwitch/SelfServe/HSwitchProdOnboarding/SetupConnectorCredentials.res @@ -173,7 +173,7 @@ let make = (~selectedConnector, ~pageView, ~setPageView, ~setConnectorID) => { ~values, ~connector=connectorName, ~bodyType, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, (), ) @@ -238,7 +238,7 @@ let make = (~selectedConnector, ~pageView, ~setPageView, ~setConnectorID) => { ~connector={connectorName}, ~bodyType, ~isPayoutFlow=false, - ~isLiveMode={featureFlagDetails.testLiveMode}, + ~isLiveMode={featureFlagDetails.isLiveMode}, (), )->ignoreFields(connectorID, verifyConnectorIgnoreField) diff --git a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthScreen.res b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthScreen.res index ade1b4c48..ab716ea83 100644 --- a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthScreen.res +++ b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthScreen.res @@ -47,7 +47,7 @@ let make = (~setAuthStatus: HyperSwitchAuthTypes.authStatus => unit) => { open HyperSwitchAuthTypes let url = RescriptReactRouter.useUrl() let (mode, setMode) = React.useState(_ => TestButtonMode) - let {testLiveMode, magicLink: isMagicLinkEnabled} = + let {isLiveMode, magicLink: isMagicLinkEnabled} = HyperswitchAtom.featureFlagAtom ->Recoil.useRecoilValueFromAtom ->LogicUtils.safeParse @@ -74,7 +74,7 @@ let make = (~setAuthStatus: HyperSwitchAuthTypes.authStatus => unit) => { }, [isMagicLinkEnabled]) React.useEffect1(() => { - if testLiveMode { + if isLiveMode { setMode(_ => LiveButtonMode) } else { setMode(_ => TestButtonMode) diff --git a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthUtils.res b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthUtils.res index 00456710d..316a94ab1 100644 --- a/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthUtils.res +++ b/src/screens/login/HSwitchLoginFlow/HyperSwitchAuthUtils.res @@ -310,7 +310,7 @@ module Header = { @react.component let make = (~authType, ~setAuthType, ~email) => { let form = ReactFinalForm.useForm() - let {magicLink: isMagicLinkEnabled, testLiveMode} = + let {magicLink: isMagicLinkEnabled, isLiveMode} = HyperswitchAtom.featureFlagAtom ->Recoil.useRecoilValueFromAtom ->LogicUtils.safeParse @@ -383,7 +383,7 @@ module Header = {

{cardHeaderText->React.string}

{switch authType { | LoginWithPassword | LoginWithEmail => - !testLiveMode + !isLiveMode ? getHeaderLink( ~prefix="New to Hyperswitch?", ~authType=SignUP, From bf6bde89eaaf3c443e07c191b42d2a9293377130 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <77892330+PritishBudhiraja@users.noreply.github.com> Date: Wed, 6 Dec 2023 17:03:56 +0530 Subject: [PATCH 4/4] feat: Bankofamerica addition in prod (#69) --- .../Connectors/ConnectorPreview.res | 55 +++++++++---------- .../HyperSwitch/Connectors/ConnectorUtils.res | 11 ++-- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res index 2123eeab2..a4b6e1f7e 100644 --- a/src/screens/HyperSwitch/Connectors/ConnectorPreview.res +++ b/src/screens/HyperSwitch/Connectors/ConnectorPreview.res @@ -6,7 +6,7 @@ module InfoField = { Js.String2.length > 0}>

{label->React.string}

-

{str->React.string}

+

{str->React.string}

} @@ -129,9 +129,9 @@ module ConnectorSummaryGrid = { let webhooksUrl = ConnectorUtils.getWebhooksUrl(~connectorName=connector, ~merchantId)
-
+

{"Processor Mode"->React.string}

-
+
{if connectorInfo.test_mode { {"TEST MODE"->React.string} @@ -143,13 +143,13 @@ module ConnectorSummaryGrid = { }}
-
+

{"Profile Id"->React.string}

-
{connectorInfo.profile_id->React.string}
+
{connectorInfo.profile_id->React.string}
-
+

{"API Keys"->React.string}

-
+
{connectorAccountFields ->Js.Dict.keys ->Array.mapWithIndex((field, index) => { @@ -164,31 +164,30 @@ module ConnectorSummaryGrid = { ->React.array}
-
+

{"Webhooks"->React.string}

-
-
-
{webhooksUrl->React.string}
-
{ - Clipboard.writeText(webhooksUrl) - showToast(~message="Copied to Clipboard!", ~toastType=ToastSuccess, ()) - hyperswitchMixPanel( - ~pageName=`${url.path->LogicUtils.getListHead}`, - ~contextName="webhook_processor", - ~actionName="hs_webhookcopied", - (), - ) - }}> - -
-
+ //
+
+
{webhooksUrl->React.string}
+ { + Clipboard.writeText(webhooksUrl) + showToast(~message="Copied to Clipboard!", ~toastType=ToastSuccess, ()) + hyperswitchMixPanel( + ~pageName=`${url.path->LogicUtils.getListHead}`, + ~contextName="webhook_processor", + ~actionName="hs_webhookcopied", + (), + ) + }} + /> + //
-
+

{"PMTs"->React.string}

-
+
{connectorInfo.payment_methods_enabled ->Array.mapWithIndex((field, index) => { = [ let connectorListForLive: array = [ STRIPE, ADYEN, - CHECKOUT, - ZEN, - BLUESNAP, - TRUSTPAY, - PAYME, PAYPAL, + BANKOFAMERICA, + BLUESNAP, + CHECKOUT, CRYPTOPAY, IATAPAY, + PAYME, + TRUSTPAY, + ZEN, ] let getPaymentMethodFromString = paymentMethod => {