repo stringclasses 4
values | file_path stringlengths 6 193 | extension stringclasses 23
values | content stringlengths 0 1.73M | token_count int64 0 724k | __index_level_0__ int64 0 10.8k |
|---|---|---|---|---|---|
hyperswitch-web | Dockerfile | none | FROM node:20-alpine
# Add build essentials
RUN apk add --no-cache make gcc g++ python3
WORKDIR /usr/src/app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install --ignore-scripts
# Copy the rest of the application code
COPY . .
# First, build ReScript code and wait for it to complete
R... | 144 | 10,221 |
hyperswitch-web | package.json | .json | {
"name": "orca-payment-page",
"version": "0.121.2",
"main": "index.js",
"private": true,
"dependencies": {
"@glennsl/rescript-fetch": "^0.2.0",
"@rescript/core": "^0.7.0",
"@rescript/react": "^0.12.1",
"@sentry/react": "^9.9.0",
"@sentry/webpack-plugin": "^3.2.2",
"react": "^18.2.0",
... | 1,528 | 10,222 |
hyperswitch-web | CHANGELOG.md | .md | ## [0.121.2](https://github.com/juspay/hyperswitch-web/compare/v0.121.1...v0.121.2) (2025-03-28)
### Bug Fixes
* bancontact confirm payload ([#976](https://github.com/juspay/hyperswitch-web/issues/976)) ([bd5b5b1](https://github.com/juspay/hyperswitch-web/commit/bd5b5b1376aac14422af989bebe9c976ce3b4b05))
## [0.121.... | 68,030 | 10,223 |
hyperswitch-web | postcss.config.js | .js | module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
| 22 | 10,224 |
hyperswitch-web | 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 | 10,225 |
hyperswitch-web | 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,
... | 2,272 | 10,226 |
hyperswitch-web | rescript.json | .json | {
"$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json",
"name": "orca-payment-page",
"jsx": {
"version": 4,
"mode": "classic"
},
"bsc-flags": ["-bs-super-errors", "-open RescriptCore"],
"sources": {
"dir": "src",
"subdirs": true
... | 174 | 10,227 |
hyperswitch-web | webpack.dev.js | .js | const path = require("path");
require("dotenv").config();
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const sdkEnv = process.env.sdkEnv ?? "local";
const endpointMap = {
prod: "https://api.hyperswitch.io/payments",
sandbox: "https://sandbox.hyperswitch.io/payments",
... | 338 | 10,228 |
hyperswitch-web | webpack.common.js | .js | const webpack = require("webpack");
const path = require("path");
const dotenv = require("dotenv").config();
const tailwindcss = require("tailwindcss");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plu... | 1,592 | 10,229 |
hyperswitch-web | tailwind.config.js | .js | const plugin = require("tailwindcss/plugin");
const defaultTheme = require("tailwindcss/defaultTheme");
module.exports = {
darkMode: "class",
content: ["./src/**/*.js"],
theme: {
fontFamily: {
"ibm-plex": '"IBM Plex Sans"',
"ibm-plex-mono": '"IBM Plex Mono"',
"fira-code": '"Fira Code"',
... | 2,784 | 10,230 |
hyperswitch-web | README.md | .md | <p align="center">
<img src="./docs/imgs/hyperswitch-logo-dark.svg#gh-dark-mode-only" alt="Hyperswitch-Logo" width="40%" />
<img src="./docs/imgs/hyperswitch-logo-light.svg#gh-light-mode-only" alt="Hyperswitch-Logo" width="40%" />
</p>
<h1 align="center">Hyperswitch Unified Checkout</h1>
<div align="center" >
<i>... | 3,825 | 10,231 |
hyperswitch-web | index.js | .js | export { app as default } from "./src/Index.bs";
| 12 | 10,232 |
hyperswitch-web | package-lock.json | .json | {
"name": "orca-payment-page",
"version": "0.121.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "orca-payment-page",
"version": "0.121.2",
"hasInstallScript": true,
"dependencies": {
"@glennsl/rescript-fetch": "^0.2.0",
"@rescript/core": "^0... | 244,239 | 10,233 |
hyperswitch-web | Hyperswitch-React-Demo-App/Dockerfile | none |
FROM node:18-alpine
WORKDIR /usr/src/app
COPY package*.json ./
COPY . .
RUN yarn install
RUN yarn build
CMD [ "yarn" ,"start-server" ]
| 45 | 10,234 |
hyperswitch-web | Hyperswitch-React-Demo-App/promptScript.js | .js | const fs = require("fs");
const prompt = require("prompt-sync")({ sigint: true });
const envPath = "./.env";
const obj = {
HYPERSWITCH_PUBLISHABLE_KEY: "Publishable Key",
HYPERSWITCH_SECRET_KEY: "Secret Key",
HYPERSWITCH_SERVER_URL:
"Self-hosted Hyperswitch Server URL (URL of your Hyperswitch Backend)",
H... | 415 | 10,235 |
hyperswitch-web | Hyperswitch-React-Demo-App/package.json | .json | {
"name": "react-cra",
"version": "0.1.0",
"private": true,
"dependencies": {
"@juspay-tech/hyper-js": "^1.6.0",
"@juspay-tech/react-hyper-js": "^1.0.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^14.4.2",
"body-parser": ... | 614 | 10,236 |
hyperswitch-web | Hyperswitch-React-Demo-App/server.js | .js | const fetch = require("node-fetch");
const express = require("express");
const { resolve } = require("path");
const dotenv = require("dotenv");
dotenv.config({ path: "./.env" });
const app = express();
const PORT = 5252;
function getUrl(envVar, selfHostedValue) {
return process.env[envVar] === selfHostedValue ? "" ... | 964 | 10,237 |
hyperswitch-web | Hyperswitch-React-Demo-App/webpack.dev.js | .js | const path = require("path");
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const devServer = {
static: {
directory: path.join(__dirname, "dist"),
},
hot: true,
host: "0.0.0.0",
port: 9060,
historyApiFallback: true,
proxy: [
{
context: ["/payment... | 172 | 10,238 |
hyperswitch-web | Hyperswitch-React-Demo-App/webpack.common.js | .js | const path = require("path");
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const { BundleAnalyzerPlu... | 498 | 10,239 |
hyperswitch-web | Hyperswitch-React-Demo-App/README.md | .md | # Accept a payment examples in React for Payment Element
## How to run locally
This is the React client for the sample and runs independently of the server.
Running a backend server is a requirement and a dependency for this React front-end to work. See the README in the root of the project for more details.
To run ... | 519 | 10,240 |
hyperswitch-web | Hyperswitch-React-Demo-App/Makefile | none | NS ?= juspaydotin
VERSION ?= v1.0.4
IMAGE_NAME ?= hyperswitch-web
BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
CONTAINER_NAME ?= hyperswitch-web
CONTAINER_INSTANCE ?= default
SOURCE_COMMIT := $(shell git rev-parse HEAD)
RUN_TEST ?= false
.PHONY: build push shell run start stop rm release
build: Dockerfile
$... | 236 | 10,241 |
hyperswitch-web | Hyperswitch-React-Demo-App/public/_redirects | none | /* /index.html 200 | 10 | 10,242 |
hyperswitch-web | Hyperswitch-React-Demo-App/public/playgroundIndex.html | .html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="/orca/elements/favicon.ico" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="theme-color" content="#000000" />
<link href="https://fonts.googleapis.com/css2?f... | 562 | 10,243 |
hyperswitch-web | Hyperswitch-React-Demo-App/public/manifest.json | .json | {
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
... | 186 | 10,244 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/App.css | .css | @import url('https://fonts.googleapis.com/css?family=Raleway&display=swap');
:root {
--light-grey: #F6F9FC;
--dark-terminal-color: #0A2540;
--accent-color: #635BFF;
--radius: 3px;
}
body {
padding: 20px;
font-family: 'Raleway';
display: flex;
justify-content: center;
font-size: 1.2em;
color: var(-... | 505 | 10,247 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/Cart.js | .js | import React from "react";
import logo from "../public/assets/hyperswitchLogo.svg";
import shirt from "../public/assets/shirt.png";
import cap from "../public/assets/cap.png";
function Cart() {
return (
<>
<div className="cart">
<div className="titleContainer">
<div className="title">
... | 503 | 10,248 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/Completion.js | .js | import React from "react";
import "./index.css";
import "./App.css";
import success from "../public/assets/Successsuccess.svg";
function Completion(props) {
return (
<>
<div className="ConfirmContainer">
<div>
<img src={success} width="150px" height="110px" />
</div>
<div ... | 175 | 10,249 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/CheckoutForm.js | .js | import { PaymentElement } from "@juspay-tech/react-hyper-js";
import Cart from "./Cart";
import { useState, useEffect } from "react";
import { useHyper, useElements } from "@juspay-tech/react-hyper-js";
import { useNavigate } from "react-router-dom";
import React from "react";
import Completion from "./Completion";
imp... | 925 | 10,250 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/Payment.js | .js | /* eslint-disable no-undef */
import { useEffect, useState } from "react";
import React from "react";
import { HyperElements } from "@juspay-tech/react-hyper-js";
import CheckoutForm from "./CheckoutForm";
function Payment() {
const [hyperPromise, setHyperPromise] = useState(null);
const [clientSecret, setClientSe... | 684 | 10,251 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/index.js | .js | import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("app")
);
| 50 | 10,253 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/App.js | .js | import "./App.css";
import Payment from "./Payment";
import Completion from "./Completion";
import React from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
function App() {
return (
<main>
<BrowserRouter>
<Routes>
<Route path="/" element={<Payment />} />
... | 85 | 10,254 |
hyperswitch-web | Hyperswitch-React-Demo-App/src/index.css | .css | @import url("https://fonts.googleapis.com/css?family=Raleway&display=swap");
body {
font-family: "Raleway";
display: flex;
justify-content: center;
font-size: 1.2em;
color: var(--dark-terminal-color);
}
main{
display: flex;
flex-direction: column;
justify-content: center;
}
.heading{
color:#454141a... | 1,731 | 10,255 |
hyperswitch-web | docs/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... | 116 | 10,256 |
hyperswitch-web | docs/CODE_OF_CONDUCT.md | .md | # Code of Conduct
This project adheres to React Code of Conduct
[React Code of Conduct](https://github.com/facebook/react/blob/main/CODE_OF_CONDUCT.md).
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and ou... | 640 | 10,257 |
hyperswitch-web | docs/CONTRIBUTOR_LICENSE_AGREEMENT.md | .md | # Contributor License Agreement
You accept and agree to the following terms and conditions for Your present and
future Contributions submitted to Juspay Technologies Private Limited, Except
for the license granted herein to Juspay Technologies Private Limited and
recipients of software distributed by Juspay Technologi... | 1,363 | 10,258 |
hyperswitch-web | cypress-tests/readme.md | .md | <h1 align="center">Hyperswitch SDK Web Testing</h1>
## Quick Start Locally
Steps to get started with Hyperswitch-web sdk testing locally:
1. Set up hyperswitch web following the [Docs](https://github.com/juspay/hyperswitch-web?tab=readme-ov-file#hyperswitch-unified-checkout).
2. Now that you have three terminals op... | 423 | 10,262 |
hyperswitch-web | cypress-tests/tsconfig.json | .json | {
"compilerOptions": {
"baseUrl": ".",
"target": "ES2022",
"lib": ["ES2015", "dom"],
"types": ["cypress", "node"]
},
"include": ["**/*.ts", "./cypress.d.ts"]
} | 67 | 10,263 |
hyperswitch-web | cypress-tests/package.json | .json | {
"name": "cypress-tests",
"version": "1.0.0",
"description": "Test cases in cypress",
"main": "cypress.config.js",
"scripts": {
"lint": "./node_modules/.bin/tslint -c tslint.json -p cypress/**/*.ts -t stylish",
"start": "cypress open",
"test": "cypress run"
},
"repository": {
"type": "git... | 197 | 10,264 |
hyperswitch-web | cypress-tests/cypress.config.js | .js | const { defineConfig } = require("cypress");
module.exports = defineConfig({
projectId: "6r9ayw",
chromeWebSecurity: false,
e2e: {
baseUrl: "http://localhost:9050",
},
retries: { runMode: 1, openMode: 1 },
}); | 72 | 10,265 |
hyperswitch-web | cypress-tests/cypress.env.json | .json | {
"HYPERSWITCH_PUBLISHABLE_KEY": "",
"HYPERSWITCH_SECRET_KEY": ""
} | 26 | 10,266 |
hyperswitch-web | cypress-tests/package-lock.json | .json | {
"name": "cypress-tests",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cypress-tests",
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"cypress": "^13.13.2",
"cypress-iframe": "^1.0.1",
"typescript": "^... | 13,289 | 10,267 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/weChatPay-flow-e2e-test.cy.js | .js | // NOTE: this test is for we chat QR flow, please ensure we chat is enabled in stripe connector on dashboard
describe("We Chat payment flow test", () => {
let customerData;
let paymentMethodsData;
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.wrap(
Cypress.automation("remote:debugger:pro... | 412 | 10,268 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/affirm-flow-e2e-test.cy.js | .js | import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("affirm payment flow test", () => {
let customerData;
let paymentMethodsData;
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.wrap(
Cypress.automation("remote:debugger:protocol", {
command: "Network.clearBrowserC... | 362 | 10,269 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/bluesnap-3DS-test.cy.js | .js | //pay_gpmsaQ9AIL3MH78HN7gJ_secret_xlVSaOqXCtqRy4QjUKpY
const request = {
currency: "USD",
amount: 6500,
authentication_type: "three_ds",
description: "Joseph First Crypto",
email: "hyperswitch_sdk_demo_id@gmail.com",
connector_metadata: {
noon: {
order_category: "applepay",
},
},
metadata:... | 1,228 | 10,270 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/saved-card-3DS-test.cy.js | .js | /*
import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("Card payment flow test", () => {
let customerData;
let publishableKey = "pk_snd_3b33cd9404234113804aa1accaabe22f";
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.hardReload();
cy.fixture("testCustomer").then((custome... | 1,127 | 10,271 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/api-call-test.cy.js | .js | const request = {
currency: "USD",
amount: 6500,
authentication_type: "three_ds",
description: "Joseph First Crypto",
email: "hyperswitch_sdk_demo_id@gmail.com",
connector_metadata: {
noon: {
order_category: "applepay",
},
},
metadata: {
udf1: "value1",
new_customer: "true",
lo... | 1,193 | 10,272 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/stripe-3DS-test.cy.js | .js | //pay_gpmsaQ9AIL3MH78HN7gJ_secret_xlVSaOqXCtqRy4QjUKpY
const request = {
currency: "USD",
amount: 6500,
authentication_type: "three_ds",
description: "Joseph First Crypto",
email: "hyperswitch_sdk_demo_id@gmail.com",
connector_metadata: {
noon: {
order_category: "applepay",
},
},
metadata:... | 1,172 | 10,273 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/card-3DS-flow-e2e-test.cy.js | .js | import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("Card payment flow test", () => {
let customerData;
let publishableKey = "pk_snd_3b33cd9404234113804aa1accaabe22f";
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.hardReload();
cy.fixture("testCustomer").then((customer) ... | 456 | 10,274 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/saved-card-flow-e2e-test.cy.js | .js | describe("Card Payment Flow Test", () => {
let customerData;
const iframeSelector = "#orca-payment-element-iframeRef-orca-elements-payment-element-payment-element";
const thankYouMessage = "Thanks for your order!";
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.hardReload();
cy.fixture("... | 347 | 10,275 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/confirm_payload.json | .json | {
"client_secret": "pay_nTQ5NfqEVxwKC0GNPgE5_secret_00PSTueBCTVNWmJo3hG1",
"return_url": "http://localhost:9060/completion",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4000000000003220",
"card_exp_month": "04",
"card_exp_year": "2024",
"card_holder_n... | 419 | 10,276 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/alipay-flow-e2e-test.cy.js | .js | import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("Ali Pay payment flow test", () => {
let customerData;
let paymentMethodsData;
beforeEach(() => {
// cy.visit("http://localhost:9060", { cache: false });
cy.visit("http://localhost:9060");
cy.wrap(
Cypress.automation("remote:... | 376 | 10,277 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/xxx..cy.js | .js | const enterValueInIframeIfExsist = (selector, value) => {
// cy.iframe(iframeSelector)
// .find(selector)
// .then(($input) => {
// if ($input.length > 0) {
// cy.wrap($input).type(value);
// // You can continue with other actions or assertions here
// } else {
// cy.log(
... | 386 | 10,278 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/card-backup.cy.js | .js | /*import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("Card payment flow test", () => {
let customerData;
let publishableKey = "pk_snd_3b33cd9404234113804aa1accaabe22f";
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.hardReload();
cy.fixture("testCustomer").then((customer... | 1,404 | 10,279 |
hyperswitch-web | cypress-tests/cypress/js-e2e-test-cases-to-refer/klarna-flow-e2e-test.cy.js | .js | import * as testIds from "../../src/Utilities/TestUtils.bs";
describe("klarna payment flow test", () => {
let customerData;
let paymentMethodsData;
beforeEach(() => {
cy.visit("http://localhost:9060");
cy.wrap(
Cypress.automation("remote:debugger:protocol", {
command: "Network.clearBrowserC... | 525 | 10,280 |
hyperswitch-web | cypress-tests/cypress/e2e/card-number-validation-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL } from "../support/utils";
import { createPaymentBody } from "../support/utils";
import { changeObjectKeyValue } from "../support/utils";
import { stripeCards } from "cypress/support/cards";
describe("Card number validation test", ()... | 1,826 | 10,281 |
hyperswitch-web | cypress-tests/cypress/e2e/saved-card-flow-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL } from "../support/utils";
import { createPaymentBody } from "../support/utils";
import { changeObjectKeyValue } from "../support/utils";
describe("Card payment flow test", () => {
const publishableKey = Cypress.env('HYPERSWITCH_P... | 442 | 10,282 |
hyperswitch-web | cypress-tests/cypress/e2e/stripe-3DS-card-flow-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL } from "../support/utils";
import { createPaymentBody } from "../support/utils";
import { changeObjectKeyValue } from "../support/utils";
import { stripeCards } from "cypress/support/cards";
describe("Card payment flow test", () => {... | 469 | 10,283 |
hyperswitch-web | cypress-tests/cypress/e2e/stripe-manual-capture-card-flow-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL } from "../support/utils";
import { createPaymentBody } from "../support/utils";
import { changeObjectKeyValue } from "../support/utils";
import { stripeCards } from "cypress/support/cards";
describe("Card payment flow test", () => {... | 395 | 10,284 |
hyperswitch-web | cypress-tests/cypress/e2e/stripe-no-3DS-card-flow-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL } from "../support/utils";
import { createPaymentBody } from "../support/utils";
import { changeObjectKeyValue } from "../support/utils";
import { stripeCards } from "cypress/support/cards";
describe("Card payment flow test", () => {... | 900 | 10,285 |
hyperswitch-web | cypress-tests/cypress/e2e/external-3DS-netcetera-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL, netceteraChallengeTestCard, createPaymentBody, changeObjectKeyValue, connectorProfileIdMapping, connectorEnum } from "../support/utils";
describe("External 3DS using Netcetera Checks", () => {
let getIframeBody: () => Cypress.Cha... | 802 | 10,286 |
hyperswitch-web | cypress-tests/cypress/e2e/cvc-checks-e2e-test.cy.ts | .ts | import * as testIds from "../../../src/Utilities/TestUtils.bs";
import { getClientURL, amexTestCard, visaTestCard, createPaymentBody } from "../support/utils";
describe("Card CVC Checks", () => {
let getIframeBody: () => Cypress.Chainable<JQuery<HTMLBodyElement>>;
const publishableKey = Cypress.env('HYPERSWITC... | 1,054 | 10,287 |
hyperswitch-web | cypress-tests/cypress/support/utils.ts | .ts | export const CLIENT_BASE_URL = "http://localhost:9060"
export const getClientURL = (clientSecret, publishableKey) => {
return `${CLIENT_BASE_URL}?isCypressTestMode=true&clientSecret=${clientSecret}&publishableKey=${publishableKey}`;
}
export const enum connectorEnum {
TRUSTPAY,
ADYEN,
STRIPE,
NETCETERA
}
... | 1,208 | 10,288 |
hyperswitch-web | cypress-tests/cypress/support/cards.ts | .ts | export type cardDetails = {
cardNo: string,
cardScheme: string,
cvc: string,
card_exp_month: string,
card_exp_year: string,
}
type connectorCard = {
successCard: cardDetails
threeDSCard: cardDetails
invalidCard: cardDetails
}
export const stripeCards = {
successCard: {
... | 533 | 10,289 |
hyperswitch-web | cypress-tests/cypress/support/e2e.ts | .ts | // ***********************************************************
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// auto... | 122 | 10,290 |
hyperswitch-web | cypress-tests/cypress/support/commands.ts | .ts | // ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***************************... | 1,345 | 10,291 |
hyperswitch-web | cypress-tests/cypress/support/types.ts | .ts |
export { }; // indicate that file is a module
export type CustomerData = {
cardNo: string
cardExpiry: string
cardCVV: string
cardHolderName: string
email: string
address: string
city: string
country: string
state: string
postalCode: string
threeDSCardNo: string
}
declare g... | 262 | 10,292 |
hyperswitch-web | cypress-tests/cypress/fixtures/paymentMethods.json | .json | {
"card":"Card",
"klarna":"Klarna",
"affirm":"Affirm",
"aliPay":"Ali Pay",
"weChatPay":"WeChat"
}
| 44 | 10,293 |
hyperswitch-web | cypress-tests/cypress/fixtures/testCustomer.json | .json | {
"cardNo": "4242 4242 4242 4242",
"threeDSCardNo": "4000000000003220",
"cardExpiry": "04/24",
"cardCVV": "424",
"billingName": "John Doe",
"cardHolderName": "John Doe",
"email": "arun@gmail.com",
"address": "123 Main Street Apt 4B",
"city": "New York",
"country": "United States",
"state": "New Yo... | 168 | 10,294 |
hyperswitch-web | public/fullscreenIndexTemplate.html | .html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="/orca/elements/favicon.ico" /> -->
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes"
/>
<meta name="theme-color" content="#000000" />
<... | 580 | 10,295 |
hyperswitch-web | public/build.html | .html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="/orca/elements/favicon.ico" /> -->
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes"
/>
<meta name="theme-color" content="#000000" />
<... | 861 | 10,296 |
hyperswitch-web | aws/hyperswitch_web_aws_cleanup_setup.sh | .sh | #!/bin/bash
command_discovery() {
type $1 > /dev/null 2> /dev/null
if [[ $? != 0 ]]; then
echo "\`$1\` command not found"
exit 1
fi
}
yes_or_no() {
read response < /dev/tty
case $response in
[Yy]* ) return 0 ;;
[Nn]* ) return 1 ;;
* ) return 1 ;;
esac
}
command_disco... | 694 | 10,299 |
hyperswitch-web | aws/hyperswitch_web_aws_setup.sh | .sh | #!/bin/bash
command_discovery() {
type $1 > /dev/null 2> /dev/null
if [[ $? != 0 ]]; then
echo "\`$1\` command not found"
exit 1
fi
}
command_discovery curl
command_discovery aws
echo "Please enter the URL where you have hosted Hyperswitch Backend (https://beta.hyperswitch.io/api) "
read HYPERSWITCH_SE... | 1,608 | 10,300 |
hyperswitch-web | aws/hyperswitch_web_aws_production_deployment.sh | .sh | #!/bin/bash
command_discovery() {
type $1 >/dev/null 2>/dev/null
if [[ $? != 0 ]]; then
echo "\`$1\` command not found"
exit 1
fi
}
command_discovery curl
command_discovery aws
echo "Installing Node Modules"
echo $( (npm install --force))
echo $( (npm run re:build))
echo "Starting AWS S... | 831 | 10,301 |
hyperswitch-web | src/Payment.res | .res | open CardUtils
open CardThemeType
open CardTheme
open LoggerUtils
open RecoilAtoms
let setUserError = message => {
Utils.postFailedSubmitResponse(~errortype="validation_error", ~message)
}
@react.component
let make = (~paymentMode, ~integrateError, ~logger) => {
let {localeString} = Recoil.useRecoilValueFromAtom(... | 3,882 | 10,302 |
hyperswitch-web | src/GlobalVars.res | .res | @val external repoName: string = "repoName"
@val external repoVersion: string = "repoVersion"
@val external repoPublicPath: string = "publicPath"
@val external backendEndPoint: string = "backendEndPoint"
@val external confirmEndPoint: string = "confirmEndPoint"
@val external sdkUrl: string = "sdkUrl"
@val external logE... | 226 | 10,303 |
hyperswitch-web | src/PaymentElementRendererLazy.res | .res | let make = React.lazy_(() => Js.import(PaymentElementRenderer.default))
| 16 | 10,304 |
hyperswitch-web | src/PaymentMethodCollectElement.res | .res | open PaymentMethodCollectTypes
open PaymentMethodCollectUtils
open RecoilAtoms
@react.component
let make = (~integrateError, ~logger) => {
open Promise
let {localeString} = Recoil.useRecoilValueFromAtom(configAtom)
let {themeObj} = Recoil.useRecoilValueFromAtom(configAtom)
let keys = Recoil.useRecoilValueFromA... | 2,867 | 10,305 |
hyperswitch-web | src/FormViewJourney.res | .res | open PaymentMethodCollectTypes
open PaymentMethodCollectUtils
open RecoilAtoms
@react.component
let make = (
~availablePaymentMethods,
~availablePaymentMethodTypes,
~primaryTheme,
~handleSubmit,
~enabledPaymentMethodsWithDynamicFields: array<paymentMethodTypeWithDynamicFields>,
~journeyView,
~renderAddre... | 3,281 | 10,306 |
hyperswitch-web | src/LoaderController.res | .res | open Utils
@react.component
let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger, ~initTimestamp) => {
open RecoilAtoms
let (configAtom, setConfig) = Recoil.useRecoilState(configAtom)
let (keys, setKeys) = Recoil.useRecoilState(keys)
let (paymentMethodList, setPaymentMethodList) = Recoil.useRe... | 4,855 | 10,307 |
hyperswitch-web | src/ThreeDSAuth.res | .res | open Utils
@react.component
let make = () => {
let (openModal, setOpenModal) = React.useState(_ => false)
let (loader, setloader) = React.useState(_ => true)
let threeDsAuthoriseUrl = React.useRef("")
let (expiryTime, setExpiryTime) = React.useState(_ => 600000.0)
let logger = HyperLogger.make(~source=Elem... | 1,168 | 10,308 |
hyperswitch-web | src/App.res | .res | @react.component
let make = () => {
open CardUtils
let url = RescriptReactRouter.useUrl()
let (integrateError, setIntegrateErrorError) = React.useState(() => false)
let setLoggerState = Recoil.useSetRecoilState(RecoilAtoms.loggerAtom)
let paymentMode = getQueryParamsDictforKey(url.search, "componentName")
... | 894 | 10,309 |
hyperswitch-web | src/NoTheme.res | .res | open CardThemeType
let noThemeValues = {
fontFamily: "",
fontSizeBase: "1rem",
colorPrimary: "",
colorBackground: "",
colorText: "",
colorDanger: "",
colorDangerText: "",
borderRadius: "",
fontVariantLigatures: "",
fontVariationSettings: "",
spacingUnit: "10px",
fontWeightLight: "",
fontWeigh... | 373 | 10,310 |
hyperswitch-web | src/States.json | .json | {
"states": {
"AF": [
{ "name": "Badakhshan", "code": "BDS" },
{ "name": "Badghīs", "code": "BDG" },
{ "name": "Baghlan", "code": "BGL" },
{ "name": "Balkh", "code": "BAL" },
{ "name": "Bamyān", "code": "BAM" },
{ "name": "Daykundī", "code": "DAY" },
{ "name": "Farah", "c... | 98,478 | 10,311 |
hyperswitch-web | src/MidnightTheme.res | .res | open CardThemeType
let midnight = {
fontFamily: "Quicksand",
fontSizeBase: "1rem",
colorPrimary: "#85d996",
colorBackground: "#30313d",
colorText: "#e0e0e0",
colorDanger: "#fe87a1",
colorDangerText: "#fe87a1",
borderRadius: "10px",
fontVariantLigatures: "",
fontVariationSettings: "",
spacingUnit: ... | 2,388 | 10,312 |
hyperswitch-web | src/RenderPaymentMethods.res | .res | open RecoilAtoms
@react.component
let make = (
~paymentType: CardThemeType.mode,
~cardProps,
~expiryProps,
~cvcProps,
~zipProps,
~handleElementFocus,
~blurState,
~isFocus,
) => {
let {showLoader} = Recoil.useRecoilValueFromAtom(configAtom)
let {themeObj, localeString} = Recoil.useRecoilValueFromAtom... | 1,035 | 10,313 |
hyperswitch-web | src/SingleLineCardPaymentLazy.res | .res | let make = React.lazy_(() => Js.import(SingleLineCardPayment.default))
| 17 | 10,314 |
hyperswitch-web | src/SingleLineCardPayment.resi | .resi | @react.component
let default: (
~paymentType: CardThemeType.mode,
~cardProps: CardUtils.cardProps,
~expiryProps: CardUtils.expiryProps,
~cvcProps: CardUtils.cvcProps,
~zipProps: CardUtils.zipProps,
~handleElementFocus: bool => unit,
~isFocus: bool,
) => React.element
| 83 | 10,315 |
hyperswitch-web | src/ThreeDSMethod.res | .res | open Utils
@react.component
let make = () => {
let logger = HyperLogger.make(~source=Elements(Payment))
let (stateMetadata, setStateMetadata) = React.useState(_ => Dict.make()->JSON.Encode.object)
let divRef = React.useRef(Nullable.null)
let observer = React.useRef(None)
let handleIframeContentLoaded = () ... | 1,168 | 10,316 |
hyperswitch-web | src/CollectWidget.res | .res | open CardUtils
open PaymentMethodCollectTypes
open PaymentMethodCollectUtils
open RecoilAtoms
@react.component
let make = (
~availablePaymentMethods,
~availablePaymentMethodTypes,
~primaryTheme,
~handleSubmit,
~formLayout: formLayout,
) => {
// Recoil states
let {config, constantString, localeString} = R... | 3,147 | 10,317 |
hyperswitch-web | src/PaymentManagement.res | .res | open PaymentType
open RecoilAtoms
@react.component
let make = () => {
let {savedPaymentMethods, displaySavedPaymentMethods} = Recoil.useRecoilValueFromAtom(optionAtom)
let (savedMethods, setSavedMethods) = React.useState(_ => [])
let (isLoading, setIsLoading) = React.useState(_ => false)
React.useEffect(() =>... | 325 | 10,318 |
hyperswitch-web | src/CharcoalTheme.res | .res | open CardThemeType
let charcoal = {
fontFamily: "Quicksand",
fontSizeBase: "1rem",
colorPrimary: "#000000",
colorBackground: "#f0f3f5",
colorText: "#000000",
colorDanger: "#df1b41",
colorDangerText: "#df1b41",
borderRadius: "10px",
fontVariantLigatures: "",
fontVariationSettings: "",
spacingUnit: ... | 1,628 | 10,319 |
hyperswitch-web | src/CardTheme.res | .res | open CardThemeType
open Utils
open ErrorUtils
let getTheme = (val, logger) => {
switch val->String.toLowerCase {
| "default" => Default
| "brutal" => Brutal
| "midnight" => Midnight
| "charcoal" => Charcoal
| "soft" => Soft
| "bubblegum" => Bubblegum
| "none" => NONE
| str => {
str->unknownProp... | 3,022 | 10,320 |
hyperswitch-web | src/BrutalTheme.res | .res | open CardThemeType
let brutal = {
fontFamily: "Quicksand",
fontSizeBase: "1rem",
colorPrimary: "#f5fb1f",
colorBackground: "#ffffff",
colorText: "#000000",
colorDanger: "#ff1a1a",
colorDangerText: "#ff1a1a",
borderRadius: "6px",
fontVariantLigatures: "",
fontVariationSettings: "",
spacingUnit: "11... | 1,814 | 10,321 |
hyperswitch-web | src/WalletElement.res | .res | @react.component
let make = (~paymentType) => {
let sessionsObj = Recoil.useRecoilValueFromAtom(RecoilAtoms.sessions)
let methodslist = Recoil.useRecoilValueFromAtom(RecoilAtoms.paymentMethodList)
let (sessions, setSessions) = React.useState(_ => Dict.make()->JSON.Encode.object)
let (walletOptions, setWalletOpt... | 374 | 10,322 |
hyperswitch-web | src/PaymentManagementLazy.res | .res | let make = React.lazy_(() => Js.import(PaymentManagement.default))
| 15 | 10,323 |
hyperswitch-web | src/PaymentElementRenderer.res | .res | open RecoilAtoms
@react.component
let make = (
~paymentType: CardThemeType.mode,
~cardProps: CardUtils.cardProps,
~expiryProps: CardUtils.expiryProps,
~cvcProps: CardUtils.cvcProps,
) => {
let _cardsToRender = width => {
(width - 40) / 110
}
let {showLoader} = Recoil.useRecoilValueFromAtom(configAtom)... | 241 | 10,324 |
hyperswitch-web | src/CardPattern.res | .res | type patterns = {
issuer: string,
pattern: Re.t,
cvcLength: array<int>,
length: array<int>,
maxCVCLength: int,
pincodeRequired: bool,
}
type card = {details: array<patterns>}
let defaultCardPattern = {
issuer: "",
pattern: %re("/^[0-9]/"),
cvcLength: [3, 4],
maxCVCLength: 4,
length: [13, 14, 15, 1... | 2,318 | 10,325 |
hyperswitch-web | src/Bank.res | .res | type bank = {
displayName: string,
hyperSwitch: string,
}
type bankList = array<bank>
let defaultEpsBank = {
displayName: "Ärzte- und Apothekerbank",
hyperSwitch: "arzte_und_apotheker_bank",
}
let defaultIdealBank = {
displayName: "ABN AMRO",
hyperSwitch: "abn_amro",
}
let defaultBank = {
displayName: "",... | 3,004 | 10,326 |
hyperswitch-web | src/FormViewTabs.res | .res | open PaymentMethodCollectTypes
open PaymentMethodCollectUtils
open RecoilAtoms
@react.component
let make = (
~availablePaymentMethodTypes,
~primaryTheme,
~handleSubmit,
~tabsView,
~defaultOptionsLimitInTabLayout=defaultOptionsLimitInTabLayout,
~renderAddressForm,
~renderPayoutMethodForm,
) => {
// Reco... | 2,898 | 10,327 |
hyperswitch-web | src/Redsys3ds.res | .res | open Utils
@react.component
let make = () => {
let logger = HyperLogger.make(~source=Elements(Payment))
let isCompleteAuthorizeCalledRef = React.useRef(false)
let timeoutRef = React.useRef(None)
let eventsToSendToParent = ["confirmParams", "poll_status", "openurl_if_required"]
let completeAuthorize = Payment... | 951 | 10,328 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.