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 | cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js | .js | const successfulNo3DSCardDetails = {
card_number: "4111111111111111",
card_exp_month: "08",
card_exp_year: "35",
card_holder_name: "joseph Doe",
card_cvc: "999",
};
const successfulThreeDSTestCardDetails = {
card_number: "4349940199004549",
card_exp_month: "12",
card_exp_year: "35",
card_holder_name:... | 3,666 | 8,708 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/Xendit.js | .js | const successfulNo3DSCardDetails = {
card_number: "4000000000001091",
card_exp_month: "12",
card_exp_year: "27",
card_holder_name: "joseph Doe",
card_cvc: "123",
};
const billingDetails = {
email: "mauro.morandi@nexi.it",
phone: {
number: "9123456789",
country_code: "+91",
},
};
const customerAc... | 3,337 | 8,709 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/Elavon.js | .js | import { customerAcceptance } from "./Commons";
const successfulNo3DSCardDetails = {
card_number: "4111111111111111",
card_exp_month: "06",
card_exp_year: "50",
card_holder_name: "joseph Doe",
card_cvc: "123",
};
const singleUseMandateData = {
customer_acceptance: customerAcceptance,
mandate_type: {
... | 2,840 | 8,710 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/Novalnet.js | .js | const successfulThreeDSTestCardDetails = {
card_number: "4000000000001091",
card_exp_month: "12",
card_exp_year: "50",
card_holder_name: "Max Mustermann",
card_cvc: "123",
};
const successfulNo3DSCardDetails = {
card_number: "4200000000000000",
card_exp_month: "03",
card_exp_year: "30",
card_holder_n... | 2,984 | 8,711 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/WorldPay.js | .js | import { getCustomExchange } from "./Modifiers";
const billing = {
address: {
line1: "1467",
line2: "Harrison Street",
line3: "Harrison Street",
city: "San Fransico",
state: "CA",
zip: "94122",
country: "US",
first_name: "John",
last_name: "Doe",
},
};
const browser_info = {
... | 8,013 | 8,712 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/Modifiers.js | .js | import State from "../../../utils/State";
const globalState = new State({
connectorId: Cypress.env("CONNECTOR"),
baseUrl: Cypress.env("BASEURL"),
adminApiKey: Cypress.env("ADMINAPIKEY"),
connectorAuthFilePath: Cypress.env("CONNECTOR_AUTH_FILE_PATH"),
});
const connectorName = normalize(globalState.get("connec... | 603 | 8,713 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payment/Paypal.js | .js | import { getCustomExchange } from "./Modifiers";
const successfulNo3DSCardDetails = {
card_number: "4012000033330026",
card_exp_month: "01",
card_exp_year: "50",
card_holder_name: "joseph Doe",
card_cvc: "123",
};
const successfulThreeDSTestCardDetails = {
card_number: "5329879786234393",
card_exp_month... | 4,412 | 8,714 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Commons.js | .js | // This file is the default. To override, add to connector.js
import { getCustomExchange } from "./Modifiers";
const card_data = {
card_number: "4111111111111111",
expiry_month: "3",
expiry_year: "2030",
card_holder_name: "John Smith",
};
const payment_card_data = {
card_number: "4111111111111111",
card_e... | 868 | 8,715 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Utils.js | .js | import { validateConfig } from "../../../utils/featureFlags.js";
import { connectorDetails as adyenConnectorDetails } from "./Adyen.js";
import { connectorDetails as adyenPlatformConnectorDetails } from "./AdyenPlatform.js";
import { connectorDetails as CommonConnectorDetails } from "./Commons.js";
import { connectorD... | 700 | 8,716 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Adyen.js | .js | const card_data = {
card_number: "4111111111111111",
expiry_month: "3",
expiry_year: "2030",
card_holder_name: "John Smith",
};
const payment_card_data = {
card_number: "4111111111111111",
card_exp_month: "03",
card_exp_year: "2030",
card_holder_name: "John Doe",
};
const billing = {
address: {
... | 1,070 | 8,717 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Nomupay.js | .js | function get_billing(x) {
return {
address: {
line1: "1467",
line2: "Harrison Street",
line3: "Harrison Street",
city: "Munich",
state: "CA",
zip: "80331",
country: "DE",
first_name: "John",
last_name: "Doe",
},
phone: {
number: "9123456789",
... | 1,084 | 8,718 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Wise.js | .js | const card_data = {
card_number: "4111111111111111",
expiry_month: "3",
expiry_year: "2030",
card_holder_name: "John Smith",
};
const payment_card_data = {
card_number: "4111111111111111",
card_exp_month: "03",
card_exp_year: "2030",
card_holder_name: "John Doe",
};
const billing = {
address: {
... | 1,311 | 8,719 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js | .js | const billing = {
address: {
line1: "Raadhuisplein",
line2: "92",
city: "Hoogeveen",
state: "FL",
zip: "7901 BW",
country: "NL",
first_name: "John",
last_name: "Doe",
},
phone: {
number: "9123456789",
country_code: "+31",
},
};
export const connectorDetails = {
bank_tr... | 601 | 8,720 |
hyperswitch | cypress-tests/cypress/e2e/configs/Payout/Modifiers.js | .js | import State from "../../../utils/State";
const globalState = new State({
connectorId: Cypress.env("CONNECTOR"),
baseUrl: Cypress.env("BASEURL"),
adminApiKey: Cypress.env("ADMINAPIKEY"),
connectorAuthFilePath: Cypress.env("CONNECTOR_AUTH_FILE_PATH"),
});
const connectorName = normalise(globalState.get("connec... | 449 | 8,721 |
hyperswitch | cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js | .js | export const cardCreditEnabled = [
{
payment_method: "card",
payment_method_types: [
{
payment_method_type: "credit",
card_networks: ["Visa"],
minimum_amount: 0,
accepted_currencies: {
type: "enable_only",
list: ["USD"],
},
maximum_amou... | 1,194 | 8,722 |
hyperswitch | cypress-tests/cypress/e2e/configs/PaymentMethodList/Utils.js | .js | import { connectorDetails as CommonConnectorDetails } from "./Commons.js";
import { connectorDetails as ConnectorDetails } from "./Connector.js";
const connectorDetails = {
commons: CommonConnectorDetails,
connector: ConnectorDetails,
};
export default function getConnectorDetails(connectorId) {
const x = merge... | 229 | 8,723 |
hyperswitch | cypress-tests/cypress/e2e/configs/PaymentMethodList/Connector.js | .js | export const connectorDetails = {
pm_list: {
PaymentIntent: {
RequestCurrencyUSD: {
currency: "USD",
customer_acceptance: null,
setup_future_usage: "off_session",
authentication_type: "no_three_ds",
},
RequestCurrencyEUR: {
currency: "EUR",
custome... | 394 | 8,724 |
hyperswitch | cypress-tests/cypress/e2e/configs/Routing/Commons.js | .js | export const connectorDetails = {
priorityRouting: {
Request: {
name: "priority routing",
description: "some desc",
algorithm: {
type: "priority",
data: [],
},
profile_id: "{{profile_id}}",
},
Response: {
status: 200,
body: {},
},
},
jwt: {... | 250 | 8,725 |
hyperswitch | cypress-tests/cypress/e2e/configs/Routing/Utils.js | .js | import { connectorDetails as adyenConnectorDetails } from "./Adyen.js";
import { connectorDetails as autoretryConnectorDetails } from "./Autoretries.js";
import { connectorDetails as commonConnectorDetails } from "./Commons.js";
import { connectorDetails as stripeConnectorDetails } from "./Stripe.js";
const connectorD... | 269 | 8,726 |
hyperswitch | cypress-tests/cypress/e2e/configs/Routing/Autoretries.js | .js | const card_1142 = {
card_number: "4111111145551142",
card_exp_month: "03",
card_exp_year: "30",
card_holder_name: "Borino",
card_cvc: "737",
};
const card_4242 = {
card_number: "4242424242424242",
card_exp_month: "03",
card_exp_year: "30",
card_holder_name: "Borino",
card_cvc: "737",
};
const card_9... | 874 | 8,727 |
hyperswitch | cypress-tests/cypress/e2e/configs/Routing/Adyen.js | .js | const successfulNo3DSCardDetails = {
card_number: "4111111111111111",
card_exp_month: "03",
card_exp_year: "30",
card_holder_name: "John Doe",
card_cvc: "737",
};
const successfulThreeDSTestCardDetails = {
card_number: "4917610000000000",
card_exp_month: "03",
card_exp_year: "30",
card_holder_name: "... | 3,834 | 8,728 |
hyperswitch | cypress-tests/cypress/e2e/configs/Routing/Stripe.js | .js | const successfulNo3DSCardDetails = {
card_number: "4242424242424242",
card_exp_month: "10",
card_exp_year: "50",
card_holder_name: "morino",
card_cvc: "737",
};
const successfulThreeDSTestCardDetails = {
card_number: "4000002500003155",
card_exp_month: "10",
card_exp_year: "50",
card_holder_name: "mo... | 3,304 | 8,729 |
hyperswitch | cypress-tests/cypress/support/e2e.js | .js | // ***********************************************************
// 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... | 283 | 8,730 |
hyperswitch | cypress-tests/cypress/support/redirectionHandler.js | .js | /* eslint-disable cypress/unsafe-to-chain-command */
import jsQR from "jsqr";
// Define constants for wait times
const CONSTANTS = {
TIMEOUT: 20000, // 20 seconds
WAIT_TIME: 10000, // 10 seconds
ERROR_PATTERNS: [
/^(4|5)\d{2}\s/, // HTTP error status codes
/\berror occurred\b/i,
/\bpayment failed\b/... | 4,614 | 8,731 |
hyperswitch | cypress-tests/cypress/support/commands.js | .js | // ***********************************************
// 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
// ***************************... | 28,135 | 8,732 |
hyperswitch | cypress-tests/cypress/fixtures/create-mandate-cit.json | .json | {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment requ... | 839 | 8,733 |
hyperswitch | cypress-tests/cypress/fixtures/create-pm-id-mit.json | .json | {
"amount": 999,
"currency": "USD",
"confirm": true,
"customer_id": "customer098765",
"return_url": "https://example.com",
"recurring_details": {
"type": "payment_method_id",
"data": "{{payment_method_id}}"
},
"off_session": true,
"billing": {
"address": {
"first_name": "John",
... | 395 | 8,734 |
hyperswitch | cypress-tests/cypress/fixtures/merchant-update-body.json | .json | {
"merchant_id": "merchant_id",
"merchant_name": "NewAge Retailer",
"locker_id": "m0010",
"merchant_details": {
"primary_contact_person": "joseph Test",
"primary_email": "josephTest@test.com",
"primary_phone": "veniam aute officia ullamco esse",
"secondary_contact_person": "joseph Test2",
"s... | 369 | 8,735 |
hyperswitch | cypress-tests/cypress/fixtures/session-token.json | .json | {
"payment_id": "{{payment_id}}",
"client_secret": "{{client_secret}}",
"wallets": []
}
| 28 | 8,736 |
hyperswitch | cypress-tests/cypress/fixtures/create-mandate-mit.json | .json | {
"amount": 6540,
"currency": "USD",
"capture_method": "automatic",
"off_session": true,
"confirm": true,
"description": "Initiated by merchant",
"mandate_id": "mandate_id",
"customer_id": "StripeCustomer",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"l... | 350 | 8,737 |
hyperswitch | cypress-tests/cypress/fixtures/create-payout-confirm-body.json | .json | {
"amount": 100,
"currency": "EUR",
"customer_id": "payout_customer",
"email": "payout_customer@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payout request",
"billing": {
"address": {
"line1": "1467",
"line2": "Harris... | 257 | 8,738 |
hyperswitch | cypress-tests/cypress/fixtures/confirm-body.json | .json | {
"client_secret": "",
"return_url": "https://example.com",
"confirm": true,
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {... | 419 | 8,739 |
hyperswitch | cypress-tests/cypress/fixtures/imports.js | .js | import businessProfile from "./business-profile.json";
import captureBody from "./capture-flow-body.json";
import configs from "./configs.json";
import confirmBody from "./confirm-body.json";
import apiKeyCreateBody from "./create-api-key-body.json";
import createConfirmPaymentBody from "./create-confirm-body.json";
im... | 435 | 8,740 |
hyperswitch | cypress-tests/cypress/fixtures/create-confirm-body.json | .json | {
"amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "john123",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
... | 787 | 8,741 |
hyperswitch | cypress-tests/cypress/fixtures/list-refund-call-body.json | .json | {
"offset": 0
}
| 9 | 8,742 |
hyperswitch | cypress-tests/cypress/fixtures/gsm-body.json | .json | {
"gsm_update": {
"connector": "stripe",
"flow": "Authorize",
"sub_flow": "sub_flow",
"code": "card_declined",
"message": "card_declined",
"status": "failure",
"decision": "retry",
"step_up_possible": ""
}
}
| 73 | 8,743 |
hyperswitch | cypress-tests/cypress/fixtures/create-customer-body.json | .json | {
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "First customer",
"address": {
"city": "Bangalore",
"country": "IN",
"line1": "Juspay router",
"line2": "Koramangala",
"line3": "Stallion",
"state": "Karnataka",
... | 196 | 8,744 |
hyperswitch | cypress-tests/cypress/fixtures/create-payment-body.json | .json | {
"currency": "USD",
"amount": 6000,
"authentication_type": "three_ds",
"description": "Joseph First Crypto",
"email": "hyperswitch_sdk_demo_id@gmail.com",
"setup_future_usage": null,
"profile_id": "{{profile_id}}",
"connector_metadata": {
"noon": {
"order_category": "applepay"
}
},
"... | 145 | 8,745 |
hyperswitch | cypress-tests/cypress/fixtures/update-api-key-body.json | .json | {
"name": "Updated API Key",
"description": "My very awesome API key",
"expiration": null
}
| 28 | 8,746 |
hyperswitch | cypress-tests/cypress/fixtures/capture-flow-body.json | .json | {
"amount_to_capture": 100,
"statement_descriptor_name": "Joseph",
"statement_descriptor_suffix": "JS"
}
| 31 | 8,747 |
hyperswitch | cypress-tests/cypress/fixtures/routing-config-body.json | .json | {
"name": "advanced config",
"description": "It is my ADVANCED config",
"algorithm": {}
}
| 27 | 8,748 |
hyperswitch | cypress-tests/cypress/fixtures/refund-flow-body.json | .json | {
"payment_id": "payment_id",
"amount": 100,
"reason": "FRAUD",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}
| 89 | 8,749 |
hyperswitch | cypress-tests/cypress/fixtures/merchant-create-body.json | .json | {
"merchant_id": "cypress_merchant_GHAction_6dcfed64-ec62-46a2-9961-cafa3c1faa01",
"locker_id": "m0010",
"merchant_name": "NewAge Retailers",
"merchant_details": {
"primary_contact_person": "John Test",
"primary_email": "JohnTest@test.com",
"primary_phone": "sunt laborum",
"secondary_contact_per... | 388 | 8,750 |
hyperswitch | cypress-tests/cypress/fixtures/create-connector-body.json | .json | {
"connector_name": "stripe",
"profile_id": "{{profile_id}}",
"connector_account_details": {
"auth_type": "BodyKey",
"api_key": "api-key",
"key1": "value1"
},
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [],
"metadata": {
"city": "NY",
"unit": "245",
"endpoint... | 117 | 8,751 |
hyperswitch | cypress-tests/cypress/fixtures/configs.json | .json | {
"gsm": {
"key": "",
"value": ""
},
"max_auto_retries": {
"key": "",
"value": ""
},
"step_up": {
"key": "",
"value": ""
}
}
| 58 | 8,752 |
hyperswitch | cypress-tests/cypress/fixtures/update-customer-body.json | .json | {
"email": "JohnTest@test.com",
"name": "John Test",
"phone_country_code": "+65",
"phone": "888888888",
"description": "First customer",
"metadata": {
"city": "NY",
"unit": "245"
}
}
| 76 | 8,753 |
hyperswitch | cypress-tests/cypress/fixtures/create-api-key-body.json | .json | {
"name": "API Key 1",
"description": null,
"expiration": "2069-09-23T01:02:03.000Z"
}
| 48 | 8,754 |
hyperswitch | cypress-tests/cypress/fixtures/create-ntid-mit.json | .json | {
"amount": 999,
"currency": "USD",
"confirm": true,
"payment_method": "card",
"return_url": "https://example.com",
"email": "example@email.com",
"recurring_details": {
"type": "network_transaction_id_and_card_details",
"data": {
"card_number": "4242424242424242",
"card_exp_month": "11... | 474 | 8,755 |
hyperswitch | cypress-tests/cypress/fixtures/update-connector-body.json | .json | {
"connector_label": "updated_connector_label",
"test_mode": true,
"disabled": false
}
| 25 | 8,756 |
hyperswitch | cypress-tests/cypress/fixtures/business-profile.json | .json | {
"bpCreate": {
"profile_name": "default"
},
"bpUpdate": {
"is_connector_agnostic_mit_enabled": true,
"collect_shipping_details_from_wallet_connector": true,
"collect_billing_details_from_wallet_connector": true,
"always_collect_billing_details_from_wallet_connector": true,
"always_collec... | 84 | 8,757 |
hyperswitch | cypress-tests/cypress/fixtures/void-payment-body.json | .json | {
"cancellation_reason": "requested_by_customer"
}
| 13 | 8,758 |
hyperswitch | cypress-tests/cypress/fixtures/save-card-confirm-body.json | .json | {
"client_secret": "{{client_secret}}",
"payment_method": "card",
"payment_token": "{{payment_token}}",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
... | 407 | 8,759 |
hyperswitch | cypress-tests/cypress/utils/State.js | .js | class State {
data = {};
constructor(data) {
this.data = data;
this.data["connectorId"] = Cypress.env("CONNECTOR");
this.data["baseUrl"] = Cypress.env("BASEURL");
this.data["adminApiKey"] = Cypress.env("ADMINAPIKEY");
this.data["email"] = Cypress.env("HS_EMAIL");
this.data["password"] = Cypr... | 145 | 8,760 |
hyperswitch | cypress-tests/cypress/utils/featureFlags.js | .js | /* eslint-disable no-console */
const config_fields = ["CONNECTOR_CREDENTIAL", "DELAY", "TRIGGER_SKIP"];
const DEFAULT_CONNECTOR = "connector_1";
// Helper function for type and range validation
function validateType(value, type) {
if (typeof value !== type) {
console.error(
`Expected value to be of type ... | 1,269 | 8,761 |
hyperswitch | cypress-tests/cypress/utils/RequestBodyUtils.js | .js | const keyPrefixes = {
localhost: {
publishable_key: "pk_dev_",
key_id: "dev_",
},
integ: {
publishable_key: "pk_snd_",
key_id: "snd_",
},
sandbox: {
publishable_key: "pk_snd_",
key_id: "snd_",
},
};
export const setClientSecret = (requestBody, clientSecret) => {
requestBody["clien... | 483 | 8,762 |
hyperswitch | monitoring/docker-compose.yaml | .yaml | # To find out does Loki work properly:
# - http://127.0.0.1:3100/ready
# - http://127.0.0.1:3100/metrics
#
# = Grafana configuration
# Default grafana user and password are "admin".
# Need to add data source: http://loki:3100
#
version: "3"
networks:
loki:
services:
promtail:
image: grafana/promtail:latest
... | 647 | 8,763 |
hyperswitch | monitoring/docker-compose-ckh.yaml | .yaml | # To find out does Loki work properly:
# - http://127.0.0.1:3100/ready
# - http://127.0.0.1:3100/metrics
#
# = Grafana configuration
# Default grafana user and password are "admin".
# Need to add data source: http://loki:3100
#
version: "3"
volumes:
cargo_cache:
pg_data:
cargo_build_cache:
ckh_data:
networks... | 1,733 | 8,764 |
hyperswitch | monitoring/kafka-script.sh | .sh | # This script is required to run kafka cluster (without zookeeper)
#!/bin/sh
# Docker workaround: Remove check for KAFKA_ZOOKEEPER_CONNECT parameter
sed -i '/KAFKA_ZOOKEEPER_CONNECT/d' /etc/confluent/docker/configure
# Docker workaround: Ignore cub zk-ready
sed -i 's/cub zk-ready/echo ignore zk-ready/' /etc/confluent... | 147 | 8,765 |
hyperswitch | monitoring/README.md | .md | # Service Monitoring
## Components
[Promtail](https://grafana.com/docs/loki/latest/clients/promtail/#:~:text=Promtail%20is%20an%20agent%20which,Attaches%20labels%20to%20log%20streams)
: is a collector which ships the contents of local logs to a private Grafana Loki instance or Grafana Cloud. It is usually deployed to... | 749 | 8,766 |
hyperswitch | monitoring/config/otel-collector.yaml | .yaml | receivers:
promtail:
config:
scrape_configs:
- job_name: loki_push
loki_push_api:
server:
http_listen_port: 3101
grpc_listen_port: 3600
use_incoming_timestamp: true
target_config:
sync_period: 10s
otlp:
protocols:
... | 427 | 8,767 |
hyperswitch | monitoring/config/promtail.yaml | .yaml | server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: http://otel-collector:3101/loki/api/v1/push
scrape_configs:
- job_name: router_file_logs
static_configs:
- targets:
- localhost
labels:
scrape_source: file
__path__: /var/log/... | 274 | 8,768 |
hyperswitch | proto/elimination_rate.proto | .proto | syntax = "proto3";
package elimination;
service EliminationAnalyser {
rpc GetEliminationStatus (EliminationRequest) returns (EliminationResponse);
rpc UpdateEliminationBucket (UpdateEliminationBucketRequest) returns (UpdateEliminationBucketResponse);
rpc InvalidateBucket (InvalidateBucketRequest) returns... | 419 | 8,769 |
hyperswitch | proto/success_rate.proto | .proto | syntax = "proto3";
package success_rate;
service SuccessRateCalculator {
rpc FetchSuccessRate (CalSuccessRateRequest) returns (CalSuccessRateResponse);
rpc UpdateSuccessRateWindow (UpdateSuccessRateWindowRequest) returns (UpdateSuccessRateWindowResponse);
rpc InvalidateWindows (InvalidateWindowsRequest) ... | 621 | 8,770 |
hyperswitch | proto/contract_routing.proto | .proto | syntax = "proto3";
package contract_routing;
service ContractScoreCalculator {
rpc FetchContractScore (CalContractScoreRequest) returns (CalContractScoreResponse);
rpc UpdateContract (UpdateContractRequest) returns (UpdateContractResponse);
rpc InvalidateContract (InvalidateContractRequest) returns (Inva... | 398 | 8,771 |
hyperswitch | proto/health_check.proto | .proto | syntax = "proto3";
package grpc.health.v1;
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}
ServingStatus status = 1;
}
service Health {
... | 103 | 8,772 |
hyperswitch | cypress-tests-v2/package.json | .json | {
"name": "cypress",
"version": "1.0.0",
"description": "Cypress tests suite",
"scripts": {
"cypress": "npx cypress open",
"cypress-e2e": "npx cypress run --e2e",
"cypress:ci": "npx cypress run --headless",
"cypress:payments": "cypress run --headless --spec 'cypress/e2e/spec/Payment/**/*'",
... | 311 | 8,773 |
hyperswitch | cypress-tests-v2/cypress.config.js | .js | const { defineConfig } = require("cypress");
const fs = require("fs-extra");
const path = require("path");
let globalState;
// Fetch from environment variable
const connectorId = process.env.CYPRESS_CONNECTOR || "service";
const reportName = process.env.REPORT_NAME || `${connectorId}_report`;
module.exports = defineC... | 443 | 8,774 |
hyperswitch | cypress-tests-v2/README.md | .md | # Cypress Tests
## Overview
This Tool is a solution designed to automate testing for the [Hyperswitch](https://github.com/juspay/hyperswitch/) using Cypress, an open-source tool capable of conducting API call tests and UI tests. This README provides guidance on installing Cypress and its dependencies.
## Installatio... | 1,784 | 8,775 |
hyperswitch | cypress-tests-v2/package-lock.json | .json | {
"name": "cypress",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cypress",
"version": "1.0.0",
"license": "ISC",
"devDependencies": {
"@types/fs-extra": "^11.0.4",
"cypress": "^13.16.0",
"cypress-mochawesome-repor... | 54,947 | 8,776 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Payment/0000-CoreFlows.cy.js | .js | import * as fixtures from "../../../fixtures/imports";
import State from "../../../utils/State";
import { payment_methods_enabled } from "../../configs/Payment/Commons";
let globalState;
describe("Core APIs", () => {
context("Organization APIs", () => {
before("seed global state", () => {
cy.task("getGlob... | 1,175 | 8,777 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Payment/0002-[3DS]Payments.cy.js | .js | /*
3DS Auto capture with Confirm True
3DS Auto capture with Confirm False
3DS Manual capture with Confirm True
3DS Manual capture with Confirm False
3DS Manual multiple capture with Confirm True
3DS Manual multiple capture with Confirm False
*/
| 52 | 8,778 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Payment/0001-[No3DS]Payments.cy.js | .js | /*
No 3DS Auto capture with Confirm True
No 3DS Auto capture with Confirm False
No 3DS Manual capture with Confirm True
No 3DS Manual capture with Confirm False
No 3DS Manual multiple capture with Confirm True
No 3DS Manual multiple capture with Confirm False
*/
import * as fixtures from "../../../fixtures/imports";
i... | 818 | 8,779 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Payout/0000-CoreFlows.cy.js | .js | describe("template spec", () => {
it("passes", () => {
cy.visit("https://example.cypress.io");
});
});
| 30 | 8,780 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/PaymentMethodList/0000-PaymentmethodList.cy.js | .js | describe("template spec", () => {
it("passes", () => {
cy.visit("https://example.cypress.io");
});
});
| 30 | 8,781 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Routing/0001-PriorityRouting.cy.js | .js | describe("template spec", () => {
it("passes", () => {
cy.visit("https://example.cypress.io");
});
});
| 30 | 8,782 |
hyperswitch | cypress-tests-v2/cypress/e2e/spec/Routing/0000-Coreflows.cy.js | .js | import fixtures from "../../../fixtures/routing.json";
import State from "../../../utils/State";
import * as utils from "../../configs/Routing/Utils";
let globalState;
// Marked as skipped as the List APIs are not implemented yet.
// In addition to this, we do not want to hard code the MCA Ids in the test cases.
desc... | 837 | 8,783 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Payment/Commons.js | .js | // This file is the default. To override, add to connector.js
import { getCustomExchange } from "./_Reusable";
const successfulNo3DSCardDetails = {
card_number: "4111111111111111",
card_exp_month: "08",
card_exp_year: "25",
card_holder_name: "joseph Doe",
card_cvc: "999",
};
const successfulThreeDSTestCard... | 8,913 | 8,784 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Payment/Utils.js | .js | import { connectorDetails as CommonConnectorDetails } from "./Commons.js";
const connectorDetails = {
commons: CommonConnectorDetails,
};
export default function getConnectorDetails(connectorId) {
let x = mergeDetails(connectorId);
return x;
}
function mergeDetails(connectorId) {
const connectorData = getVal... | 672 | 8,785 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Payment/_Reusable.js | .js | import State from "../../../utils/State";
const globalState = new State({
connectorId: Cypress.env("CONNECTOR"),
baseUrl: Cypress.env("BASEURL"),
adminApiKey: Cypress.env("ADMINAPIKEY"),
connectorAuthFilePath: Cypress.env("CONNECTOR_AUTH_FILE_PATH"),
});
const connectorName = normalise(globalState.get("connect... | 599 | 8,786 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Payout/placeholder | none | 0 | 8,787 | |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/PaymentMethodList/placeholder | none | 0 | 8,788 | |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Routing/Utils.js | .js | import { configs as advancedConfigs } from "./AdvancedConfigs.js";
import { configs as fallbackConfigs } from "./FallbackConfigs.js";
const serviceDetails = {
advanced_configs: advancedConfigs,
fallback_configs: fallbackConfigs,
};
export const getServiceDetails = (serviceId) => {
let data = getValueByKey(servi... | 194 | 8,789 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Routing/AdvancedConfigs.js | .js | const data = [
{
connector: "adyen",
merchant_connector_id: "",
},
];
const rules = [
{
name: "rule_1",
connectorSelection: {
type: "priority",
data: [
{
connector: "stripe",
merchant_connector_id: "",
},
{
connector: "bluesnap",
... | 315 | 8,790 |
hyperswitch | cypress-tests-v2/cypress/e2e/configs/Routing/FallbackConfigs.js | .js | export const configs = ["bluesnap"];
| 9 | 8,791 |
hyperswitch | cypress-tests-v2/cypress/support/e2e.js | .js | // ***********************************************************
// 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... | 133 | 8,792 |
hyperswitch | cypress-tests-v2/cypress/support/redirectionHandler.js | .js | import jsQR from "jsqr";
// Define constants for wait times
const TIMEOUT = 20000; // 20 seconds
const WAIT_TIME = 10000; // 10 seconds
const WAIT_TIME_IATAPAY = 20000; // 20 seconds
export function handleRedirection(
redirection_type,
urls,
connectorId,
payment_method_type,
handler_metadata
) {
switch (r... | 3,557 | 8,793 |
hyperswitch | cypress-tests-v2/cypress/support/commands.js | .js | // ***********************************************
// 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
// ***************************... | 10,760 | 8,794 |
hyperswitch | cypress-tests-v2/cypress/fixtures/routing.json | .json | {
"routing_create": {
"name": "",
"description": "",
"algorithm": {
"type": "",
"data": {}
},
"profile_id": "{{profile_id}}"
},
"routing_activate": {
"routing_algorithm_id": ""
},
"default_fallback_update": []
}
| 69 | 8,795 |
hyperswitch | cypress-tests-v2/cypress/fixtures/merchant_account.json | .json | {
"ma_create": {
"merchant_name": "Hyperswitch Seller"
},
"ma_update": {
"merchant_name": "Hyperswitch"
}
}
| 41 | 8,796 |
hyperswitch | cypress-tests-v2/cypress/fixtures/imports.js | .js | import api_key_body from "./api_key.json";
import business_profile_body from "./business_profile.json";
import merchant_account_body from "./merchant_account.json";
import merchant_connector_account_body from "./merchant_connector_account.json";
import organization_body from "./organization.json";
import routing_body f... | 90 | 8,797 |
hyperswitch | cypress-tests-v2/cypress/fixtures/business_profile.json | .json | {
"bp_create": {
"profile_name": "HyperS",
"return_url": "https://hyperswitch.io",
"enable_payment_response_hash": true,
"redirect_to_merchant_with_http_post": false,
"metadata": null,
"order_fulfillment_time": 900,
"order_fulfillment_time_origin": "create",
"applepay_verified_domains"... | 602 | 8,798 |
hyperswitch | cypress-tests-v2/cypress/fixtures/merchant_connector_account.json | .json | {
"mca_create": {
"connector_type": "payment_processor",
"connector_name": "connector",
"connector_account_details": {
"auth_type": "auth_type",
"api_key": "",
"api_secret": "",
"key1": "",
"key2": ""
},
"metadata": {
"status_url": "https://webhook.site",
... | 222 | 8,799 |
hyperswitch | cypress-tests-v2/cypress/fixtures/organization.json | .json | {
"org_create": {
"organization_name": "Hyperswitch"
},
"org_update": {
"organization_name": "Hyperswitch",
"metadata": {
"additional_info": "123"
}
}
}
| 57 | 8,800 |
hyperswitch | cypress-tests-v2/cypress/fixtures/api_key.json | .json | {
"api_key_create": {
"name": "Hyperswitch API Key",
"expiration": "",
"description": null
},
"api_key_update": {
"description": "Hyperswitch Cypress specific API Key",
"expiration": ""
}
}
| 62 | 8,801 |
hyperswitch | cypress-tests-v2/cypress/utils/State.js | .js | class State {
data = {};
constructor(data) {
this.data = data;
this.data["connectorId"] = Cypress.env("CONNECTOR");
this.data["baseUrl"] = Cypress.env("BASEURL");
this.data["adminApiKey"] = Cypress.env("ADMINAPIKEY");
this.data["email"] = Cypress.env("HS_EMAIL");
this.data["password"] = Cypr... | 145 | 8,802 |
hyperswitch | cypress-tests-v2/cypress/utils/RequestBodyUtils.js | .js | const keyPrefixes = {
localhost: {
publishable_key: "pk_dev_",
key_id: "dev_",
},
integ: {
publishable_key: "pk_snd_",
key_id: "snd_",
},
sandbox: {
publishable_key: "pk_snd_",
key_id: "snd_",
},
};
export function isoTimeTomorrow() {
const now = new Date();
// Create a new dat... | 255 | 8,803 |
hyperswitch | connector-template/transformers.rs | .rs | use common_enums::enums;
use serde::{Deserialize, Serialize};
use masking::Secret;
use common_utils::types::{StringMinorUnit};
use hyperswitch_domain_models::{
payment_method_data::PaymentMethodData,
router_data::{ConnectorAuthType, RouterData},
router_flow_types::refunds::{Execute, RSync},
router_reque... | 1,901 | 8,804 |
hyperswitch | connector-template/mod.rs | .rs | pub mod transformers;
use error_stack::{report, ResultExt};
use masking::{ExposeInterface, Mask};
use common_utils::{
errors::CustomResult,
ext_traits::BytesExt,
types::{AmountConvertor, StringMinorUnit, StringMinorUnitForConnector},
request::{Method, Request, RequestBuilder, RequestContent},
};
use ... | 4,645 | 8,805 |
hyperswitch | connector-template/test.rs | .rs | use masking::Secret;
use router::{
types::{self, api, storage::enums,
}};
use crate::utils::{self, ConnectorActions};
use test_utils::connector_auth;
#[derive(Clone, Copy)]
struct {{project-name | downcase | pascal_case}}Test;
impl ConnectorActions for {{project-name | downcase | pascal_case}}Test {}
impl utils::... | 2,965 | 8,806 |
hyperswitch | config/development.toml | .toml | [log.file]
enabled = false
[log.console]
enabled = true
level = "DEBUG"
log_format = "default"
[log.telemetry]
traces_enabled = false
metrics_enabled = false
use_xray_generator = false
bg_metrics_collection_interval_in_secs = 15
[key_manager]
enabled = false
# TODO: Update database credentials before running applic... | 37,507 | 8,807 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.