repo
stringclasses
4 values
file_path
stringlengths
6
193
extension
stringclasses
30 values
content
stringlengths
0
5.21M
token_count
int64
0
3.8M
hyperswitch-web
src/Payments/Boleto.res
.res
open RecoilAtoms open Utils let cleanSocialSecurityNumber = socialSecurityNumber => socialSecurityNumber->String.replaceRegExp(%re("/\D+/g"), "") let formatSocialSecurityNumber = socialSecurityNumber => { let formatted = socialSecurityNumber->cleanSocialSecurityNumber let firstPart = formatted->CardUtils.slice(...
959
hyperswitch-web
src/Payments/SepaBankDebit.res
.res
open RecoilAtoms open Utils open PaymentModeType @react.component let make = (~paymentType: CardThemeType.mode) => { let (requiredFieldsBody, setRequiredFieldsBody) = React.useState(_ => Dict.make()) let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) let isManualRetryEnabled = Recoil.useRecoilValueFrom...
680
hyperswitch-web
src/Payments/AddBankDetails.res
.res
module Loader = { @react.component let make = () => { let {themeObj} = Recoil.useRecoilValueFromAtom(RecoilAtoms.configAtom) <div className="w-full flex items-center justify-center"> <div className="w-8 h-8 animate-spin" style={color: themeObj.colorTextSecondary}> <Icon size=28 name="loader" /...
1,000
hyperswitch-web
src/Payments/SepaBankDebit.resi
.resi
@react.component let default: (~paymentType: CardThemeType.mode) => React.element
20
hyperswitch-web
src/Payments/BecsBankDebit.res
.res
open RecoilAtoms open RecoilAtomTypes open Utils @react.component let make = (~paymentType: CardThemeType.mode) => { let cleanBSB = str => str->String.replaceRegExp(%re("/-/g"), "") let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) let setComplete = Recoil.useSetRecoilState(fieldsComplete) let {them...
899
hyperswitch-web
src/Payments/ACHBankTransfer.res
.res
open RecoilAtoms open Utils @react.component let make = (~paymentType: CardThemeType.mode) => { let {iframeId} = Recoil.useRecoilValueFromAtom(keys) let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isManualRetryEnabled) let {themeObj} = Recoil...
495
hyperswitch-web
src/Payments/PaymentRequestButtonElement.res
.res
type wallet = GPayWallet | PaypalWallet | ApplePayWallet | KlarnaWallet | SamsungPayWallet | PazeWallet | NONE let paymentMode = str => { switch str { | "gpay" | "google_pay" => GPayWallet | "paypal" => PaypalWallet | "applepay" | "apple_pay" => ApplePayWallet | "samsungpay" | "samsung_pay" =>...
1,514
hyperswitch-web
src/Payments/GPayLazy.res
.res
let make = React.lazy_(() => Js.import(GPay.default))
14
hyperswitch-web
src/Payments/ApplePay.res
.res
open Utils open Promise @react.component let make = (~sessionObj: option<JSON.t>, ~walletOptions, ~paymentType: CardThemeType.mode) => { let url = RescriptReactRouter.useUrl() let componentName = CardUtils.getQueryParamsDictforKey(url.search, "componentName") let loggerState = Recoil.useRecoilValueFromAtom(Recoil...
2,669
hyperswitch-web
src/Payments/BacsBankDebit.resi
.resi
@react.component let default: (~paymentType: CardThemeType.mode) => React.element
20
hyperswitch-web
src/Payments/PlaidSDKIframe.res
.res
@react.component let make = () => { open Utils let (linkToken, setLinkToken) = React.useState(_ => "") let (isReady, setIsReady) = React.useState(_ => false) let (pmAuthConnectorsArr, setPmAuthConnectorsArr) = React.useState(_ => []) let (publishableKey, setPublishableKey) = React.useState(_ => "") let (cl...
1,062
hyperswitch-web
src/Payments/PayPalHelpers.res
.res
open PaymentMethodsRecord open SessionsType type paypalExperienceData = { paypalToken: optionalTokenType, isPaypalSDKFlow: bool, isPaypalRedirectFlow: bool, } let usePaymentMethodExperience = (~paymentMethodListValue, ~sessionObj: sessions) => { let paypalPaymentMethodExperience = React.useMemo(() => { ge...
212
hyperswitch-web
src/Payments/PreMountLoader.res
.res
let sendPromiseData = (promise, key) => { let executePromise = async () => { let response = try { await promise } catch { | _ => JSON.Encode.null } Utils.messageParentWindow([("response", response), ("data", key->JSON.Encode.string)]) } executePromise()->ignore } let useMessageHandler =...
944
hyperswitch-web
src/Payments/InstantBankTransferLazy.res
.res
let make = React.lazy_(() => Js.import(InstantBankTransfer.default))
16
hyperswitch-web
src/Payments/KlarnaCheckout.res
.res
open RecoilAtoms open Promise let klarnaIcon = <Icon size=35 width=90 name="klarna" /> @react.component let make = () => { let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) let sdkHandleIsThere = Recoil.useRecoilValueFromAtom(isPaymentButtonHandlerProvidedAtom) let {publishableKey} = Recoil.useRecoilV...
655
hyperswitch-web
src/Payments/VoucherDisplay.res
.res
open Utils @react.component let make = () => { let (openModal, setOpenModal) = React.useState(_ => false) let (returnUrl, setReturnUrl) = React.useState(_ => "") let (downloadUrl, setDownloadUrl) = React.useState(_ => "") let (reference, setReference) = React.useState(_ => "") let logger = Recoil.useRecoilVal...
966
hyperswitch-web
src/Payments/SepaBankTransferLazy.res
.res
let make = React.lazy_(() => Js.import(SepaBankTransfer.default))
17
hyperswitch-web
src/Payments/PayPal.resi
.resi
@react.component let default: (~paymentType: CardThemeType.mode, ~walletOptions: array<string>) => React.element
27
hyperswitch-web
src/Payments/PayPal.res
.res
open RecoilAtoms module Loader = { @react.component let make = () => { <div className="w-8 h-8 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600"> <Icon size=32 name="loader" /> </div> } } let payPalIcon = <Icon size=35 width=90 name="paypal" /> @react.component let make = (~paymentType,...
1,336
hyperswitch-web
src/Payments/ACHBankDebit.res
.res
open RecoilAtoms open Utils open PaymentModeType @react.component let make = (~paymentType: CardThemeType.mode) => { let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom) let {displaySavedPaymentMethods} = Recoil.useRecoilValueFromAtom(optionAtom) let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isM...
1,168
hyperswitch-web
src/Payments/SepaBankTransfer.res
.res
open RecoilAtoms open Utils @react.component let make = (~paymentType) => { let {iframeId} = Recoil.useRecoilValueFromAtom(keys) let loggerState = Recoil.useRecoilValueFromAtom(loggerAtom) let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom) let isManualRetryEnabled = Recoil.useRecoilValueFromAtom(isManu...
502
hyperswitch-web
src/Payments/PaypalSDK.resi
.resi
@react.component let default: (~sessionObj: SessionsType.token, ~paymentType: CardThemeType.mode) => React.element
28
hyperswitch-web
src/hyper-log-catcher/ReusableReactSuspense.res
.res
@react.component let make = (~children, ~loaderComponent, ~componentName) => { let {publishableKey} = Recoil.useRecoilValueFromAtom(RecoilAtoms.keys) <ErrorBoundary level=ErrorBoundary.PaymentMethod componentName publishableKey> <React.Suspense fallback={loaderComponent}> {children} </React.Suspense> </ErrorB...
83
hyperswitch-web
src/hyper-log-catcher/HyperLogger.res
.res
type apiLogType = Request | Response | NoResponse | Method | Err type logType = DEBUG | INFO | ERROR | WARNING | SILENT type logCategory = API | USER_ERROR | USER_EVENT | MERCHANT_EVENT type eventName = | APP_RENDERED | PAYMENT_METHOD_CHANGED | PAYMENT_DATA_FILLED | PAYMENT_ATTEMPT | PAYMENT_SUCCESS | PAYM...
6,584
hyperswitch-web
src/hyper-log-catcher/ErrorBoundary.res
.res
type errorLevel = Top | RequestButton | PaymentMethod let errorIcon = { <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 512 512" id="dead-ghost"> <path fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="16" ...
2,883
hyperswitch-web
src/hyper-log-catcher/Sentry.res
.res
type integration type scope type instrumentation type tag = {mutable tag: string} type hint = {originalException: tag} external toJson: Exn.t => tag = "%identity" external toExn: tag => Exn.t = "%identity" type event type sentryInitArg = { dsn: string, integrations: array<integration>, tracesSampleRate: float, ...
716
hyperswitch-web
src/Hooks/OutsideClick.res
.res
@send external contains: (Dom.element, {..}) => bool = "contains" type ref = | ArrayOfRef(array<React.ref<Nullable.t<Dom.element>>>) | RefArray(React.ref<array<Nullable.t<Dom.element>>>) let useOutsideClick = ( ~refs: ref, ~containerRefs: option<React.ref<Nullable.t<Dom.element>>>=?, ~isActive, ~events=["...
536
hyperswitch-web
src/Hooks/PortalState.res
.res
let defaultDict: Dict.t<Dom.element> = Dict.make()
14
hyperswitch-web
src/Hooks/UtilityHooks.res
.res
let useIsGuestCustomer = () => { let {customerPaymentMethods} = RecoilAtoms.optionAtom->Recoil.useRecoilValueFromAtom React.useMemo(() => { switch customerPaymentMethods { | LoadedSavedCards(_, false) | NoResult(false) => false | _ => true } }, [customerPaymentMethods]) } let useHandlePostMe...
620
hyperswitch-web
src/Hooks/CommonHooks.res
.res
type contentRect = {height: float} type element = { mutable getAttribute: string => string, mutable src: string, mutable async: bool, mutable rel: string, mutable href: string, mutable \"as": string, mutable crossorigin: string, mutable \"type": string, mutable id: string, mutable width: string, ...
1,089
hyperswitch-web
src/Utilities/PaymentHelpers.res
.res
open Utils open Identity open PaymentHelpersTypes open LoggerUtils open URLModule let getPaymentType = paymentMethodType => switch paymentMethodType { | "apple_pay" => Applepay | "samsung_pay" => Samsungpay | "google_pay" => Gpay | "paze" => Paze | "debit" | "credit" | "" => Card | _ => Other }...
16,397
hyperswitch-web
src/Utilities/RecoilAtoms.res
.res
open RecoilAtomTypes let keys = Recoil.atom("keys", CommonHooks.defaultkeys) let configAtom = Recoil.atom("defaultRecoilConfig", CardTheme.defaultRecoilConfig) let portalNodes = Recoil.atom("portalNodes", PortalState.defaultDict) let elementOptions = Recoil.atom("elementOptions", ElementType.defaultOptions) let option...
1,243
hyperswitch-web
src/Utilities/PmAuthConnectorUtils.res
.res
type pmAuthConnector = PLAID | NONE type isPmAuthConnectorReady = {plaid: bool} let pmAuthNameToTypeMapper = authConnectorName => { switch authConnectorName { | "plaid" => PLAID | _ => NONE } } let pmAuthConnectorToScriptUrlMapper = authConnector => { switch authConnector { | PLAID => "https://cdn.plaid.co...
631
hyperswitch-web
src/Utilities/Phone_number.json
.json
{ "countries": [ { "country_code": "AF", "country_name": "Afghanistan", "country_flag": "🇦🇫", "phone_number_code": "+93", "validation_regex": "^(\\+?93)?\\d{9}$", "format_example": "0701234567", "format_regex": "^\\d{10}$" }, { "country_code": "AL", ...
22,179
hyperswitch-web
src/Utilities/SamsungPayHelpers.res
.res
open SamsungPayType open Utils let getTransactionDetail = dict => { let amountDict = dict->getDictFromDict("amount") let merchantDict = dict->getDictFromDict("merchant") { orderNumber: dict->getString("order_number", ""), amount: { option: amountDict->getString("option", ""), currency: amount...
884
hyperswitch-web
src/Utilities/Identity.res
.res
external anyTypeToJson: 'a => JSON.t = "%identity" external unsafeToJsExn: exn => Exn.t = "%identity" external jsonToNullableJson: JSON.t => Nullable.t<JSON.t> = "%identity"
50
hyperswitch-web
src/Utilities/ApiEndpoint.res
.res
let switchToInteg = false let isLocal = false let sdkDomainUrl = `${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}` let apiEndPoint: ref<option<string>> = ref(None) let setApiEndPoint = str => { apiEndPoint := Some(str) } let getApiEndPoint = (~publishableKey="", ~isConfirmCall=false) => { let testMode = publish...
226
hyperswitch-web
src/Utilities/ErrorUtils.res
.res
type type_ = Error | Warning type stringType = Dynamic(string => string) | Static(string) type error = array<(HyperLogger.eventName, type_, string)> open HyperLogger let errorWarning = [ ( INVALID_PK, Error, Static( "INTEGRATION ERROR: Invalid Publishable key, starts with pk_dev_(development), pk...
1,023
hyperswitch-web
src/Utilities/PaymentUtils.res
.res
let paymentMethodListValue = Recoil.atom("paymentMethodListValue", PaymentMethodsRecord.defaultList) let paymentListLookupNew = ( list: PaymentMethodsRecord.paymentMethodList, ~order, ~isShowPaypal, ~isShowKlarnaOneClick, ~isKlarnaSDKFlow, ~paymentMethodListValue: PaymentMethodsRecord.paymentMethodList, ...
4,903
hyperswitch-web
src/Utilities/PaymentHelpersTypes.res
.res
type payment = | Card | BankTransfer | BankDebits | KlarnaRedirect | Gpay | Applepay | Paypal | Samsungpay | Paze | Other type paymentIntent = ( ~handleUserError: bool=?, ~bodyArr: array<(string, JSON.t)>, ~confirmParam: ConfirmType.confirmParams, ~iframeId: string=?, ~isThirdPartyFlow: b...
181
hyperswitch-web
src/Utilities/EventListenerManager.res
.res
type sessionStorage @val external sessionStorage: sessionStorage = "sessionStorage" @send external setItem: (sessionStorage, string, 'a => unit) => unit = "setItem" let eventListenerMap: Dict.t<Types.event => unit> = Dict.make() let addSmartEventListener = (type_, handlerMethod: Types.event => unit, activity) => { ...
125
hyperswitch-web
src/Utilities/Utils.res
.res
@val external document: 'a = "document" @val external window: Dom.element = "window" @val @scope("window") external iframeParent: Dom.element = "parent" @send external body: ('a, Dom.element) => Dom.element = "body" @val @scope("window") external topParent: Dom.element = "top" type event = {data: string} external dict...
11,031
hyperswitch-web
src/Utilities/DynamicFieldsUtils.res
.res
open RecoilAtoms let dynamicFieldsEnabledPaymentMethods = [ "crypto_currency", "debit", "credit", "blik", "google_pay", "apple_pay", "bancontact_card", "open_banking_uk", "eps", "ideal", "sofort", "pix_transfer", "giropay", "local_bank_transfer_transfer", "afterpay_clearpay", "mifinity"...
9,811
hyperswitch-web
src/Utilities/GooglePayHelpers.res
.res
open Utils let getGooglePayBodyFromResponse = ( ~gPayResponse, ~isGuestCustomer, ~paymentMethodListValue=PaymentMethodsRecord.defaultList, ~connectors, ~requiredFields=[], ~stateJson, ~isPaymentSession=false, ~isSavedMethodsFlow=false, ) => { let obj = gPayResponse->getDictFromJson->GooglePayType.ite...
1,487
hyperswitch-web
src/Utilities/LoggerUtils.res
.res
let logApi = ( ~eventName, ~statusCode="", ~data: JSON.t=Dict.make()->JSON.Encode.object, ~apiLogType: HyperLogger.apiLogType, ~url="", ~paymentMethod="", ~result: JSON.t=Dict.make()->JSON.Encode.object, ~optLogger: option<HyperLogger.loggerMake>, ~logType: HyperLogger.logType=INFO, ~logCategory: Hy...
483
hyperswitch-web
src/Utilities/TaxCalculation.res
.res
open Utils type calculateTaxResponse = { payment_id: string, net_amount: int, order_tax_amount: int, shipping_cost: int, } let taxResponseToObjMapper = resp => { resp ->JSON.Decode.object ->Option.map(dict => { payment_id: dict->getString("payment_id", ""), net_amount: dict->getInt("net_amount",...
226
hyperswitch-web
src/Utilities/URLModule.res
.res
type match type pathname = {match: match} type searchParams = {set: (string, string) => unit} type url = {searchParams: searchParams, href: string, pathname: pathname} @new external makeUrl: string => url = "URL"
57
hyperswitch-web
src/Utilities/PaymentBody.res
.res
let billingDetailsTuple = ( ~fullName, ~email, ~line1, ~line2, ~city, ~state, ~postalCode, ~country, ) => { let (firstName, lastName) = fullName->Utils.getFirstAndLastNameFromFullName ( "billing", [ ("email", email->JSON.Encode.string), ( "address", [ (...
7,473
hyperswitch-web
src/Utilities/ApplePayHelpers.res
.res
open ApplePayTypes open Utils open TaxCalculation let processPayment = ( ~bodyArr, ~isThirdPartyFlow=false, ~isGuestCustomer, ~paymentMethodListValue=PaymentMethodsRecord.defaultList, ~intent: PaymentHelpersTypes.paymentIntent, ~options: PaymentType.options, ~publishableKey, ~isManualRetryEnabled, ) =>...
2,603
hyperswitch-web
src/Utilities/TestUtils.res
.res
let paymentMethodListTestId = "paymentList" let paymentMethodDropDownTestId = "paymentMethodsSelect" let cardNoInputTestId = "cardNoInput" let expiryInputTestId = "expiryInput" let cardCVVInputTestId = "cvvInput" let cardHolderNameInputTestId = "BillingName" let fullNameInputTestId = "FullName" let emailInputTestId = "...
434
hyperswitch-web
src/Utilities/PaymentMethodCollectUtils.res
.res
open CardUtils open ErrorUtils open PaymentMethodCollectTypes open Utils type t = Dict.t<JSON.t> // Function to get a nested value let getNestedValue = (dict: t, key: string): option<JSON.t> => { let keys = String.split(key, ".") let length = Array.length(keys) let rec traverse = (currentDict, index): option<J...
8,482
hyperswitch-client-core
metro.config.js
.js
const {getDefaultConfig} = require('@react-native/metro-config'); // const exclusionList = require('metro-config/src/defaults/exclusionList'); /** * Metro configuration * https://facebook.github.io/metro/docs/configuration * * @type {import('@react-native/metro-config').MetroConfig} */ const defaultConfig = getD...
113
hyperswitch-client-core
tsconfig.json
.json
{ "extends": "@react-native/typescript-config/tsconfig.json", "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "b...
172
hyperswitch-client-core
package.json
.json
{ "name": "hyperswitch", "version": "1.1.3", "private": true, "scripts": { "start": "react-native start --reset-cache", "server": "node server.js", "re:start": "rescript build -w", "re:format": "rescript format -all", "web": "NODE_ENV=development webpack serve --mode=development --config rea...
2,497
hyperswitch-client-core
lefthook.yml
.yml
# EXAMPLE USAGE: # # Refer for explanation to following link: # https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md # # pre-push: # commands: # packages-audit: # tags: frontend security # run: yarn audit # gems-audit: # tags: backend security # run: bundle au...
241
hyperswitch-client-core
CHANGELOG.md
.md
## [1.1.3](https://github.com/juspay/hyperswitch-client-core/compare/v1.1.2...v1.1.3) (2025-04-29) ### Bug Fixes * state field error msg fix ([#269](https://github.com/juspay/hyperswitch-client-core/issues/269)) ([d8f8bd7](https://github.com/juspay/hyperswitch-client-core/commit/d8f8bd70736a159daa42f9fc4a3dc37db4f7c...
11,400
hyperswitch-client-core
SECURITY.md
.md
# Security Policy ## Reporting a security issue The hyperswitch project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via the [advisories page on GitHub][report-vulnerability] or by email at [hyperswitch@juspay.in](mailto...
117
hyperswitch-client-core
LICENSE
none
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and d...
2,252
hyperswitch-client-core
server.js
.js
const express = require('express'); const cors = require('cors'); const app = express(); app.use(cors()); app.use(express.static('./dist')); app.use(express.json()); require('dotenv').config({path: './.env'}); const PORT = 5252; async function createPaymentIntent(request) { try { const url = process.env....
1,092
hyperswitch-client-core
rescript.json
.json
{ "name": "hyperswitch", "jsx": {"version": 4}, "package-specs": { "module": "esmodule", "in-source": true }, "bsc-flags": ["-bs-super-errors","-open RescriptCore"], "suffix": ".bs.js", "sources": [ { "dir": "src", "subdirs": true }, { "dir": "reactNativeWeb", "...
167
hyperswitch-client-core
react-native.config.js
.js
module.exports = { assets: ['./assets/fonts/'], project: { android: { appName: 'demo-app', }, }, };
32
hyperswitch-client-core
Gemfile
none
source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" # Exclude problematic versions of cocoapods and activesupport that causes build failures. gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'...
186
hyperswitch-client-core
app.json
.json
{ "name": "hyperSwitch", "displayName": "hyperswitch", "headless": "HyperHeadless" }
29
hyperswitch-client-core
README.md
.md
# Hyperswitch Client Core This repository hosts the essential components of the Hyperswitch SDK, which supports various platforms. Directly cloning this repository allows immediate access to a web-compatible version of the SDK. > **Important:** The official Hyperswitch Web SDK is maintained separately. Visit [this li...
745
hyperswitch-client-core
index.js
.js
import {AppRegistry} from 'react-native'; import NewApp from './src/routes/Update'; import {name as appName, headless} from './app.json'; import {registerHeadless} from './src/headless/Headless.bs'; AppRegistry.registerComponent(appName, () => NewApp); registerHeadless(headless);
68
hyperswitch-client-core
App.js
.js
export {make as default} from './src/routes/App.bs.js'; // import {ActivityIndicator, View} from 'react-native'; // export default App = props => { // return ( // <View // style={{ // backgroundColor: // props.props.type == 'card' ? 'transparent' : '#00000070', // flex: 1, // ...
111
hyperswitch-client-core
babel.config.js
.js
module.exports = { presets: ['module:@react-native/babel-preset'], plugins: ['module:react-native-dotenv'], };
29
hyperswitch-client-core
__tests__/App-test.tsx
.tsx
/** * @format */ import 'react-native'; import React from 'react'; import App from '../App'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { renderer.create(<App />); });
59
hyperswitch-client-core
ota/ios.config.json
.json
{ "config": { "target_platform": "ios", "target_version": "0.2.4", "release_tag_version": "v1.0.6", "release_env": "prod" } }
51
hyperswitch-client-core
ota/Readme.md
.md
# OTA Configuration Guide Explanation of Configuration Keys - `enable_ota_updates` → Enables or disables OTA updates. When `false`, only Release Config (RC) is updated. `(Optional)` `(default - true)` - `target_platform` → Specifies the platform for the update (`android` or `ios`). - `target_version` → Defines the ...
238
hyperswitch-client-core
ota/android.config.json
.json
{ "config": { "target_platform": "android", "target_version": "1.1.2", "release_tag_version": "v1.0.6", "release_env": "prod" } }
51
hyperswitch-client-core
ota/config.json
.json
{ "config": { "version": "v1", "release_config_timeout": 10000, "package_timeout": 10000, "properties": {} }, "package": { "name": "sdk", "version": "v1.0.0", "properties": { "manifest": {}, "manifest_hash": {} }, "index": "", "splits": [] }, "resources": {}...
107
hyperswitch-client-core
patches/@react-native+assets-registry+0.75.4.patch
.patch
diff --git a/node_modules/@react-native/assets-registry/registry.js b/node_modules/@react-native/assets-registry/registry.js index 02470da..3851d92 100644 --- a/node_modules/@react-native/assets-registry/registry.js +++ b/node_modules/@react-native/assets-registry/registry.js @@ -10,28 +10,15 @@ 'use strict'; -exp...
299
hyperswitch-client-core
scripts/pushToS3.js
.js
const { run } = require("./prepareS3.js"); const { version } = require("../reactNativeWeb/version.json"); const path = require("path"); const BASE_PATH = "mobile"; let params = { s3Bucket: process.env.BUCKET_NAME, distributionId: process.env.DIST_ID, urlPrefix: `v${version.split(".")[0]}`, version: `${BASE_PAT...
116
hyperswitch-client-core
scripts/prepareS3.js
.js
const { PutObjectCommand } = require("@aws-sdk/client-s3"); const { CreateInvalidationCommand, GetDistributionConfigCommand, UpdateDistributionCommand, GetInvalidationCommand, CloudFrontClient, } = require("@aws-sdk/client-cloudfront"); const FileSystem = require("fs"); const { globSync } = require("fast-glob...
1,516
hyperswitch-client-core
detox-tests/tsconfig.json
.json
{ "compilerOptions": { "target": "ES2022", "module": "commonjs", }, "include": ["**/*.ts"] }
42
hyperswitch-client-core
detox-tests/package.json
.json
{ "name": "detox-tests", "version": "1.0.0", "main": "e2e/jest.config.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "description": "", "devDependencies": { "@types/jest": "^29.5.14", "@types/node": "^22.10.2", "ts-jest": "^29...
139
hyperswitch-client-core
detox-tests/babel.config.js
.js
module.exports = { presets: [ '@babel/preset-env', // Handles modern JavaScript features like `export` ], plugins: [ '@babel/plugin-transform-modules-commonjs', // Transforms ES modules to CommonJS for Jest compatibility ], };
54
hyperswitch-client-core
detox-tests/e2e/card-flow-e2e.test.ts
.ts
import * as testIds from "../../src/utility/test/TestUtils.bs.js"; import { device } from "detox" import { visaSandboxCard, LAUNCH_PAYMENT_SHEET_BTN_TEXT } from "../fixtures/Constants" import { waitForVisibility, typeTextInInput } from "../utils/DetoxHelpers" describe('card-flow-e2e-test', () => { jest.retryTimes(6);...
476
hyperswitch-client-core
detox-tests/e2e/jest.config.js
.js
/** @type {import('@jest/types').Config.InitialOptions} */ module.exports = { preset: 'ts-jest', rootDir: '..', testMatch: ['<rootDir>/e2e/**/*.test.ts'], testTimeout: 1200000, maxWorkers: 1, globalSetup: 'detox/runners/jest/globalSetup', globalTeardown: 'detox/runners/jest/globalTeardown', reporters: [...
171
hyperswitch-client-core
detox-tests/fixtures/Constants.ts
.ts
type card = { cardNumber: string, expiryDate: string, cvc: string, } export const visaSandboxCard = { cardNumber: "4242424242424242", expiryDate: "04/44", cvc: "123" } export const LAUNCH_PAYMENT_SHEET_BTN_TEXT = "Launch Payment Sheet"
86
hyperswitch-client-core
detox-tests/utils/DetoxHelpers.ts
.ts
const DEFAULT_TIMEOUT = 10000; export async function waitForVisibility(element: Detox.IndexableNativeElement, timeout = DEFAULT_TIMEOUT) { await waitFor(element) .toBeVisible() .withTimeout(timeout); } export async function typeTextInInput(element: Detox.IndexableNativeElement, text: string) { ...
94
hyperswitch-client-core
src/routes/App.res
.res
open ReactNative open Style module ContextWrapper = { @react.component let make = (~props, ~rootTag, ~children) => { <NativePropContext nativeProp={SdkTypes.nativeJsonToRecord(props, rootTag)}> <LocaleStringDataContext> <CountryStateDataContext> <ViewportContext> <LoadingCon...
288
hyperswitch-client-core
src/routes/NavigatorRouter.res
.res
@react.component let make = () => { let (nativeProp, _) = React.useContext(NativePropContext.nativePropContext) let retrievePayment = AllPaymentHooks.useRetrieveHook() let getSessionToken = AllPaymentHooks.useSessionToken() let savedPaymentMethods = AllPaymentHooks.useGetSavedPMHook() let (allApiData, setAll...
1,004
hyperswitch-client-core
src/routes/AppExports.js
.js
export {make as default} from './App.bs.js'; // import {ActivityIndicator, View} from 'react-native'; // export default App = props => { // return ( // <View // style={{ // backgroundColor: // props.props.type == 'card' ? 'transparent' : '#00000070', // flex: 1, // justif...
109
hyperswitch-client-core
src/routes/NavigatorRouterParent.res
.res
@react.component let make = () => { let (nativeProp, _) = React.useContext(NativePropContext.nativePropContext) switch nativeProp.sdkState { | PaymentMethodsManagement => <PMMangementNavigatorRouter /> | _ => <NavigatorRouter /> } }
60
hyperswitch-client-core
src/routes/PMMangementNavigatorRouter.res
.res
@react.component let make = () => { let (nativeProp, _) = React.useContext(NativePropContext.nativePropContext) let (allApiData, setAllApiData) = React.useContext(AllApiDataContext.allApiDataContext) let showErrorOrWarning = ErrorHooks.useShowErrorOrWarning() let savedPaymentMethods = AllPaymentHooks.useGetSave...
381
hyperswitch-client-core
src/routes/GlobalConfirmButton.res
.res
open ReactNative @react.component let make = (~confirmButtonDataRef) => { <View> {confirmButtonDataRef} </View> }
33
hyperswitch-client-core
src/routes/ParentPaymentSheet.res
.res
open SDKLoadCheckHook module SdkLoadingScreen = { @react.component let make = () => { <> <Space height=20. /> <CustomLoader height="38" /> <Space height=8. /> <CustomLoader height="38" /> <Space height=50. /> <CustomLoader height="38" /> </> } } @react.component let ma...
457
hyperswitch-client-core
src/routes/Update.js
.js
import React from 'react'; import App from './AppExports.js'; import { sentryReactNative, initiateSentry, } from '../components/modules/Sentry.bs.js'; const NewApp = props => { return ( <App props={props.props} rootTag={props.rootTag} /> ); }; const SentryApp = React.memo(props => { init...
117
hyperswitch-client-core
src/routes/FullScreenSheetWrapper.res
.res
open ReactNative open Style @react.component let make = (~children) => { let (loading, setLoading) = React.useContext(LoadingContext.loadingContext) let handleSuccessFailure = AllPaymentHooks.useHandleSuccessFailure() let onModalClose = React.useCallback0(() => { setLoading(PaymentCancelled) setTimeout(...
495
hyperswitch-client-core
src/types/PaymentConfirmTypes.res
.res
// type redirectToUrl = { // returnUrl: string, // url: string, // } type pollConfig = { pollId: string, delayInSecs: int, frequency: int, } type threeDsData = { threeDsAuthenticationUrl: string, threeDsAuthorizeUrl: string, messageVersion: string, directoryServerId: string, pollConfig: pollConfig,...
968
hyperswitch-client-core
src/types/Types.res
.res
type redirectTypeJson = { name: string, text: string, header: string, fields: array<string>, } type retrieve = Payment | List let defaultRedirectType = { name: "", text: "", header: "", fields: [], } type config = { priorityArr: array<string>, redirectionList: array<redirectTypeJson>, } let defau...
582
hyperswitch-client-core
src/types/ConfirmButtonType.res
.res
type setChildRef = ( ~isAllValuesValid: bool, ~handlePress: ReactNative.Event.pressEvent => unit, ~hasSomeFields: bool=?, ~paymentMethod: string, ~paymentExperience: PaymentMethodListType.payment_experience_type=?, unit, ) => unit
65
hyperswitch-client-core
src/types/RequiredFieldsTypes.res
.res
@val external importStatesAndCountries: string => promise<JSON.t> = "import" type addressCountry = UseContextData | UseBackEndData(array<string>) type payment_method_types_in_bank_debit = BECS | Other type paymentMethodsFields = | Email | FullName | InfoElement | Country | Bank | SpecialField(React.elemen...
4,910
hyperswitch-client-core
src/types/NativeSdkPropsKeys.res
.res
type keys = { locale: string, colors: string, light: string, dark: string, primary: string, background: string, componentBackground: string, componentBorder: string, componentDivider: string, componentText: string, primaryText: string, secondaryText: string, placeholderText: string, icon: st...
1,785
hyperswitch-client-core
src/types/SessionsType.res
.res
open SdkTypes type samsungPaySession = { wallet_name: string, version: string, service_id: string, order_number: string, merchant: JSON.t, amount: JSON.t, protocol: string, allowed_brands: array<JSON.t>, } type sessions = { wallet_name: payment_method_type_wallet, session_token: string, session_...
922
hyperswitch-client-core
src/types/SamsungPayType.res
.res
open Utils type payment3DS = { \"type": string, version: string, data: string, } type addressType = BILLING_ADDRESS | SHIPPING_ADDRESS type addressCollectedFromSpay = {billingDetails?: string, shippingDetails?: string} type paymentCredential = { \"3_d_s": payment3DS, card_brand: string, card_last4digits:...
764
hyperswitch-client-core
src/types/LocaleDataType.res
.res
type localeStrings = { locale: string, cardDetailsLabel: string, cardNumberLabel: string, localeDirection: string, inValidCardErrorText: string, unsupportedCardErrorText: string, inCompleteCVCErrorText: string, inValidCVCErrorText: string, inCompleteExpiryErrorText: string, inValidExpiryErrorText: s...
1,676
hyperswitch-client-core
src/types/GooglePayTypeNew.res
.res
open SdkTypes open Utils type merchantInfo = { merchantId: string, merchantName: string, } type allowedPaymentMethodsParameters = { allowedAuthMethods: array<string>, allowedCardNetworks: array<string>, billingAddressRequired: bool, } type tokenizationSpecificationParameters = { gateway: string, gatewa...
2,772