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: "joseph Doe", card_cvc: "396", }; const customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }; const multiUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { multi_use: { amount: 8000, currency: "EUR", }, }, }; const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { multi_use: { amount: 8000, currency: "EUR", }, }, }; const billingAddress = { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "IT", first_name: "joseph", last_name: "Doe", }, email: "mauro.morandi@nexi.it", phone: { number: "9123456789", country_code: "+91", }, }; const no3DSNotSupportedResponseBody = { error: { type: "invalid_request", message: "No threeds is not supported", code: "IR_00", }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "EUR", amount: 6000, customer_acceptance: null, setup_future_usage: "on_session", billing: billingAddress, }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, PaymentIntentOffSession: { Request: { currency: "EUR", amount: 6000, authentication_type: "no_three_ds", customer_acceptance: null, setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, MITAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: {}, Response: { status: 200, body: { status: "succeeded", }, }, }, MITManualCapture: { Configs: { TRIGGER_SKIP: true, }, Request: {}, Response: { status: 200, body: { status: "requires_capture", }, }, }, "3DSManualCapture": { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", billing: billingAddress, payment_method_data: { card: successfulThreeDSTestCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, "3DSAutoCapture": { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", billing: billingAddress, payment_method_data: { card: successfulThreeDSTestCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", customer_acceptance: null, setup_future_usage: "on_session", billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", customer_acceptance: null, setup_future_usage: "on_session", billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, Capture: { Configs: { TRIGGER_SKIP: true, }, Request: { amount_to_capture: 6000, }, Response: { status: 200, body: { status: "processing", amount: 6000, amount_capturable: 6000, amount_received: null, }, }, }, PartialCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { amount_to_capture: 2000, }, Response: { status: 200, body: { status: "processing", amount: 6000, amount_capturable: 6000, amount_received: 2000, }, }, }, Void: { Request: {}, Response: { status: 200, body: { status: "cancelled", }, }, }, Refund: { Configs: { TRIGGER_SKIP: true, }, Request: { amount: 6000, }, Response: { status: 200, body: { status: "pending", }, }, }, PartialRefund: { Configs: { TRIGGER_SKIP: true, }, Request: { amount: 2000, }, Response: { status: 200, body: { status: "pending", }, }, }, SyncRefund: { Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUse3DSAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", mandate_data: multiUseMandateData, billing: billingAddress, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateMultiUse3DSManualCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", mandate_data: multiUseMandateData, billing: billingAddress, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", mandate_data: multiUseMandateData, billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", mandate_data: multiUseMandateData, billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, MandateSingleUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", mandate_data: singleUseMandateData, billing: billingAddress, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateSingleUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", mandate_data: singleUseMandateData, billing: billingAddress, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", mandate_data: singleUseMandateData, billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", mandate_data: singleUseMandateData, billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, manualPaymentRefund: { Configs: { TRIGGER_SKIP: true, }, Request: { amount: 6000, }, Response: { status: 200, body: { status: "pending", }, }, }, ZeroAuthPaymentIntent: { Request: { amount: 0, setup_future_usage: "off_session", currency: "EUR", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", billing: billingAddress, mandate_data: singleUseMandateData, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, ZeroAuthConfirmPayment: { Request: { payment_type: "setup_mandate", payment_method: "card", payment_method_type: "credit", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", billing: billingAddress, }, Response: { status: 400, body: no3DSNotSupportedResponseBody, }, }, PaymentMethodIdMandateNo3DSAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", amount: 6000, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, PaymentMethodIdMandateNo3DSManualCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", amount: 6000, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, PaymentMethodIdMandate3DSAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", amount: 6000, mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, PaymentMethodIdMandate3DSManualCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "EUR", amount: 6000, mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardUseNo3DSAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "EUR", billing: billingAddress, setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", currency: "EUR", billing: billingAddress, payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardUse3DSAutoCaptureOffSession: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", currency: "EUR", billing: billingAddress, payment_method_type: "debit", payment_method_data: { card: successfulThreeDSTestCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardUseNo3DSManualCaptureOffSession: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", currency: "EUR", billing: billingAddress, payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, };
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 customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "127.0.0.1", user_agent: "amet irure esse", }, }; const paymentMethodData3ds = { card: { last4: "1091", card_type: "CREDIT", card_network: "Visa", card_issuer: "INTL HDQTRS-CENTER OWNED", card_issuing_country: "UNITEDSTATES", card_isin: "400000", card_extended_bin: null, card_exp_month: "12", card_exp_year: "27", card_holder_name: "joseph Doe", payment_checks: null, authentication_data: null, }, billing: { address: null, email: "mauro.morandi@nexi.it", phone: { number: "9123456789", country_code: "+91", }, }, }; const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { single_use: { amount: 1600000, currency: "IDR", }, }, }; const multiUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { multi_use: { amount: 8000, currency: "IDR", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "IDR", customer_acceptance: null, setup_future_usage: "on_session", amount: 6000000, billing: billingDetails, }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, PaymentIntentWithShippingCost: { Request: { currency: "IDR", shipping_cost: 100, }, Response: { status: 200, body: { status: "requires_payment_method", shipping_cost: 100, amount: 6000000, }, }, }, PaymentConfirmWithShippingCost: { Request: { amount: 6000000, payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "processing", shipping_cost: 100, amount: 6000000, }, }, }, No3DSManualCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", amount: 6000000, payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "processing", }, }, }, No3DSAutoCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", amount: 6000000, payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "processing", }, }, }, manualPaymentPartialRefund: { Request: { amount: 2000000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, manualPaymentRefund: { Request: { amount: 6000000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, "3DSAutoCapture": { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", setup_future_usage: "on_session", payment_method_data: paymentMethodData3ds, }, }, }, MandateMultiUseNo3DSAutoCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "processing", }, }, }, SaveCardUseNo3DSAutoCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSManualCaptureOffSession: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "processing", }, }, }, SaveCardConfirmAutoCaptureOffSession: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardConfirmManualCaptureOffSession: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "processing", }, }, }, SaveCardUseNo3DSManualCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "processing", }, }, }, MandateSingleUseNo3DSAutoCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 1000, }, }, Request: { payment_method: "card", amount: 6000000, payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, "3DSManualCapture": { Request: { amount: 6000000, payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "IDR", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", setup_future_usage: "on_session", payment_method_data: paymentMethodData3ds, }, }, }, MandateSingleUseNo3DSManualCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", amount: 6000000, payment_method_data: { card: successfulNo3DSCardDetails, billing: billingDetails, }, currency: "IDR", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "processing", }, }, }, Capture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { amount_to_capture: 6000000, }, Response: { status: 200, body: { status: "succeeded", amount: 6000000, amount_capturable: 0, amount_received: 6000000, }, }, }, PartialCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { amount_to_capture: 2000000, }, Response: { status: 200, body: { status: "partially_captured", amount: 2000000, amount_capturable: 0, amount_received: 2000000, }, }, }, Refund: { Request: { amount: 6000000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, VoidAfterConfirm: { Request: {}, Response: { status: 400, body: { error: { type: "invalid_request", message: "Cancel/Void flow is not supported", code: "IR_19", }, }, }, }, PartialRefund: { Request: { amount: 2000000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SyncRefund: { Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSAutoCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "IDR", billing: billingDetails, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSManualCapture: { Configs: { DELAY: { STATUS: true, TIMEOUT: 3000, }, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, billing: billingDetails, currency: "IDR", mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "processing", }, }, }, }, };
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: { single_use: { amount: 8000, currency: "USD", }, }, }; const multiUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { multi_use: { amount: 8000, currency: "USD", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", billing: { address: { line1: "1467", line2: "CA", line3: "CA", city: "Florence", state: "Tuscany", zip: "12345", country: "IT", first_name: "Max", last_name: "Mustermann", }, email: "mauro.morandi@nexi.it", phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { email: "mauro.morandi@nexi.it", }, }, billing: { email: "mauro.morandi@nexi.it", }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { email: "mauro.morandi@nexi.it", }, }, billing: { email: "mauro.morandi@nexi.it", }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, manualPaymentPartialRefund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, manualPaymentRefund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, email: "johndoe@gmail.com", }, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, email: "johndoe@gmail.com", }, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { email: "mauro.morandi@nexi.it", }, }, currency: "USD", setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, email: "mauro.morandi@nexi.it", }, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSManualCaptureOffSession: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, email: "mauro.morandi@nexi.it", }, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardConfirmAutoCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardConfirmManualCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, email: "mauro.morandi@nexi.it", }, }, currency: "USD", setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { email: "mauro.morandi@nexi.it", }, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, billing: { email: "mauro.morandi@nexi.it", }, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, Capture: { Request: { amount_to_capture: 6000, }, Response: { status: 200, body: { status: "succeeded", amount: 6000, amount_capturable: 0, amount_received: 6000, }, }, }, PartialCapture: { Request: { amount_to_capture: 2000, }, Response: { status: 200, body: { status: "partially_captured", amount: 6000, amount_capturable: 0, amount_received: 2000, }, }, }, Refund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, VoidAfterConfirm: { Request: {}, Response: { status: 501, body: { error: { type: "invalid_request", message: "Cancel/Void flow is not implemented", code: "IR_00", }, }, }, }, PartialRefund: { Request: { amount: 2000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SyncRefund: { Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", billing: { email: "mauro.morandi@nexi.it", }, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, billing: { email: "mauro.morandi@nexi.it", }, currency: "USD", mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, }, };
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_name: "joseph Doe", card_cvc: "123", }; const customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "127.0.0.1", user_agent: "amet irure esse", }, }; const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { single_use: { amount: 8000, currency: "EUR", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "EUR", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, "3DSManualCapture": { Request: { payment_method: "card", billing: { address: { line1: "1467", line2: "CA", line3: "CA", city: "Musterhausen", state: "California", zip: "12345", country: "DE", first_name: "Max", last_name: "Mustermann", }, email: "test@novalnet.de", phone: { number: "9123456789", country_code: "+91", }, }, payment_method_data: { card: successfulThreeDSTestCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, "3DSAutoCapture": { Request: { payment_method: "card", billing: { address: { line1: "1467", line2: "CA", line3: "CA", city: "Musterhausen", state: "California", zip: "12345", country: "DE", first_name: "Max", last_name: "Mustermann", }, email: "test@novalnet.de", phone: { number: "9123456789", country_code: "+91", }, }, payment_method_data: { card: successfulThreeDSTestCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, //TODO: Add No3DSManualCapture, No3DSAutoCapture // No3DSManualCapture: { // Request: { // payment_method: "card", // payment_method_data: { // card: successfulNo3DSCardDetails, // }, // customer_acceptance: null, // setup_future_usage: "on_session", // }, // Response: { // status: 200, // body: { // status: "requires_capture", // }, // }, // }, // No3DSAutoCapture: { // Request: { // payment_method: "card", // payment_method_data: { // card: successfulNo3DSCardDetails, // }, // customer_acceptance: null, // setup_future_usage: "on_session", // }, // Response: { // status: 200, // body: { // status: "succeeded", // }, // }, // }, Capture: { Request: { amount_to_capture: 6000, }, Response: { status: 200, body: { status: "succeeded", amount: 6000, amount_capturable: 0, amount_received: 6000, }, }, }, PartialCapture: { Request: { amount_to_capture: 2000, }, Response: { status: 200, body: { status: "partially_captured", amount: 6000, amount_capturable: 0, amount_received: 2000, }, }, }, Void: { Request: {}, Response: { status: 200, body: { status: "cancelled", }, }, }, Refund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PartialRefund: { Request: { amount: 2000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SyncRefund: { Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardConfirmAutoCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, trigger_skip: true, body: { status: "requires_customer_action", }, }, }, PaymentIntentOffSession: { Request: { currency: "EUR", amount: 6000, authentication_type: "no_three_ds", customer_acceptance: null, setup_future_usage: "off_session", }, Response: { status: 200, trigger_skip: true, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, MITAutoCapture: { Request: {}, Response: { status: 200, body: { status: "succeeded", }, }, }, MITManualCapture: { Request: {}, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUse3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulThreeDSTestCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, ZeroAuthPaymentIntent: { Request: { amount: 0, setup_future_usage: "off_session", currency: "EUR", }, Response: { status: 200, trigger_skip: true, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, trigger_skip: true, body: { status: "succeeded", }, }, }, ZeroAuthConfirmPayment: { Request: { payment_type: "setup_mandate", payment_method: "card", payment_method_type: "credit", payment_method_data: { card: successfulNo3DSCardDetails, }, }, Response: { status: 501, body: { error: { type: "invalid_request", message: "Setup Mandate flow for Novalnet is not implemented", code: "IR_00", }, }, }, }, }, pm_list: { PmListResponse: { PmListNull: { payment_methods: [], }, pmListDynamicFieldWithoutBilling: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["novalnet"], }, ], required_fields: { "billing.address.first_name": { required_field: "payment_method_data.billing.address.first_name", display_name: "first_name", field_type: "user_full_name", value: null, }, "billing.address.last_name": { required_field: "payment_method_data.billing.address.last_name", display_name: "last_name", field_type: "user_full_name", value: null, }, "billing.email": { required_field: "payment_method_data.billing.email", display_name: "email_address", field_type: "user_email_address", value: "hyperswitch_sdk_demo_id@gmail.com", }, }, }, ], }, ], }, pmListDynamicFieldWithBilling: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["novalnet"], }, ], required_fields: { "billing.address.first_name": { required_field: "payment_method_data.billing.address.first_name", display_name: "first_name", field_type: "user_full_name", value: "joseph", }, "billing.address.last_name": { required_field: "payment_method_data.billing.address.last_name", display_name: "last_name", field_type: "user_full_name", value: "Doe", }, "billing.email": { required_field: "payment_method_data.billing.email", display_name: "email_address", field_type: "user_email_address", value: "hyperswitch.example@gmail.com", }, }, }, ], }, ], }, pmListDynamicFieldWithNames: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["novalnet"], }, ], required_fields: { "billing.address.first_name": { required_field: "payment_method_data.billing.address.first_name", display_name: "first_name", field_type: "user_full_name", value: "joseph", }, "billing.address.last_name": { required_field: "payment_method_data.billing.address.last_name", display_name: "last_name", field_type: "user_full_name", value: "Doe", }, "billing.email": { required_field: "payment_method_data.billing.email", display_name: "email_address", field_type: "user_email_address", value: "hyperswitch.example@gmail.com", }, }, }, ], }, ], }, pmListDynamicFieldWithEmail: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["novalnet"], }, ], required_fields: { "billing.address.first_name": { required_field: "payment_method_data.billing.address.first_name", display_name: "first_name", field_type: "user_full_name", value: "joseph", }, "billing.address.last_name": { required_field: "payment_method_data.billing.address.last_name", display_name: "last_name", field_type: "user_full_name", value: "Doe", }, "billing.email": { required_field: "payment_method_data.billing.email", display_name: "email_address", field_type: "user_email_address", value: "hyperswitch.example@gmail.com", }, }, }, ], }, ], }, }, }, };
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 = { user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", accept_header: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", language: "nl-NL", color_depth: 24, screen_height: 723, screen_width: 1536, time_zone: 0, java_enabled: true, java_script_enabled: true, ip_address: "127.0.0.1", }; const successfulNoThreeDsCardDetailsRequest = { card_number: "4242424242424242", card_exp_month: "10", card_exp_year: "30", card_holder_name: "morino", card_cvc: "737", }; const successfulThreeDsTestCardDetailsRequest = { card_number: "4000000000001091", card_exp_month: "10", card_exp_year: "30", card_holder_name: "morino", card_cvc: "737", }; const paymentMethodDataNoThreeDsResponse = { card: { last4: "4242", card_type: "CREDIT", card_network: "Visa", card_issuer: "STRIPE PAYMENTS UK LIMITED", card_issuing_country: "UNITEDKINGDOM", card_isin: "424242", card_extended_bin: null, card_exp_month: "10", card_exp_year: "30", card_holder_name: "morino", payment_checks: null, authentication_data: null, }, billing: null, }; const paymentMethodDataThreeDsResponse = { card: { last4: "1091", card_type: "CREDIT", card_network: "Visa", card_issuer: "INTL HDQTRS-CENTER OWNED", card_issuing_country: "UNITEDSTATES", card_isin: "400000", card_extended_bin: null, card_exp_month: "10", card_exp_year: "30", card_holder_name: "morino", payment_checks: null, authentication_data: null, }, billing: null, }; const customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }; const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { single_use: { amount: 8000, currency: "USD", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "on_session", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, customer_acceptance: null, setup_future_usage: "on_session", billing: billing, }, Response: { status: 200, body: { status: "requires_capture", payment_method: "card", payment_method_type: "credit", attempt_count: 1, payment_method_data: paymentMethodDataNoThreeDsResponse, }, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", payment_method: "card", payment_method_type: "credit", attempt_count: 1, payment_method_data: paymentMethodDataNoThreeDsResponse, }, }, }, Capture: { Request: { amount_to_capture: 6000, }, Response: { status: 200, body: { status: "succeeded", amount: 6000, amount_capturable: 0, }, }, }, PartialCapture: { Request: { amount_to_capture: 2000, payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", customer_acceptance: null, }, Response: { status: 200, body: { status: "partially_captured", amount: 6000, amount_capturable: 0, }, }, }, Void: getCustomExchange({ Request: {}, Response: { status: 200, body: { status: "cancelled", }, }, ResponseCustom: { body: { type: "invalid_request", message: "You cannot cancel this payment because it has status processing", code: "IR_16", }, }, }), VoidAfterConfirm: { Request: {}, Response: { status: 200, body: { status: "processing", }, }, }, SaveCardUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSManualCaptureOffSession: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardConfirmManualCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", setup_future_usage: "on_session", browser_info, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUse3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulThreeDsTestCardDetailsRequest, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardConfirmAutoCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, "3DSManualCapture": { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulThreeDsTestCardDetailsRequest, }, customer_acceptance: null, setup_future_usage: "on_session", browser_info, }, Response: { status: 200, body: { status: "requires_customer_action", setup_future_usage: "on_session", payment_method_data: paymentMethodDataThreeDsResponse, }, }, }, "3DSAutoCapture": { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulThreeDsTestCardDetailsRequest, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", browser_info, }, Response: { status: 200, body: { status: "requires_customer_action", setup_future_usage: "on_session", payment_method_data: paymentMethodDataThreeDsResponse, }, }, }, CaptureCapturedAmount: { Request: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "EUR", customer_acceptance: null, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "This Payment could not be captured because it has a payment.status of succeeded. The expected state is requires_capture, partially_captured_and_capturable, processing", code: "IR_14", }, }, }, }, ConfirmSuccessfulPayment: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, customer_acceptance: null, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "You cannot confirm this payment because it has status succeeded", code: "IR_16", }, }, }, }, Refund: { Request: { amount: 6000, }, Response: { body: { status: "succeeded", }, }, }, PartialRefund: { Request: { amount: 2000, }, Response: { body: { status: "succeeded", }, }, }, manualPaymentRefund: { Request: { amount: 6000, }, Response: { body: { status: "succeeded", }, }, }, manualPaymentPartialRefund: { Request: { amount: 2000, }, Response: { body: { status: "succeeded", }, }, }, SyncRefund: { Response: { body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, PaymentIntentOffSession: { Request: { amount: 6000, authentication_type: "no_three_ds", currency: "USD", customer_acceptance: null, setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, MITAutoCapture: { Request: {}, Response: { status: 200, body: { status: "succeeded", }, }, }, MITManualCapture: { Request: {}, Response: { status: 200, body: { status: "requires_capture", }, }, }, PaymentIntentWithShippingCost: { Request: { currency: "USD", shipping_cost: 50, }, Response: { status: 200, body: { status: "requires_payment_method", shipping_cost: 50, amount: 6000, }, }, }, PaymentConfirmWithShippingCost: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", shipping_cost: 50, amount_received: 6050, amount: 6000, net_amount: 6050, }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { trigger_skip: true, status: 200, body: { error_code: "internalErrorOccurred", error_message: "We cannot currently process your request. Please contact support.", status: "failed", payment_method_id: null, }, }, }, ZeroAuthPaymentIntent: { Request: { amount: 0, setup_future_usage: "off_session", currency: "USD", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, ZeroAuthConfirmPayment: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { trigger_skip: true, status: 200, body: { error_code: "internalErrorOccurred", error_message: "We cannot currently process your request. Please contact support.", status: "failed", payment_method_id: null, }, }, }, PaymentMethodIdMandateNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNoThreeDsCardDetailsRequest, }, currency: "USD", mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, PaymentMethodIdMandate3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDsTestCardDetailsRequest, }, currency: "USD", mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, PaymentMethodIdMandate3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDsTestCardDetailsRequest, }, mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, pm_list: { PmListResponse: { pmListDynamicFieldWithoutBilling: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [{ eligible_connectors: ["worldpay"] }], required_fields: { "payment_method_data.card.card_number": { required_field: "payment_method_data.card.card_number", display_name: "card_number", field_type: "user_card_number", value: null, }, "payment_method_data.card.card_exp_month": { required_field: "payment_method_data.card.card_exp_month", display_name: "card_exp_month", field_type: "user_card_expiry_month", value: null, }, "payment_method_data.card.card_exp_year": { required_field: "payment_method_data.card.card_exp_year", display_name: "card_exp_year", field_type: "user_card_expiry_year", value: null, }, "billing.address.line1": { required_field: "payment_method_data.billing.address.line1", display_name: "line1", field_type: "user_address_line1", value: null, }, "billing.address.country": { required_field: "payment_method_data.billing.address.country", display_name: "country", field_type: { user_address_country: { options: [ "AF", "AU", "AW", "AZ", "BS", "BH", "BD", "BB", "BZ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BI", "KH", "CA", "CV", "KY", "CL", "CO", "KM", "CD", "CR", "CZ", "DZ", "DK", "DJ", "ST", "DO", "EC", "EG", "SV", "ER", "ET", "FK", "FJ", "GM", "GE", "GH", "GI", "GT", "GN", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KW", "LA", "LB", "LS", "LR", "LY", "LT", "MO", "MK", "MG", "MW", "MY", "MV", "MR", "MU", "MX", "MD", "MN", "MA", "MZ", "MM", "NA", "NZ", "NI", "NG", "KP", "NO", "AR", "PK", "PG", "PY", "PE", "UY", "PH", "PL", "GB", "QA", "OM", "RO", "RU", "RW", "WS", "SG", "ST", "ZA", "KR", "LK", "SH", "SD", "SR", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TT", "TN", "TR", "UG", "UA", "US", "UZ", "VU", "VE", "VN", "ZM", "ZW", ], }, }, value: null, }, "billing.address.city": { required_field: "payment_method_data.billing.address.city", display_name: "city", field_type: "user_address_city", value: null, }, "billing.address.zip": { required_field: "payment_method_data.billing.address.zip", display_name: "zip", field_type: "user_address_pincode", value: null, }, }, }, ], }, ], }, pmListDynamicFieldWithBilling: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [{ eligible_connectors: ["worldpay"] }], required_fields: { "payment_method_data.card.card_number": { required_field: "payment_method_data.card.card_number", display_name: "card_number", field_type: "user_card_number", value: null, }, "payment_method_data.card.card_exp_month": { required_field: "payment_method_data.card.card_exp_month", display_name: "card_exp_month", field_type: "user_card_expiry_month", value: null, }, "payment_method_data.card.card_exp_year": { required_field: "payment_method_data.card.card_exp_year", display_name: "card_exp_year", field_type: "user_card_expiry_year", value: null, }, "billing.address.line1": { required_field: "payment_method_data.billing.address.line1", display_name: "line1", field_type: "user_address_line1", value: "1467", }, "billing.address.country": { required_field: "payment_method_data.billing.address.country", display_name: "country", field_type: { user_address_country: { options: [ "AF", "AU", "AW", "AZ", "BS", "BH", "BD", "BB", "BZ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BI", "KH", "CA", "CV", "KY", "CL", "CO", "KM", "CD", "CR", "CZ", "DZ", "DK", "DJ", "ST", "DO", "EC", "EG", "SV", "ER", "ET", "FK", "FJ", "GM", "GE", "GH", "GI", "GT", "GN", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KW", "LA", "LB", "LS", "LR", "LY", "LT", "MO", "MK", "MG", "MW", "MY", "MV", "MR", "MU", "MX", "MD", "MN", "MA", "MZ", "MM", "NA", "NZ", "NI", "NG", "KP", "NO", "AR", "PK", "PG", "PY", "PE", "UY", "PH", "PL", "GB", "QA", "OM", "RO", "RU", "RW", "WS", "SG", "ST", "ZA", "KR", "LK", "SH", "SD", "SR", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TT", "TN", "TR", "UG", "UA", "US", "UZ", "VU", "VE", "VN", "ZM", "ZW", ], }, }, value: "PL", }, "billing.address.city": { required_field: "payment_method_data.billing.address.city", display_name: "city", field_type: "user_address_city", value: "San Fransico", }, "billing.address.zip": { required_field: "payment_method_data.billing.address.zip", display_name: "zip", field_type: "user_address_pincode", value: "94122", }, }, }, ], }, ], }, pmListDynamicFieldWithNames: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["worldpay"], }, ], required_fields: { "billing.address.country": { required_field: "payment_method_data.billing.address.country", display_name: "country", field_type: { user_address_country: { options: [ "AF", "AU", "AW", "AZ", "BS", "BH", "BD", "BB", "BZ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BI", "KH", "CA", "CV", "KY", "CL", "CO", "KM", "CD", "CR", "CZ", "DZ", "DK", "DJ", "ST", "DO", "EC", "EG", "SV", "ER", "ET", "FK", "FJ", "GM", "GE", "GH", "GI", "GT", "GN", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KW", "LA", "LB", "LS", "LR", "LY", "LT", "MO", "MK", "MG", "MW", "MY", "MV", "MR", "MU", "MX", "MD", "MN", "MA", "MZ", "MM", "NA", "NZ", "NI", "NG", "KP", "NO", "AR", "PK", "PG", "PY", "PE", "UY", "PH", "PL", "GB", "QA", "OM", "RO", "RU", "RW", "WS", "SG", "ST", "ZA", "KR", "LK", "SH", "SD", "SR", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TT", "TN", "TR", "UG", "UA", "US", "UZ", "VU", "VE", "VN", "ZM", "ZW", ], }, }, value: null, }, "billing.address.zip": { required_field: "payment_method_data.billing.address.zip", display_name: "zip", field_type: "user_address_pincode", value: null, }, "billing.address.city": { required_field: "payment_method_data.billing.address.city", display_name: "city", field_type: "user_address_city", value: null, }, "billing.address.line1": { required_field: "payment_method_data.billing.address.line1", display_name: "line1", field_type: "user_address_line1", value: null, }, "payment_method_data.card.card_exp_year": { required_field: "payment_method_data.card.card_exp_year", display_name: "card_exp_year", field_type: "user_card_expiry_year", value: null, }, "payment_method_data.card.card_number": { required_field: "payment_method_data.card.card_number", display_name: "card_number", field_type: "user_card_number", value: null, }, "payment_method_data.card.card_exp_month": { required_field: "payment_method_data.card.card_exp_month", display_name: "card_exp_month", field_type: "user_card_expiry_month", value: null, }, }, }, ], }, ], }, pmListDynamicFieldWithEmail: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["worldpay"], }, ], required_fields: { "payment_method_data.card.card_exp_year": { required_field: "payment_method_data.card.card_exp_year", display_name: "card_exp_year", field_type: "user_card_expiry_year", value: null, }, "payment_method_data.card.card_number": { required_field: "payment_method_data.card.card_number", display_name: "card_number", field_type: "user_card_number", value: null, }, "payment_method_data.card.card_exp_month": { required_field: "payment_method_data.card.card_exp_month", display_name: "card_exp_month", field_type: "user_card_expiry_month", value: null, }, "billing.address.zip": { required_field: "payment_method_data.billing.address.zip", display_name: "zip", field_type: "user_address_pincode", value: null, }, "billing.address.city": { required_field: "payment_method_data.billing.address.city", display_name: "city", field_type: "user_address_city", value: null, }, "billing.address.line1": { required_field: "payment_method_data.billing.address.line1", display_name: "line1", field_type: "user_address_line1", value: null, }, "billing.address.country": { required_field: "payment_method_data.billing.address.country", display_name: "country", field_type: { user_address_country: { options: [ "AF", "AU", "AW", "AZ", "BS", "BH", "BD", "BB", "BZ", "BM", "BT", "BO", "BA", "BW", "BR", "BN", "BG", "BI", "KH", "CA", "CV", "KY", "CL", "CO", "KM", "CD", "CR", "CZ", "DZ", "DK", "DJ", "ST", "DO", "EC", "EG", "SV", "ER", "ET", "FK", "FJ", "GM", "GE", "GH", "GI", "GT", "GN", "GY", "HT", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IL", "IT", "JM", "JP", "JO", "KZ", "KE", "KW", "LA", "LB", "LS", "LR", "LY", "LT", "MO", "MK", "MG", "MW", "MY", "MV", "MR", "MU", "MX", "MD", "MN", "MA", "MZ", "MM", "NA", "NZ", "NI", "NG", "KP", "NO", "AR", "PK", "PG", "PY", "PE", "UY", "PH", "PL", "GB", "QA", "OM", "RO", "RU", "RW", "WS", "SG", "ST", "ZA", "KR", "LK", "SH", "SD", "SR", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TT", "TN", "TR", "UG", "UA", "US", "UZ", "VU", "VE", "VN", "ZM", "ZW", ], }, }, value: null, }, }, }, ], }, ], }, }, }, };
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("connectorId")); function normalize(input) { const exceptions = { bankofamerica: "Bank of America", cybersource: "Cybersource", paybox: "Paybox", paypal: "Paypal", wellsfargo: "Wellsfargo", noon: "Noon", // Add more known exceptions here }; if (typeof input !== "string") { const specName = Cypress.spec.name; if (specName.includes("-")) { const parts = specName.split("-"); if (parts.length > 1 && parts[1].includes(".")) { return parts[1].split(".")[0]; } } // Fallback return `${specName}`; } const lowerCaseInput = input.toLowerCase(); return exceptions[lowerCaseInput] || input; } /* `getDefaultExchange` contains the default Request and Response to be considered if none provided. `getCustomExchange` takes in 2 optional fields named as Request and Response. with `getCustomExchange`, if 501 response is expected, there is no need to pass Response as it considers default values. */ // Const to get default PaymentExchange object const getDefaultExchange = () => ({ Request: {}, Response: { status: 501, body: { error: { type: "invalid_request", message: `Selected payment method through ${connectorName} is not implemented`, code: "IR_00", }, }, }, }); const getUnsupportedExchange = () => ({ Request: { currency: "EUR", }, Response: { status: 400, body: { error: { type: "invalid_request", message: `Payment method type not supported`, code: "IR_19", }, }, }, }); // Const to get PaymentExchange with overridden properties export const getCustomExchange = (overrides) => { const defaultExchange = getDefaultExchange(); return { ...defaultExchange, ...(overrides.Configs ? { Configs: overrides.Configs } : {}), Request: { ...defaultExchange.Request, ...(overrides.Request || {}), }, Response: { ...defaultExchange.Response, ...(overrides.Response || {}), }, ...(overrides.ResponseCustom ? { ResponseCustom: overrides.ResponseCustom } : {}), }; }; // Function to update the default status code export const updateDefaultStatusCode = () => { return getUnsupportedExchange().Response; };
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: "01", card_exp_year: "50", card_holder_name: "joseph Doe", card_cvc: "123", }; const customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }; const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { single_use: { amount: 8000, currency: "USD", }, }, }; const multiUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { multi_use: { amount: 8000, currency: "USD", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, PaymentIntentWithShippingCost: { Request: { currency: "USD", shipping_cost: 50, }, Response: { status: 200, body: { status: "requires_payment_method", shipping_cost: 50, amount: 6000, }, }, }, PaymentConfirmWithShippingCost: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "failed", error_code: "AMOUNT_MISMATCH", error_message: "description - Should equal item_total + tax_total + shipping + handling + insurance - shipping_discount - discount., value - 60.50, field - value;", }, }, }, "3DSManualCapture": { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, "3DSAutoCapture": { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, Capture: { Request: { amount_to_capture: 6000, }, Response: { status: 200, body: { status: "succeeded", amount: 6000, amount_capturable: 0, amount_received: 6000, }, }, }, PartialCapture: { Request: { amount_to_capture: 2000, }, Response: { status: 200, body: { status: "partially_captured", amount: 6000, amount_capturable: 0, amount_received: 2000, }, }, }, Void: { Request: {}, Response: { status: 200, body: { status: "cancelled", }, }, }, Refund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PartialRefund: { Request: { amount: 2000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, manualPaymentRefund: { Request: { amount: 6000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, manualPaymentPartialRefund: { Request: { amount: 2000, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SyncRefund: { Response: { status: 200, body: { status: "succeeded", }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, ZeroAuthPaymentIntent: { Request: { amount: 0, setup_future_usage: "off_session", currency: "USD", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, ZeroAuthConfirmPayment: { Request: { payment_type: "setup_mandate", payment_method: "card", payment_method_type: "credit", payment_method_data: { card: successfulNo3DSCardDetails, }, }, Response: { status: 200, body: { status: "succeeded", setup_future_usage: "off_session", }, }, }, SaveCardConfirmAutoCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentIntentOffSession: { Request: { currency: "USD", amount: 6000, authentication_type: "no_three_ds", customer_acceptance: null, setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_payment_method", setup_future_usage: "off_session", }, }, }, SaveCardUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "on_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardUseNo3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUse3DSAutoCaptureOffSession: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: successfulThreeDSTestCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, SaveCardUseNo3DSManualCaptureOffSession: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, SaveCardConfirmManualCaptureOffSession: { Request: { setup_future_usage: "off_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateSingleUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MITAutoCapture: { Request: {}, Response: { status: 200, body: { status: "succeeded", }, }, }, MITManualCapture: { Request: {}, Response: { status: 200, body: { status: "requires_capture", }, }, }, PaymentMethodIdMandateNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "succeeded", }, }, }, PaymentMethodIdMandateNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: null, customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, PaymentMethodIdMandate3DSAutoCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, PaymentMethodIdMandate3DSManualCapture: { Configs: { TRIGGER_SKIP: true, }, Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, mandate_data: null, authentication_type: "three_ds", customer_acceptance: customerAcceptance, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, bank_redirect_pm: { PaymentIntent: getCustomExchange({ Request: { currency: "EUR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), Ideal: { Request: { payment_method: "bank_redirect", payment_method_type: "ideal", payment_method_data: { bank_redirect: { ideal: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, Giropay: { Request: { payment_method: "bank_redirect", payment_method_type: "giropay", payment_method_data: { bank_redirect: { giropay: { bank_name: "", bank_account_bic: "", bank_account_iban: "", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "failed", error_code: "PERMISSION_DENIED", }, }, }, Sofort: { Request: { payment_method: "bank_redirect", payment_method_type: "sofort", payment_method_data: { bank_redirect: { sofort: { preferred_language: "en", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "AT", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "failed", error_code: "PERMISSION_DENIED", }, }, }, Eps: { Request: { payment_method: "bank_redirect", payment_method_type: "eps", payment_method_data: { bank_redirect: { eps: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "AT", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, };
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_exp_month: "03", card_exp_year: "2030", card_holder_name: "John Doe", }; 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 = { card_pm: { Create: getCustomExchange({ Request: { payout_type: "card", payout_method_data: { card: card_data, }, currency: "EUR", }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "card", }, }, }), Confirm: getCustomExchange({ Request: { payout_type: "card", payout_method_data: { card: card_data, }, currency: "EUR", }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "card", }, }, }), Fulfill: getCustomExchange({ Request: { payout_type: "card", payout_method_data: { card: card_data, }, currency: "EUR", }, }), SavePayoutMethod: getCustomExchange({ Request: { payment_method: "card", payment_method_type: "credit", card: payment_card_data, metadata: { city: "NY", unit: "245", }, }, Response: { status: 200, }, }), Token: getCustomExchange({ Request: { payout_token: "token", payout_type: "card", }, }), }, bank_transfer_pm: { Create: getCustomExchange({ Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "bank", }, }, }), Confirm: getCustomExchange({ Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "bank", }, }, }), Fulfill: getCustomExchange({ Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, }), Token: getCustomExchange({ Request: { payout_token: "token", payout_type: "card", }, }), }, };
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 { connectorDetails as wiseConnectorDetails } from "./Wise.js"; import { connectorDetails as nomupayConnectorDetails } from "./Nomupay.js"; const connectorDetails = { adyen: adyenConnectorDetails, adyenplatform: adyenPlatformConnectorDetails, commons: CommonConnectorDetails, wise: wiseConnectorDetails, nomupay: nomupayConnectorDetails, }; export function getConnectorDetails(connectorId) { const x = mergeDetails(connectorId); return x; } function mergeDetails(connectorId) { const connectorData = getValueByKey(connectorDetails, connectorId); const fallbackData = getValueByKey(connectorDetails, "commons"); // Merge data, prioritizing connectorData and filling missing data from fallbackData const mergedDetails = mergeConnectorDetails(connectorData, fallbackData); return mergedDetails; } function mergeConnectorDetails(source, fallback) { const merged = {}; // Loop through each key in the source object for (const key in source) { merged[key] = { ...source[key] }; // Copy properties from source // Check if fallback has the same key and properties are missing in source if (fallback[key]) { for (const subKey in fallback[key]) { if (!merged[key][subKey]) { merged[key][subKey] = fallback[key][subKey]; } } } } // Add missing keys from fallback that are not present in source for (const key in fallback) { if (!merged[key]) { merged[key] = fallback[key]; } } return merged; } export function getValueByKey(jsonObject, key) { const data = typeof jsonObject === "string" ? JSON.parse(jsonObject) : jsonObject; if (data && typeof data === "object" && key in data) { // Connector object has multiple keys if (typeof data[key].connector_account_details === "undefined") { const keys = Object.keys(data[key]); for (let i = 0; i < keys.length; i++) { const currentItem = data[key][keys[i]]; if ( Object.prototype.hasOwnProperty.call( currentItem, "connector_account_details" ) ) { Cypress.env("MULTIPLE_CONNECTORS", { status: true, count: keys.length, }); return currentItem; } } } return data[key]; } else { return null; } } export const should_continue_further = (data) => { const resData = data.Response || {}; const configData = validateConfig(data.Configs) || {}; if (typeof configData?.TRIGGER_SKIP !== "undefined") { return !configData.TRIGGER_SKIP; } if ( typeof resData.body.error !== "undefined" || typeof resData.body.error_code !== "undefined" || typeof resData.body.error_message !== "undefined" ) { return false; } else { return true; } };
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: { 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 = { card_pm: { Create: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "card", }, }, }, Confirm: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "card", }, }, }, Fulfill: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", recurring: true, }, Response: { status: 200, body: { status: "success", payout_type: "card", }, }, }, SavePayoutMethod: { Request: { payment_method: "card", payment_method_type: "credit", card: payment_card_data, metadata: { city: "NY", unit: "245", }, }, Response: { status: 200, }, }, Token: { Request: { payout_token: "token", payout_type: "card", }, Response: { status: 200, body: { status: "success", payout_type: "card", }, }, }, }, bank_transfer_pm: { sepa_bank_transfer: { Create: { Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "bank", }, }, }, Confirm: { Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "bank", }, }, }, Fulfill: { Request: { payout_type: "bank", priority: "regular", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, recurring: true, }, Response: { status: 200, body: { status: "initiated", payout_type: "bank", }, }, }, SavePayoutMethod: { Request: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", bank_transfer: { iban: "NL57INGB4654188101", }, }, Response: { status: 200, body: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", }, }, }, Token: { Request: { payout_token: "token", payout_type: "bank", }, Response: { status: 200, body: { status: "initiated", payout_type: "bank", }, }, }, }, }, };
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", country_code: "+91", }, email: `payout_customer${Date.now() + x}@example.com`, }; } 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 bank = { iban: "DE57331060435647542639", bic: "DEUTDE5M551", bank_name: "Deutsche Bank", bank_country_code: "DE", bank_city: "Munich", }; const error = { code: "IR_04", message: "Missing required param: connector_customer_id", type: "invalid_request", }; export const connectorDetails = { card_pm: { Create: { Request: { payout_method_data: { card: card_data, }, payout_type: "card", }, Response: { status: 501, body: { error: error, }, }, }, Confirm: { Request: { payout_method_data: { card: card_data, }, payout_type: "card", }, Response: { status: 501, body: { error: error, }, }, }, Fulfill: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", recurring: true, }, Response: { status: 501, body: { error: error, }, }, }, SavePayoutMethod: { Request: { payment_method: "card", payment_method_type: "credit", card: payment_card_data, metadata: { city: "NY", unit: "245", }, }, Response: { status: 200, }, }, Token: { Request: { payout_token: "token", payout_type: "card", }, Response: { status: 501, body: { error: error, }, }, }, }, bank_transfer_pm: { sepa_bank_transfer: { Create: { Request: { currency: "EUR", payout_type: "bank", payout_method_data: { bank: bank, }, billing: get_billing(1), }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "bank", }, }, }, Confirm: { Request: { payout_type: "bank", payout_method_data: { bank: bank, }, billing: get_billing(2), }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "bank", }, }, }, Fulfill: { Request: { currency: "EUR", payout_type: "bank", payout_method_data: { bank: bank, }, billing: get_billing(3), recurring: true, }, Response: { status: 200, body: { status: "pending", payout_type: "bank", }, }, }, SavePayoutMethod: { Request: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", bank_transfer: bank, }, Response: { status: 200, body: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", }, }, }, Token: { Request: { payout_token: "token", payout_type: "bank", billing: get_billing(4), recurring: true, }, Response: { status: 200, body: { status: "pending", payout_type: "bank", }, }, }, }, }, };
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: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "CA", zip: "94122", country: "US", first_name: "John", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }; export const connectorDetails = { card_pm: { Create: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", }, Response: { status: 501, body: { error: { type: "invalid_request", message: `Payout Eligibility for Wise is not implemented`, code: "IR_00", }, }, }, }, Confirm: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", }, Response: { status: 501, body: { error: { type: "invalid_request", message: `Payout Eligibility for Wise is not implemented`, code: "IR_00", }, }, }, }, Fulfill: { Request: { payout_method_data: { card: card_data, }, currency: "EUR", payout_type: "card", recurring: true, }, Response: { status: 501, body: { error: { type: "invalid_request", message: `Payout Eligibility for Wise is not implemented`, code: "IR_00", }, }, }, }, SavePayoutMethod: { Request: { payment_method: "card", payment_method_type: "credit", card: payment_card_data, metadata: { city: "NY", unit: "245", }, }, Response: { status: 200, }, }, Token: { Request: { payout_token: "token", payout_type: "card", }, Response: { status: 501, body: { error: { type: "invalid_request", message: `Payout Eligibility for Wise is not implemented`, code: "IR_00", }, }, }, }, }, bank_transfer_pm: { sepa_bank_transfer: { Create: { Request: { currency: "GBP", payout_type: "bank", payout_method_data: { bank: { iban: "NL46TEST0136169112", bic: "ABNANL2A", bank_name: "Deutsche Bank", bank_country_code: "NL", bank_city: "Amsterdam", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "bank", }, }, }, Confirm: { Request: { currency: "GBP", payout_type: "bank", payout_method_data: { bank: { iban: "NL46TEST0136169112", bic: "ABNANL2A", bank_name: "Deutsche Bank", bank_country_code: "NL", bank_city: "Amsterdam", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "bank", }, }, }, Fulfill: { Request: { currency: "GBP", payout_type: "bank", payout_method_data: { bank: { iban: "NL46TEST0136169112", bic: "ABNANL2A", bank_name: "Deutsche Bank", bank_country_code: "NL", bank_city: "Amsterdam", }, }, billing: billing, recurring: true, }, Response: { status: 200, body: { status: "success", payout_type: "bank", }, }, }, SavePayoutMethod: { Request: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", bank_transfer: { iban: "NL46TEST0136169112", bic: "ABNANL2A", bank_name: "Deutsche Bank", bank_country_code: "NL", bank_city: "Amsterdam", }, }, Response: { status: 200, body: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", }, }, }, Token: { Request: { currency: "GBP", payout_token: "token", payout_type: "bank", }, Response: { status: 200, body: { status: "success", payout_type: "bank", }, }, }, }, }, };
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_transfer_pm: { sepa_bank_transfer: { Create: { Request: { payout_type: "bank", priority: "instant", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_confirmation", payout_type: "bank", }, }, }, Confirm: { Request: { payout_type: "bank", priority: "instant", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, }, Response: { status: 200, body: { status: "requires_fulfillment", payout_type: "bank", }, }, }, Fulfill: { Request: { payout_type: "bank", priority: "instant", payout_method_data: { bank: { iban: "NL57INGB4654188101", }, }, billing: billing, recurring: true, }, Response: { status: 200, body: { status: "initiated", payout_type: "bank", }, }, }, SavePayoutMethod: { Request: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", bank_transfer: { iban: "NL57INGB4654188101", }, }, Response: { status: 200, body: { payment_method: "bank_transfer", payment_method_type: "sepa_bank_transfer", }, }, }, Token: { Request: { payout_token: "token", payout_type: "bank", priority: "instant", }, Response: { status: 200, body: { status: "initiated", payout_type: "bank", }, }, }, }, }, };
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("connectorId")); function normalise(input) { const exceptions = { adyenplatform: "Adyenplatform", wise: "Wise", wellsfargo: "Wellsfargo", // Add more known exceptions here }; if (typeof input !== "string") { const specName = Cypress.spec.name; if (specName.includes("-")) { const parts = specName.split("-"); if (parts.length > 1 && parts[1].includes(".")) { return parts[1].split(".")[0]; } } // Fallback return `${specName}`; } if (exceptions[input.toLowerCase()]) { return exceptions[input.toLowerCase()]; } else { return input; } } /* `getDefaultExchange` contains the default Request and Response to be considered if none provided. `getCustomExchange` takes in 2 optional fields named as Request and Response. with `getCustomExchange`, if 501 response is expected, there is no need to pass Response as it considers default values. */ // Const to get default PaymentExchange object const getDefaultExchange = () => ({ Request: {}, Response: { status: 501, body: { error: { type: "invalid_request", message: `Selected payment method through ${connectorName} is not implemented`, code: "IR_00", }, }, }, }); // Const to get PaymentExchange with overridden properties export const getCustomExchange = (overrides) => { const defaultExchange = getDefaultExchange(); return { ...defaultExchange, Request: { ...defaultExchange.Request, ...(overrides.Request || {}), }, Response: { ...defaultExchange.Response, ...(overrides.Response || {}), }, }; };
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_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, ]; export const cardCreditEnabledInUsd = [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: ["Visa"], minimum_amount: 0, accepted_currencies: { type: "enable_only", list: ["USD"], }, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, ]; export const cardCreditEnabledInUs = [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: ["Visa"], minimum_amount: 0, accepted_countries: { type: "enable_only", list: ["US"], }, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, ]; export const cardCreditEnabledInEur = [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: ["Visa"], minimum_amount: 0, accepted_currencies: { type: "enable_only", list: ["EUR"], }, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, ]; export const bankRedirectIdealEnabled = [ { payment_method: "bank_redirect", payment_method_types: [ { payment_method_type: "ideal", payment_experience: null, card_networks: null, accepted_countries: null, minimum_amount: 0, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: false, }, ], }, ]; export const bankRedirectIdealAndCreditEnabled = [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: ["Visa"], minimum_amount: 0, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, { payment_method: "bank_redirect", payment_method_types: [ { payment_method_type: "ideal", payment_experience: null, card_networks: null, accepted_countries: null, minimum_amount: 0, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: false, }, ], }, ]; export const createPaymentBodyWithCurrencyCountry = ( currency, billingCountry, shippingCountry ) => ({ currency: currency, amount: 6000, authentication_type: "three_ds", description: "Joseph First Crypto", email: "hyperswitch_sdk_demo_id@gmail.com", setup_future_usage: "", metadata: { udf1: "value1", new_customer: "true", login_date: "2019-09-10T10:11:12Z", }, business_label: "default", billing: { address: { line1: "1946", line2: "Gandhi Nagar", line3: "Ramnagar", city: "Ranchi", state: "Jharkhand", zip: "827013", country: billingCountry, // Billing country from parameter first_name: "Joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, email: "example@example.com", }, shipping: { address: { line1: "130", line2: "Koramangala", line3: "Ramnagar", city: "Bengaluru", state: "Karnataka", zip: "560011", country: shippingCountry, // Shipping country from parameter first_name: "John", last_name: "Joseph", }, phone: { number: "9123456789", country_code: "+91", }, email: "example@example.com", }, }); export const createPaymentBodyWithCurrency = (currency) => ({ currency: currency, amount: 6000, authentication_type: "three_ds", description: "Joseph First Crypto", email: "hyperswitch_sdk_demo_id@gmail.com", setup_future_usage: "", metadata: { udf1: "value1", new_customer: "true", login_date: "2019-09-10T10:11:12Z", }, business_label: "default", });
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 = mergeDetails(connectorId); return x; } function mergeDetails(connectorId) { const connectorData = getValueByKey(connectorDetails, connectorId); return connectorData; } function getValueByKey(jsonObject, key) { const data = typeof jsonObject === "string" ? JSON.parse(jsonObject) : jsonObject; if (data && typeof data === "object" && key in data) { return data[key]; } else { return null; } } export const should_continue_further = (resData) => { if ( typeof resData.body.error !== "undefined" || typeof resData.body.error_code !== "undefined" || typeof resData.body.error_message !== "undefined" ) { return false; } else { return true; } };
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", customer_acceptance: null, setup_future_usage: "off_session", authentication_type: "no_three_ds", }, RequestCurrencyINR: { currency: "INR", customer_acceptance: null, setup_future_usage: "off_session", authentication_type: "no_three_ds", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, PmListResponse: { PmListNull: { payment_methods: [], }, PmListWithStripeForIdeal: { status: "requires_payment_method", payment_methods: [ { payment_method: "bank_redirect", payment_method_types: [ { payment_method_type: "ideal", bank_names: [ { eligible_connectors: ["stripe"], }, ], }, ], }, ], }, PmListWithCreditOneConnector: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", }, ], }, ], }, PmListWithCreditTwoConnector: { payment_methods: [ { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ { eligible_connectors: ["stripe", "cybersource"], }, ], }, ], }, ], }, }, }, };
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: { Request: {}, Response: { status: 200, body: {}, }, }, volumeBasedRouting: { Request: { name: "volume routing", description: "some desc", algorithm: { type: "volume_split", data: [], }, profile_id: "{{profile_id}}", }, Response: { status: 200, body: {}, }, }, ruleBasedRouting: { Request: { name: "Rule Based routing", description: "Rule Based routing", algorithm: { type: "advanced", data: [], }, profile_id: "{{profile_id}}", }, Response: { status: 200, body: {}, }, }, };
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 connectorDetails = { adyen: adyenConnectorDetails, autoretries: autoretryConnectorDetails, common: commonConnectorDetails, stripe: stripeConnectorDetails, }; export const getConnectorDetails = (connectorId) => { const x = getValueByKey(connectorDetails, connectorId); return x; }; function getValueByKey(jsonObject, key) { const data = typeof jsonObject === "string" ? JSON.parse(jsonObject) : jsonObject; if (data && typeof data === "object" && key in data) { return data[key]; } else { return null; } } export const should_continue_further = (data) => { const resData = data.Response || {}; if ( typeof resData.body.error !== "undefined" || typeof resData.body.error_code !== "undefined" || typeof resData.body.error_message !== "undefined" ) { return false; } else { return true; } };
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_9299 = { card_number: "4263982640269299", card_exp_month: "02", card_exp_year: "26", card_holder_name: "Borino", card_cvc: "837", }; export const connectorDetails = { card_pm: { AdyenConfirm: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_1142, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", connector: "adyen", }, }, }, AdyenConfirmFail: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_4242, }, }, Response: { body: { status: "failed", connector: "adyen", }, }, }, BluesnapConfirm: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_9299, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", connector: "bluesnap", }, }, }, PaymentIntent: { Request: { currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, StripeConfirmFail: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_1142, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "failed", connector: "stripe", }, }, }, StripeConfirm3DS: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_1142, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", connector: "stripe", }, }, }, StripeConfirmSuccess: { Request: { payment_method: "card", payment_method_type: "debit", payment_method_data: { card: card_4242, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", connector: "stripe", }, }, }, }, };
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: "Joseph Doe", card_cvc: "737", }; const singleUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { single_use: { amount: 8000, currency: "USD", }, }, }; const multiUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { multi_use: { amount: 8000, currency: "USD", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "EUR", amount: 900, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, "3DSManualCapture": { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "processing", }, }, }, "3DSAutoCapture": { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_type: "credit", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", amount: 900, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", connector: "adyen", }, }, }, Capture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, Response: { status: 200, body: { status: "processing", amount: 6000, amount_capturable: 6000, amount_received: 0, }, }, }, PartialCapture: { Request: {}, Response: { status: 200, body: { status: "processing", amount: 6000, amount_capturable: 6000, amount_received: 0, }, }, }, Void: { Request: {}, Response: { status: 200, body: { status: "processing", }, }, }, MandateSingleUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, }, bank_transfer_pm: { PaymentIntent: { Request: { currency: "BRL", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, Pix: { Request: { payment_method: "bank_transfer", payment_method_type: "pix", payment_method_data: { bank_transfer: { pix: {}, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "BR", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, currency: "BRL", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, bank_redirect_pm: { PaymentIntent: { Request: { currency: "EUR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, ideal: { Request: { payment_method: "bank_redirect", payment_method_type: "ideal", payment_method_data: { bank_redirect: { ideal: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", connector: "adyen", }, }, }, giropay: { Request: { payment_method: "bank_redirect", payment_method_type: "giropay", payment_method_data: { bank_redirect: { giropay: { bank_name: "", bank_account_bic: "", bank_account_iban: "", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, sofort: { Request: { payment_method: "bank_redirect", payment_method_type: "sofort", payment_method_data: { bank_redirect: { sofort: { preferred_language: "en", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, eps: { Request: { payment_method: "bank_redirect", payment_method_type: "eps", payment_method_data: { bank_redirect: { eps: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "AT", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", connector: "adyen", }, }, }, blik: { Request: { payment_method: "bank_redirect", payment_method_type: "blik", payment_method_data: { bank_redirect: { blik: { name: "John Doe", email: "example@email.com", blik_code: "777987", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "PL", first_name: "john", last_name: "doe", }, }, }, Response: { status: 200, body: { status: "processing", }, }, }, }, upi_pm: { PaymentIntent: { Request: { currency: "INR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, UpiCollect: { Request: { payment_method: "upi", payment_method_type: "upi_collect", payment_method_data: { upi: { upi_collect: { vpa_id: "successtest@iata", }, }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Payment method type not supported", code: "HE_03", reason: "automatic for upi_collect is not supported by adyen", }, }, }, }, UpiIntent: { Request: { payment_method: "upi", payment_method_type: "upi_intent", payment_method_data: { upi: { upi_intent: {}, }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Payment method type not supported", code: "HE_03", reason: "automatic for upi_intent is not supported by adyen", }, }, }, }, }, };
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: "morino", card_cvc: "737", }; const singleUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { single_use: { amount: 8000, currency: "USD", }, }, }; const multiUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { multi_use: { amount: 8000, currency: "USD", }, }, }; export const connectorDetails = { card_pm: { PaymentIntent: { Request: { currency: "USD", amount: 1100, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, "3DSManualCapture": { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, "3DSAutoCapture": { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, No3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "requires_capture", }, }, }, No3DSAutoCapture: { Request: { payment_method: "card", payment_method_type: "credit", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", amount: 1100, customer_acceptance: null, setup_future_usage: "on_session", }, Response: { status: 200, body: { status: "succeeded", connector: "stripe", }, }, }, Capture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, Response: { status: 200, body: { status: "succeeded", amount: 6000, amount_capturable: 0, amount_received: 6000, }, }, }, PartialCapture: { Request: {}, Response: { status: 200, body: { status: "partially_captured", amount: 6000, amount_capturable: 0, amount_received: 100, }, }, }, Void: { Request: {}, Response: { status: 200, body: { status: "cancelled", }, }, }, MandateSingleUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, MandateSingleUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateSingleUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, MandateMultiUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, MandateMultiUse3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, ZeroAuthMandate: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSAutoCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, Response: { status: 200, body: { status: "succeeded", }, }, }, SaveCardUseNo3DSManualCapture: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, Response: { status: 200, body: { status: "requires_capture", }, }, }, }, bank_redirect_pm: { PaymentIntent: { Request: { currency: "EUR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }, ideal: { Request: { payment_method: "bank_redirect", payment_method_type: "ideal", payment_method_data: { bank_redirect: { ideal: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, giropay: { Request: { payment_method: "bank_redirect", payment_method_type: "giropay", payment_method_data: { bank_redirect: { giropay: {}, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "failed", error_code: "payment_method_not_available", error_message: "Giropay is deprecated and can no longer be used for payment acceptance. Please refer to https://docs.stripe.com/payments/giropay", }, }, }, sofort: { Request: { payment_method: "bank_redirect", payment_method_type: "sofort", payment_method_data: { bank_redirect: { sofort: {}, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, eps: { Request: { payment_method: "bank_redirect", payment_method_type: "eps", payment_method_data: { bank_redirect: { eps: { bank_name: "bank_austria", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "AT", first_name: "joseph", last_name: "Doe", }, phone: { number: "9123456789", country_code: "+91", }, }, }, Response: { status: 200, body: { status: "requires_customer_action", connector: "stripe", }, }, }, blik: { Request: { payment_method: "bank_redirect", payment_method_type: "blik", payment_method_data: { bank_redirect: { blik: { blik_code: "777987", }, }, }, }, Response: { status: 200, body: { status: "failed", error_code: "payment_intent_invalid_parameter", }, }, }, przelewy24: { Request: { payment_method: "bank_redirect", payment_method_type: "przelewy24", payment_method_data: { bank_redirect: { przelewy24: { bank_name: "citi", billing_details: { email: "guest@juspay.in", }, }, }, }, }, Response: { status: 200, body: { status: "requires_customer_action", }, }, }, }, };
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 // automatically serving support files with the // 'supportFile' configuration option. // // You can read more here: // https://on.cypress.io/configuration // *********************************************************** // Import commands.js using ES2015 syntax: import "cypress-mochawesome-reporter/register"; import "./commands"; import "./redirectionHandler"; Cypress.on("window:before:load", (win) => { // Add security headers win.headers = { "Content-Security-Policy": "default-src 'self'", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "DENY", }; }); // Add error handling for dynamic imports Cypress.on("uncaught:exception", (err, runnable) => { // Log the error details // eslint-disable-next-line no-console console.error( `Error: ${err.message}\nError occurred in: ${runnable.title}\nStack trace: ${err.stack}` ); // Return false to prevent the error from failing the test return false; });
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/i, /\binvalid request\b/i, /\bserver error\b/i, /\btransaction failed\b/i, /\bpayment declined\b/i, /\bauthorization failed\b/i, ], VALID_TERMINAL_STATUSES: [ "failed", "processing", "requires_capture", "succeeded", ], }; export function handleRedirection( redirectionType, urls, connectorId, paymentMethodType, handlerMetadata ) { switch (redirectionType) { case "bank_redirect": bankRedirectRedirection( urls.redirectionUrl, urls.expectedUrl, connectorId, paymentMethodType ); break; case "bank_transfer": bankTransferRedirection( urls.redirectionUrl, urls.expectedUrl, connectorId, paymentMethodType, handlerMetadata.nextActionType ); break; case "three_ds": threeDsRedirection(urls.redirectionUrl, urls.expectedUrl, connectorId); break; case "upi": upiRedirection( urls.redirectionUrl, urls.expectedUrl, connectorId, paymentMethodType ); break; default: throw new Error(`Unknown redirection type: ${redirectionType}`); } } function bankTransferRedirection( redirectionUrl, expectedUrl, connectorId, paymentMethodType, nextActionType ) { switch (nextActionType) { case "qr_code_url": cy.request(redirectionUrl.href).then((response) => { switch (connectorId) { case "adyen": switch (paymentMethodType) { case "pix": expect(response.status).to.eq(200); fetchAndParseQRCode(redirectionUrl.href).then((qrCodeData) => { expect(qrCodeData).to.eq("TestQRCodeEMVToken"); }); break; default: verifyReturnUrl(redirectionUrl, expectedUrl, true); // expected_redirection can be used here to handle other payment methods } break; default: verifyReturnUrl(redirectionUrl, expectedUrl, true); } }); break; case "image_data_url": switch (connectorId) { case "itaubank": switch (paymentMethodType) { case "pix": fetchAndParseImageData(redirectionUrl).then((qrCodeData) => { expect(qrCodeData).to.contains("itau.com.br/pix/qr/v2"); // image data contains the following value }); break; default: verifyReturnUrl(redirectionUrl, expectedUrl, true); } break; default: verifyReturnUrl(redirectionUrl, expectedUrl, true); } break; default: verifyReturnUrl(redirectionUrl, expectedUrl, true); } } function bankRedirectRedirection( redirectionUrl, expectedUrl, connectorId, paymentMethodType ) { let verifyUrl = false; cy.visit(redirectionUrl.href); waitForRedirect(redirectionUrl.href); handleFlow( redirectionUrl, expectedUrl, connectorId, ({ connectorId, constants, paymentMethodType }) => { switch (connectorId) { case "adyen": switch (paymentMethodType) { case "eps": cy.get("h1").should("contain.text", "Acquirer Simulator"); cy.get('[value="authorised"]').click(); break; case "ideal": cy.wait(constants.TIMEOUT / 10); // 2 seconds cy.get("button[data-testid=payment-action-button]").click(); cy.wait(constants.TIMEOUT / 10); // 2 seconds cy.get("button[id=bank-item-TESTNL2A]").click(); cy.wait(constants.TIMEOUT / 10); // 2 seconds cy.location("host").then(() => { cy.url().then((currentUrl) => { cy.origin(new URL(currentUrl).origin, () => { cy.url().then(() => { cy.get("button.shared-styles_button__cNu+v") .contains("Success") .click(); cy.url().should("include", "/loading/SUCCESS"); }); }); }); }); break; default: throw new Error( `Unsupported payment method type: ${paymentMethodType}` ); } verifyUrl = true; break; case "paypal": if (["eps", "ideal", "giropay"].includes(paymentMethodType)) { cy.get('button[name="Successful"][value="SUCCEEDED"]').click(); verifyUrl = true; } else { throw new Error( `Unsupported payment method type: ${paymentMethodType}` ); } verifyUrl = true; break; case "stripe": if ( ["eps", "ideal", "giropay", "sofort", "przelewy24"].includes( paymentMethodType ) ) { cy.get('a[name="success"]').click(); verifyUrl = true; } else { throw new Error( `Unsupported payment method type: ${paymentMethodType}` ); } verifyUrl = true; break; case "trustpay": switch (paymentMethodType) { case "eps": cy.get("#bankname").type( "Allgemeine Sparkasse Oberösterreich Bank AG (ASPKAT2LXXX / 20320)" ); cy.get("#selectionSubmit").click(); cy.get("#user") .should("be.visible") .should("be.enabled") .focus() .type("Verfügernummer"); cy.get("input#submitButton.btn.btn-primary").click(); break; case "ideal": cy.contains("button", "Select your bank").click(); cy.get( 'button[data-testid="bank-item"][id="bank-item-INGBNL2A"]' ).click(); break; case "giropay": cy.get("._transactionId__header__iXVd_").should( "contain.text", "Bank suchen ‑ mit giropay zahlen." ); cy.get(".BankSearch_searchInput__uX_9l").type( "Volksbank Hildesheim{enter}" ); cy.get(".BankSearch_searchIcon__EcVO7").click(); cy.get(".BankSearch_bankWrapper__R5fUK").click(); cy.get("._transactionId__primaryButton__nCa0r").click(); cy.get(".normal-3").should("contain.text", "Kontoauswahl"); break; default: throw new Error( `Unsupported payment method type: ${paymentMethodType}` ); } verifyUrl = false; break; default: throw new Error(`Unsupported connector: ${connectorId}`); } }, { paymentMethodType } ); cy.then(() => { verifyReturnUrl(redirectionUrl, expectedUrl, verifyUrl); }); } function threeDsRedirection(redirectionUrl, expectedUrl, connectorId) { cy.visit(redirectionUrl.href); waitForRedirect(redirectionUrl.href); handleFlow( redirectionUrl, expectedUrl, connectorId, ({ connectorId, constants, expectedUrl }) => { switch (connectorId) { case "adyen": cy.get("iframe") .its("0.contentDocument.body") .within(() => { cy.get('input[type="password"]').click(); cy.get('input[type="password"]').type("password"); cy.get("#buttonSubmit").click(); }); break; case "bankofamerica": case "wellsfargo": cy.get("iframe", { timeout: constants.TIMEOUT }) .should("be.visible") .its("0.contentDocument.body") .should("not.be.empty") .within(() => { cy.get( 'input[type="text"], input[type="password"], input[name="challengeDataEntry"]', { timeout: constants.TIMEOUT } ) .should("be.visible") .should("be.enabled") .click() .type("1234"); cy.get('input[value="SUBMIT"], button[type="submit"]', { timeout: constants.TIMEOUT, }) .should("be.visible") .click(); }); break; case "cybersource": cy.url({ timeout: constants.TIMEOUT }).should("include", expectedUrl); break; case "checkout": cy.get("iframe", { timeout: constants.TIMEOUT }) .its("0.contentDocument.body") .within(() => { cy.get('form[id="form"]', { timeout: constants.WAIT_TIME }) .should("exist") .then(() => { cy.get('input[id="password"]').click(); cy.get('input[id="password"]').type("Checkout1!"); cy.get("#txtButton").click(); }); }); break; case "nmi": case "noon": case "xendit": cy.get("iframe", { timeout: constants.TIMEOUT }) .its("0.contentDocument.body") .within(() => { cy.get("iframe", { timeout: constants.TIMEOUT }) .its("0.contentDocument.body") .within(() => { cy.get('form[name="cardholderInput"]', { timeout: constants.TIMEOUT, }) .should("exist") .then(() => { cy.get('input[name="challengeDataEntry"]') .click() .type("1234"); cy.get('input[value="SUBMIT"]').click(); }); }); }); break; case "novalnet": cy.get("form", { timeout: constants.WAIT_TIME }) .should("exist") .then(() => { cy.get('input[id="submit"]').click(); }); break; case "stripe": cy.get("iframe", { timeout: constants.TIMEOUT }) .its("0.contentDocument.body") .within(() => { cy.get("iframe") .its("0.contentDocument.body") .within(() => { cy.get("#test-source-authorize-3ds").click(); }); }); break; case "trustpay": cy.get('form[name="challengeForm"]', { timeout: constants.WAIT_TIME, }) .should("exist") .then(() => { cy.get("#outcomeSelect") .select("Approve") .should("have.value", "Y"); cy.get('button[type="submit"]').click(); }); break; case "worldpay": cy.get("iframe", { timeout: constants.WAIT_TIME }) .its("0.contentDocument.body") .within(() => { cy.get('form[name="cardholderInput"]', { timeout: constants.WAIT_TIME, }) .should("exist") .then(() => { cy.get('input[name="challengeDataEntry"]') .click() .type("1234"); cy.get('input[value="SUBMIT"]').click(); }); }); break; case "fiuu": cy.get('form[id="cc_form"]', { timeout: constants.TIMEOUT }) .should("exist") .then(() => { cy.get('button.pay-btn[name="pay"]').click(); cy.get("div.otp") .invoke("text") .then((otpText) => { const otp = otpText.match(/\d+/)[0]; cy.get("input#otp-input").should("not.be.disabled").type(otp); cy.get("button.pay-btn").click(); }); }); break; case "redsys": cy.get("div.autenticada").click(); cy.get('input[value="Enviar"]').click(); break; default: cy.wait(constants.WAIT_TIME); } } ); // Verify return URL after handling the specific connector verifyReturnUrl(redirectionUrl, expectedUrl, true); } function upiRedirection( redirectionUrl, expectedUrl, connectorId, paymentMethodType ) { let verifyUrl = false; if (connectorId === "iatapay") { switch (paymentMethodType) { case "upi_collect": cy.visit(redirectionUrl.href); cy.wait(CONSTANTS.TIMEOUT).then(() => { verifyUrl = true; }); break; case "upi_intent": cy.request(redirectionUrl.href).then((response) => { expect(response.status).to.eq(200); expect(response.body).to.have.property("iataPaymentId"); expect(response.body).to.have.property("status", "INITIATED"); expect(response.body.qrInfoData).to.be.an("object"); expect(response.body.qrInfoData).to.have.property("qr"); expect(response.body.qrInfoData).to.have.property("qrLink"); }); verifyUrl = false; break; default: throw new Error( `Unsupported payment method type: ${paymentMethodType}` ); } } else { // For other connectors, nothing to do return; } cy.then(() => { verifyReturnUrl(redirectionUrl, expectedUrl, verifyUrl); }); } function verifyReturnUrl(redirectionUrl, expectedUrl, forwardFlow) { if (!forwardFlow) return; cy.location("host", { timeout: CONSTANTS.TIMEOUT }).should((currentHost) => { expect(currentHost).to.equal(expectedUrl.host); }); cy.url().then((url) => { cy.origin( new URL(url).origin, { args: { redirectionUrl: redirectionUrl.origin, expectedUrl: expectedUrl.origin, constants: CONSTANTS, }, }, ({ redirectionUrl, expectedUrl, constants }) => { try { const redirectionHost = new URL(redirectionUrl).host; const expectedHost = new URL(expectedUrl).host; cy.window() .its("location") .then((location) => { // Check for payment_id in the URL const urlParams = new URLSearchParams(location.search); const paymentId = urlParams.get("payment_id"); if (!paymentId) { // eslint-disable-next-line cypress/assertion-before-screenshot cy.screenshot("missing-payment-id-error"); throw new Error("URL does not contain payment_id parameter"); } // Proceed with other verifications based on whether redirection host ends with expected host if (redirectionHost.endsWith(expectedHost)) { cy.wait(constants.WAIT_TIME / 2); // Check page state before taking screenshots cy.document().then((doc) => { const pageText = doc.body.innerText.toLowerCase(); if (!pageText) { // eslint-disable-next-line cypress/assertion-before-screenshot cy.screenshot("blank-page-error"); } else { // Check if any error pattern exists in the text const hasError = constants.ERROR_PATTERNS.some((pattern) => pattern.test(pageText) ); if (hasError) { // Only take screenshot if an error pattern was found // eslint-disable-next-line cypress/assertion-before-screenshot cy.screenshot(`error-page-${Date.now()}`); throw new Error(`Page contains error: ${pageText}`); } } }); const paymentStatus = urlParams.get("status"); if ( !constants.VALID_TERMINAL_STATUSES.includes(paymentStatus) ) { // eslint-disable-next-line cypress/assertion-before-screenshot cy.screenshot(`failed-payment-${paymentStatus}`); throw new Error( `Redirection failed with payment status: ${paymentStatus}` ); } } else { cy.window().its("location.origin").should("eq", expectedUrl); Cypress.on("uncaught:exception", (err, runnable) => { // Log the error details // eslint-disable-next-line no-console console.error( `Error: ${err.message}\nOccurred in: ${runnable.title}\nStack: ${err.stack}` ); // Return false to prevent the error from failing the test return false; }); } }); } catch (error) { throw new Error(`Redirection verification failed: ${error}`); } } ); }); } async function fetchAndParseQRCode(url) { const response = await fetch(url, { encoding: "binary" }); if (!response.ok) { throw new Error(`Failed to fetch QR code image: ${response.statusText}`); } const blob = await response.blob(); const reader = new FileReader(); return new Promise((resolve, reject) => { reader.onload = () => { // Use the entire data URI from reader.result const dataUrl = reader.result; // Create a new Image, assigning its src to the full data URI const image = new Image(); image.src = dataUrl; // Once the image loads, draw it to a canvas and let jsQR decode it image.onload = () => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); canvas.width = image.width; canvas.height = image.height; ctx.drawImage(image, 0, 0); const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); const qrCodeData = jsQR( imageData.data, imageData.width, imageData.height ); if (qrCodeData) { resolve(qrCodeData.data); } else { reject(new Error("Failed to decode QR code")); } }; // If the image fails to load at all, reject the promise image.onerror = (err) => { reject(new Error("Image failed to load: " + err?.message || err)); }; }; // Read the blob as a data URL (this includes the data:image/png;base64 prefix) reader.readAsDataURL(blob); }); } async function fetchAndParseImageData(url) { return await new Promise((resolve, reject) => { const image = new Image(); image.src = url; image.onload = () => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); canvas.width = image.width; canvas.height = image.height; ctx.drawImage(image, 0, 0); const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); const qrCodeData = jsQR( imageData.data, imageData.width, imageData.height ); if (qrCodeData) { resolve(qrCodeData.data); } else { reject(new Error("Failed to decode QR code")); } }; image.onerror = reject; // Handle image loading errors }); } function waitForRedirect(redirectionUrl) { const originalHost = new URL(redirectionUrl).host; cy.location("host", { timeout: CONSTANTS.TIMEOUT }).should((currentHost) => { const hostChanged = currentHost !== originalHost; const iframeExists = Cypress.$("iframe") .toArray() .some((iframeEl) => { try { const iframeHost = new URL(iframeEl.src).host; return iframeHost && iframeHost !== originalHost; } catch { return false; } }); // The assertion will pass if either the host changed or an iframe with a foreign host exists. expect( hostChanged || iframeExists, "Host changed or an iframe with foreign host exist" ).to.be.true; }); } function handleFlow( redirectionUrl, expectedUrl, connectorId, callback, options = {} ) { // Extract the host from the redirection URL const originalHost = new URL(redirectionUrl.href).host; cy.location("host", { timeout: CONSTANTS.TIMEOUT }).then((currentHost) => { const callbackArgs = { connectorId, constants: CONSTANTS, expectedUrl: expectedUrl.origin, ...options, // e.g. paymentMethodType if provided }; if (currentHost !== originalHost) { // For a regular redirection flow: host changed, use cy.origin cy.url().then((currentUrl) => { cy.origin(new URL(currentUrl).origin, { args: callbackArgs }, callback); }); } else { // For embedded flows using an iframe: cy.get("iframe", { timeout: CONSTANTS.TIMEOUT }) .should("be.visible") .should("exist") .then((iframes) => { if (iframes.length === 0) { throw new Error("No iframe found for embedded flow."); } // Execute the callback directly for the embedded flow callback(callbackArgs); }); } }); }
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 // *********************************************** // // // -- This is a parent command -- // Cypress.Commands.add('login', (email, password) => { ... }) // // // -- This is a child command -- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) // // // -- This is a dual command -- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) // // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) // commands.js or your custom support file import { defaultErrorHandler, extractIntegerAtEnd, getValueByKey, } from "../e2e/configs/Payment/Utils"; import { execConfig, validateConfig } from "../utils/featureFlags"; import * as RequestBodyUtils from "../utils/RequestBodyUtils"; import { isoTimeTomorrow, validateEnv } from "../utils/RequestBodyUtils.js"; import { handleRedirection } from "./redirectionHandler"; function logRequestId(xRequestId) { if (xRequestId) { cy.task("cli_log", "x-request-id -> " + xRequestId); } else { cy.task("cli_log", "x-request-id is not available in the response headers"); } } function validateErrorMessage(response, resData) { if (resData.body.status !== "failed") { expect(response.body.error_message, "error_message").to.be.null; expect(response.body.error_code, "error_code").to.be.null; } } Cypress.Commands.add("healthCheck", (globalState) => { const baseUrl = globalState.get("baseUrl"); const url = `${baseUrl}/health`; cy.request({ method: "GET", url: url, headers: { Accept: "application/json", }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body).to.equal("health is good"); } else { throw new Error( `Health Check failed with status: \`${response.status}\` and body: \`${response.body}\`` ); } }); }); }); Cypress.Commands.add( "merchantCreateCallTest", (merchantCreateBody, globalState) => { const randomMerchantId = RequestBodyUtils.generateRandomString(); RequestBodyUtils.setMerchantId(merchantCreateBody, randomMerchantId); globalState.set("merchantId", randomMerchantId); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/accounts`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, body: merchantCreateBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { // Handle the response as needed globalState.set("profileId", response.body.default_profile); globalState.set("publishableKey", response.body.publishable_key); globalState.set("merchantDetails", response.body.merchant_details); }); }); } ); Cypress.Commands.add("merchantRetrieveCall", (globalState) => { const merchant_id = globalState.get("merchantId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/accounts/${merchant_id}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"], "content_headers").to.include( "application/json" ); expect(response.body.merchant_id, "merchant_id").to.equal(merchant_id); expect( response.body.payment_response_hash_key, "payment_response_hash_key" ).to.not.be.null; expect(response.body.publishable_key, "publishable_key").to.not.be.null; cy.log("HI"); expect(response.body.default_profile, "default_profile").to.not.be.null; expect(response.body.organization_id, "organization_id").to.not.be.null; globalState.set("organizationId", response.body.organization_id); if (globalState.get("publishableKey") === undefined) { globalState.set("publishableKey", response.body.publishable_key); } }); }); }); Cypress.Commands.add("merchantDeleteCall", (globalState) => { const merchant_id = globalState.get("merchantId"); cy.request({ method: "DELETE", url: `${globalState.get("baseUrl")}/accounts/${merchant_id}`, headers: { Accept: "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.deleted).to.equal(true); }); }); }); Cypress.Commands.add("ListConnectorsFeatureMatrixCall", (globalState) => { const baseUrl = globalState.get("baseUrl"); const url = `${baseUrl}/feature_matrix`; cy.request({ method: "GET", url: url, headers: { Accept: "application/json", }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body).to.have.property("connectors").and.not.empty; expect(response.body.connectors).to.be.an("array").and.not.empty; response.body.connectors.forEach((item) => { expect(item).to.have.property("description").and.not.empty; expect(item).to.have.property("category").and.not.empty; expect(item).to.have.property("supported_payment_methods").and.not .empty; }); }); }); }); Cypress.Commands.add("merchantListCall", (globalState) => { const organization_id = globalState.get("organizationId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/accounts/list?organization_id=${organization_id}`, headers: { Accept: "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); for (const key in response.body) { expect(response.body[key]).to.have.property("merchant_id").and.not .empty; expect(response.body[key]).to.have.property("organization_id").and.not .empty; expect(response.body[key]).to.have.property("default_profile").and.not .empty; } }); }); }); Cypress.Commands.add( "merchantUpdateCall", (merchantUpdateBody, globalState) => { const merchant_id = globalState.get("merchantId"); const organization_id = globalState.get("organizationId"); const publishable_key = globalState.get("publishableKey"); const merchant_details = globalState.get("merchantDetails"); merchantUpdateBody.merchant_id = merchant_id; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/accounts/${merchant_id}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, body: merchantUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.publishable_key).to.equal(publishable_key); expect(response.body.organization_id).to.equal(organization_id); expect(response.body.merchant_details).to.not.equal(merchant_details); }); }); } ); Cypress.Commands.add( "createBusinessProfileTest", (createBusinessProfile, globalState, profilePrefix = "profile") => { const apiKey = globalState.get("apiKey"); const baseUrl = globalState.get("baseUrl"); const connectorId = globalState.get("connectorId"); const merchantId = globalState.get("merchantId"); const profileName = `${profilePrefix}_${RequestBodyUtils.generateRandomString(connectorId)}`; const url = `${baseUrl}/account/${merchantId}/business_profile`; createBusinessProfile.profile_name = profileName; cy.request({ method: "POST", url: url, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": apiKey, }, body: createBusinessProfile, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { globalState.set(`${profilePrefix}Id`, response.body.profile_id); if (response.status === 200) { expect(response.body.profile_id).to.not.to.be.null; } else { throw new Error( `Business Profile call failed ${response.body.error.message}` ); } }); }); } ); Cypress.Commands.add( "UpdateBusinessProfileTest", ( updateBusinessProfileBody, is_connector_agnostic_mit_enabled, collect_billing_details_from_wallet_connector, collect_shipping_details_from_wallet_connector, always_collect_billing_details_from_wallet_connector, always_collect_shipping_details_from_wallet_connector, globalState, profilePrefix = "profile" ) => { updateBusinessProfileBody.is_connector_agnostic_mit_enabled = is_connector_agnostic_mit_enabled; updateBusinessProfileBody.collect_shipping_details_from_wallet_connector = collect_shipping_details_from_wallet_connector; updateBusinessProfileBody.collect_billing_details_from_wallet_connector = collect_billing_details_from_wallet_connector; updateBusinessProfileBody.always_collect_billing_details_from_wallet_connector = always_collect_billing_details_from_wallet_connector; updateBusinessProfileBody.always_collect_shipping_details_from_wallet_connector = always_collect_shipping_details_from_wallet_connector; const apiKey = globalState.get("apiKey"); const merchantId = globalState.get("merchantId"); const profileId = globalState.get(`${profilePrefix}Id`); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/account/${merchantId}/business_profile/${profileId}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": apiKey, }, body: updateBusinessProfileBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { globalState.set( "collectBillingDetails", response.body.collect_billing_details_from_wallet_connector ); globalState.set( "collectShippingDetails", response.body.collect_shipping_details_from_wallet_connector ); globalState.set( "alwaysCollectBillingDetails", response.body.always_collect_billing_details_from_wallet_connector ); globalState.set( "alwaysCollectShippingDetails", response.body.always_collect_shipping_details_from_wallet_connector ); } }); }); } ); // API Key API calls Cypress.Commands.add("apiKeyCreateTest", (apiKeyCreateBody, globalState) => { // Define the necessary variables and constant const apiKey = globalState.get("adminApiKey"); const baseUrl = globalState.get("baseUrl"); // We do not want to keep API Key forever, // so we set the expiry to tomorrow as new merchant accounts are created with every run const expiry = isoTimeTomorrow(); const keyIdType = "key_id"; const keyId = validateEnv(baseUrl, keyIdType); const merchantId = globalState.get("merchantId"); const url = `${baseUrl}/api_keys/${merchantId}`; // Update request body apiKeyCreateBody.expiration = expiry; cy.request({ method: "POST", url: url, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": apiKey, }, body: apiKeyCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchantId); expect(response.body.description).to.equal( apiKeyCreateBody.description ); // API Key assertions are intentionally excluded to avoid being exposed in the logs expect(response.body).to.have.property(keyIdType).and.to.include(keyId) .and.to.not.be.empty; globalState.set("apiKeyId", response.body.key_id); globalState.set("apiKey", response.body.api_key); cy.task("setGlobalState", globalState.data); } else { // to be updated throw new Error( `API Key create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); }); Cypress.Commands.add("apiKeyUpdateCall", (apiKeyUpdateBody, globalState) => { const merchantId = globalState.get("merchantId"); const apiKeyId = globalState.get("apiKeyId"); // We do not want to keep API Key forever, // so we set the expiry to tomorrow as new merchant accounts are created with every run const expiry = isoTimeTomorrow(); // Update request body apiKeyUpdateBody.expiration = expiry; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/api_keys/${merchantId}/${apiKeyId}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, body: apiKeyUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body.name).to.equal("Updated API Key"); expect(response.body.merchant_id).to.equal(merchantId); // API Key assertions are intentionally excluded to avoid being exposed in the logs expect(response.body.key_id).to.equal(apiKeyId); } else { // to be updated throw new Error( `API Key create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); }); Cypress.Commands.add("apiKeyRetrieveCall", (globalState) => { const merchant_id = globalState.get("merchantId"); const api_key_id = globalState.get("apiKeyId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/api_keys/${merchant_id}/${api_key_id}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.name).to.equal("Updated API Key"); expect(response.body.key_id).to.equal(api_key_id); expect(response.body.merchant_id).to.equal(merchant_id); }); }); }); Cypress.Commands.add("apiKeyListCall", (globalState) => { const merchant_id = globalState.get("merchantId"); const base_url = globalState.get("baseUrl"); cy.request({ method: "GET", url: `${base_url}/api_keys/${merchant_id}/list`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body).to.be.an("array").and.not.empty; for (const key in response.body) { expect(response.body[key]).to.have.property("name").and.not.empty; if (base_url.includes("sandbox") || base_url.includes("integ")) { expect(response.body[key]).to.have.property("key_id").include("snd_") .and.not.empty; } else if (base_url.includes("localhost")) { expect(response.body[key]).to.have.property("key_id").include("dev_") .and.not.empty; } expect(response.body[key].merchant_id).to.equal(merchant_id); } }); }); }); Cypress.Commands.add("apiKeyDeleteCall", (globalState) => { const merchant_id = globalState.get("merchantId"); const api_key_id = globalState.get("apiKeyId"); cy.request({ method: "DELETE", url: `${globalState.get("baseUrl")}/api_keys/${merchant_id}/${api_key_id}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.key_id).to.equal(api_key_id); expect(response.body.revoked).to.equal(true); }); }); }); Cypress.Commands.add( "createNamedConnectorCallTest", ( connectorType, createConnectorBody, paymentMethodsEnabled, globalState, connectorName, connectorLabel, profilePrefix = "profile", mcaPrefix = "merchantConnector" ) => { const merchantId = globalState.get("merchantId"); const profileId = globalState.get(`${profilePrefix}Id`); createConnectorBody.profile_id = profileId; createConnectorBody.connector_type = connectorType; createConnectorBody.connector_name = connectorName; createConnectorBody.connector_label = connectorLabel; createConnectorBody.payment_methods_enabled = paymentMethodsEnabled; // readFile is used to read the contents of the file and it always returns a promise ([Object Object]) due to its asynchronous nature // it is best to use then() to handle the response within the same block of code cy.readFile(globalState.get("connectorAuthFilePath")).then( (jsonContent) => { const { authDetails } = getValueByKey( JSON.stringify(jsonContent), connectorName ); createConnectorBody.connector_account_details = authDetails.connector_account_details; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/account/${merchantId}/connectors`, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": globalState.get("apiKey"), }, body: createConnectorBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(connectorName).to.equal(response.body.connector_name); globalState.set( `${mcaPrefix}Id`, response.body.merchant_connector_id ); } else { cy.task( "cli_log", "response status -> " + JSON.stringify(response.status) ); throw new Error( `Connector Create Call Failed ${response.body.error.message}` ); } }); }); } ); } ); Cypress.Commands.add( "createConnectorCallTest", ( connectorType, createConnectorBody, payment_methods_enabled, globalState, profilePrefix = "profile", mcaPrefix = "merchantConnector" ) => { const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const connector_id = globalState.get("connectorId"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get(`${profilePrefix}Id`); const url = `${base_url}/account/${merchant_id}/connectors`; createConnectorBody.connector_type = connectorType; createConnectorBody.profile_id = profile_id; createConnectorBody.connector_name = connector_id; createConnectorBody.payment_methods_enabled = payment_methods_enabled; // readFile is used to read the contents of the file and it always returns a promise ([Object Object]) due to its asynchronous nature // it is best to use then() to handle the response within the same block of code cy.readFile(globalState.get("connectorAuthFilePath")).then( (jsonContent) => { const { authDetails, stateUpdate } = getValueByKey( JSON.stringify(jsonContent), connector_id, extractIntegerAtEnd(profilePrefix) ); if (stateUpdate) { globalState.set( "MULTIPLE_CONNECTORS", stateUpdate.MULTIPLE_CONNECTORS ); } createConnectorBody.connector_account_details = authDetails.connector_account_details; if (authDetails && authDetails.metadata) { createConnectorBody.metadata = { ...createConnectorBody.metadata, // Preserve existing metadata fields ...authDetails.metadata, // Merge with authDetails.metadata }; } cy.request({ method: "POST", url: url, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": api_key, }, body: createConnectorBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(globalState.get("connectorId")).to.equal( response.body.connector_name ); globalState.set( `${mcaPrefix}Id`, response.body.merchant_connector_id ); } else { cy.task( "cli_log", "response status -> " + JSON.stringify(response.status) ); throw new Error( `Connector Create Call Failed ${response.body.error.message}` ); } }); }); } ); } ); Cypress.Commands.add( "createPayoutConnectorCallTest", (connectorType, createConnectorBody, globalState) => { const merchantId = globalState.get("merchantId"); const connectorName = globalState.get("connectorId"); createConnectorBody.connector_type = connectorType; createConnectorBody.connector_name = connectorName; createConnectorBody.connector_type = "payout_processor"; createConnectorBody.profile_id = globalState.get("profileId"); // readFile is used to read the contents of the file and it always returns a promise ([Object Object]) due to its asynchronous nature // it is best to use then() to handle the response within the same block of code cy.readFile(globalState.get("connectorAuthFilePath")).then( (jsonContent) => { const { authDetails } = getValueByKey( JSON.stringify(jsonContent), `${connectorName}_payout` ); // If the connector does not have payout connector creds in creds file, set payoutsExecution to false if (authDetails === null) { globalState.set("payoutsExecution", false); return false; } else { globalState.set("payoutsExecution", true); } createConnectorBody.connector_account_details = authDetails.connector_account_details; if (authDetails && authDetails.metadata) { createConnectorBody.metadata = { ...createConnectorBody.metadata, // Preserve existing metadata fields ...authDetails.metadata, // Merge with authDetails.metadata }; } cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/account/${merchantId}/connectors`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, body: createConnectorBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(globalState.get("connectorId")).to.equal( response.body.connector_name ); globalState.set( "merchantConnectorId", response.body.merchant_connector_id ); } else { cy.task( "cli_log", "response status -> " + JSON.stringify(response.status) ); throw new Error( `Connector Create Call Failed ${response.body.error.message}` ); } }); }); } ); } ); Cypress.Commands.add("connectorRetrieveCall", (globalState) => { const merchant_id = globalState.get("merchantId"); const connector_id = globalState.get("connectorId"); const merchant_connector_id = globalState.get("merchantConnectorId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/${merchant_id}/connectors/${merchant_connector_id}`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("apiKey"), "x-merchant-id": merchant_id, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.connector_name).to.equal(connector_id); expect(response.body.merchant_connector_id).to.equal( merchant_connector_id ); }); }); }); Cypress.Commands.add("connectorDeleteCall", (globalState) => { const merchant_id = globalState.get("merchantId"); const merchant_connector_id = globalState.get("merchantConnectorId"); cy.request({ method: "DELETE", url: `${globalState.get("baseUrl")}/account/${merchant_id}/connectors/${merchant_connector_id}`, headers: { Accept: "application/json", "api-key": globalState.get("adminApiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.merchant_connector_id).to.equal( merchant_connector_id ); expect(response.body.deleted).to.equal(true); }); }); }); Cypress.Commands.add( "connectorUpdateCall", (connectorType, updateConnectorBody, globalState) => { const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const connector_id = globalState.get("connectorId"); const merchant_id = globalState.get("merchantId"); const merchant_connector_id = globalState.get("merchantConnectorId"); const connectorLabel = `updated_${RequestBodyUtils.generateRandomString(connector_id)}`; const url = `${base_url}/account/${merchant_id}/connectors/${merchant_connector_id}`; updateConnectorBody.connector_type = connectorType; updateConnectorBody.connector_label = connectorLabel; cy.request({ method: "POST", url: url, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": api_key, "x-merchant-id": merchant_id, }, body: updateConnectorBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.connector_name).to.equal(connector_id); expect(response.body.merchant_connector_id).to.equal( merchant_connector_id ); expect(response.body.connector_label).to.equal(connectorLabel); }); }); } ); // Generic function to list all connectors Cypress.Commands.add("connectorListByMid", (globalState) => { const merchant_id = globalState.get("merchantId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/${merchant_id}/connectors`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), "X-Merchant-Id": merchant_id, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body).to.be.an("array").and.not.empty; response.body.forEach((item) => { expect(item).to.not.have.property("metadata"); expect(item).to.not.have.property("additional_merchant_data"); expect(item).to.not.have.property("connector_wallets_details"); }); }); }); }); Cypress.Commands.add( "createCustomerCallTest", (customerCreateBody, globalState) => { cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/customers`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, body: customerCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { globalState.set("customerId", response.body.customer_id); expect(response.body.customer_id, "customer_id").to.not.be.empty; expect(customerCreateBody.email, "email").to.equal( response.body.email ); expect(customerCreateBody.name, "name").to.equal(response.body.name); expect(customerCreateBody.phone, "phone").to.equal( response.body.phone ); expect(customerCreateBody.metadata, "metadata").to.deep.equal( response.body.metadata ); expect(customerCreateBody.address, "address").to.deep.equal( response.body.address ); expect( customerCreateBody.phone_country_code, "phone_country_code" ).to.equal(response.body.phone_country_code); } else if (response.status === 400) { if (response.body.error.message.includes("already exists")) { expect(response.body.error.code).to.equal("IR_12"); expect(response.body.error.message).to.equal( "Customer with the given `customer_id` already exists" ); } } }); }); } ); Cypress.Commands.add("customerListCall", (globalState) => { cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/customers/list`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { for (const key in response.body) { expect(response.body[key]).to.not.be.empty; } }); }); }); Cypress.Commands.add("customerRetrieveCall", (globalState) => { const customer_id = globalState.get("customerId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/customers/${customer_id}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.customer_id).to.equal(customer_id).and.not.be.empty; }); }); }); Cypress.Commands.add( "customerUpdateCall", (customerUpdateBody, globalState) => { const customer_id = globalState.get("customerId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/customers/${customer_id}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, body: customerUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.customer_id).to.equal(customer_id); }); }); } ); Cypress.Commands.add("ephemeralGenerateCall", (globalState) => { const customer_id = globalState.get("customerId"); const merchant_id = globalState.get("merchantId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/ephemeral_keys`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, body: { customer_id: customer_id }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.customer_id).to.equal(customer_id); expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.id).to.exist.and.not.be.empty; expect(response.body.secret).to.exist.and.not.be.empty; }); }); }); Cypress.Commands.add("customerDeleteCall", (globalState) => { const customer_id = globalState.get("customerId"); cy.request({ method: "DELETE", url: `${globalState.get("baseUrl")}/customers/${customer_id}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.body.customer_id).to.equal(customer_id).and.not.be.empty; expect(response.body.customer_deleted).to.equal(true); expect(response.body.address_deleted).to.equal(true); expect(response.body.payment_methods_deleted).to.equal(true); }); }); }); Cypress.Commands.add( "paymentMethodListTestLessThanEqualToOnePaymentMethod", (resData, globalState) => { cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/payment_methods?client_secret=${globalState.get("clientSecret")}`, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body).to.have.property("currency"); if (resData["payment_methods"].length == 1) { function getPaymentMethodType(obj) { return obj["payment_methods"][0]["payment_method_types"][0][ "payment_method_type" ]; } expect(getPaymentMethodType(resData)).to.equal( getPaymentMethodType(response.body) ); } else { expect(0).to.equal(response.body["payment_methods"].length); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "paymentMethodListTestWithRequiredFields", (data, globalState) => { const apiKey = globalState.get("publishableKey"); const baseUrl = globalState.get("baseUrl"); const clientSecret = globalState.get("clientSecret"); const url = `${baseUrl}/account/payment_methods?client_secret=${clientSecret}`; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": apiKey, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { const responsePaymentMethods = response.body["payment_methods"]; const responseRequiredFields = responsePaymentMethods[0]["payment_method_types"][0][ "required_fields" ]; const expectedRequiredFields = data["payment_methods"][0]["payment_method_types"][0][ "required_fields" ]; Object.keys(expectedRequiredFields).forEach((key) => { const expectedField = expectedRequiredFields[key]; const responseField = responseRequiredFields[key]; expect(responseField).to.exist; expect(responseField.required_field).to.equal( expectedField.required_field ); expect(responseField.display_name).to.equal( expectedField.display_name ); expect(responseField.field_type).to.deep.equal( expectedField.field_type ); expect(responseField.value).to.equal(expectedField.value); }); } else { throw new Error( `List payment methods failed with status code "${response.status}" and error message "${response.body.error.message}"` ); } }); }); } ); Cypress.Commands.add( "paymentMethodListTestTwoConnectorsForOnePaymentMethodCredit", (resData, globalState) => { cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/payment_methods?client_secret=${globalState.get("clientSecret")}`, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body).to.have.property("currency"); if (resData["payment_methods"].length > 0) { function getPaymentMethodType(obj) { return obj["payment_methods"][0]["payment_method_types"][0][ "card_networks" ][0]["eligible_connectors"] .slice() .sort(); } const config_payment_method_type = getPaymentMethodType(resData); const response_payment_method_type = getPaymentMethodType( response.body ); for (let i = 0; i < response_payment_method_type.length; i++) { expect(config_payment_method_type[i]).to.equal( response_payment_method_type[i] ); } } else { expect(0).to.equal(response.body["payment_methods"].length); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "sessionTokenCall", (sessionTokenBody, data, globalState) => { const { Response: resData } = data || {}; sessionTokenBody.payment_id = globalState.get("paymentID"); sessionTokenBody.client_secret = globalState.get("clientSecret"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/session_tokens`, headers: { Accept: "application/json", "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), "x-merchant-domain": "hyperswitch - demo - store.netlify.app", "x-client-platform": "web", }, body: sessionTokenBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { const expectedTokens = resData.body.session_token; const actualTokens = response.body.session_token; // Verifying length of array expect(actualTokens.length, "arrayLength").to.equal( expectedTokens.length ); // Verify specific fields in each session_token object expectedTokens.forEach((expectedToken, index) => { const actualToken = actualTokens[index]; // Check specific fields only expect(actualToken.wallet_name, "wallet_name").to.equal( expectedToken.wallet_name ); expect(actualToken.connector, "connector").to.equal( expectedToken.connector ); }); } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "createPaymentIntentTest", ( createPaymentBody, data, authentication_type, capture_method, globalState ) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; if ( !createPaymentBody || typeof createPaymentBody !== "object" || !reqData.currency ) { throw new Error( "Invalid parameters provided to createPaymentIntentTest command" ); } const configInfo = execConfig(validateConfig(configs)); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { createPaymentBody[key] = reqData[key]; } createPaymentBody.authentication_type = authentication_type; createPaymentBody.capture_method = capture_method; createPaymentBody.customer_id = globalState.get("customerId"); createPaymentBody.profile_id = profile_id; globalState.set("paymentAmount", createPaymentBody.amount); globalState.set("setupFutureUsage", createPaymentBody.setup_future_usage); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments`, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: createPaymentBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (resData.status === 200) { expect(response.body).to.have.property("client_secret"); const clientSecret = response.body.client_secret; globalState.set("clientSecret", clientSecret); globalState.set("paymentID", response.body.payment_id); cy.log(clientSecret); for (const key in resData.body) { expect(resData.body[key]).to.equal( response.body[key], `Expected ${resData.body[key]} but got ${response.body[key]}` ); } expect(response.body.payment_id, "payment_id").to.not.be.null; expect(response.body.merchant_id, "merchant_id").to.not.be.null; expect(createPaymentBody.amount, "amount").to.equal( response.body.amount ); expect(createPaymentBody.currency, "currency").to.equal( response.body.currency ); expect(createPaymentBody.capture_method, "capture_method").to.equal( response.body.capture_method ); expect( createPaymentBody.authentication_type, "authentication_type" ).to.equal(response.body.authentication_type); expect(createPaymentBody.description, "description").to.equal( response.body.description ); expect(createPaymentBody.email, "email").to.equal( response.body.email ); expect(createPaymentBody.email, "customer.email").to.equal( response.body.customer.email ); expect(createPaymentBody.customer_id, "customer.id").to.equal( response.body.customer.id ); expect(createPaymentBody.metadata, "metadata").to.deep.equal( response.body.metadata ); expect( createPaymentBody.setup_future_usage, "setup_future_usage" ).to.equal(response.body.setup_future_usage); // If 'shipping_cost' is not included in the request, the 'amount' in 'createPaymentBody' should match the 'amount_capturable' in the response. if (typeof createPaymentBody?.shipping_cost === "undefined") { expect(createPaymentBody.amount, "amount_capturable").to.equal( response.body.amount_capturable ); } else { expect( createPaymentBody.amount + createPaymentBody.shipping_cost, "amount_capturable" ).to.equal(response.body.amount_capturable); } expect(response.body.amount_received, "amount_received").to.be.oneOf([ 0, null, ]); expect(response.body.connector, "connector").to.be.null; expect(createPaymentBody.capture_method, "capture_method").to.equal( response.body.capture_method ); expect(response.body.payment_method, "payment_method").to.be.null; expect(response.body.payment_method_data, "payment_method_data").to.be .null; expect(response.body.merchant_connector_id, "merchant_connector_id") .to.be.null; expect(response.body.payment_method_id, "payment_method_id").to.be .null; expect(response.body.payment_method_id, "payment_method_status").to.be .null; expect(response.body.profile_id, "profile_id").to.not.be.null; expect( response.body.merchant_order_reference_id, "merchant_order_reference_id" ).to.be.null; expect(response.body.connector_mandate_id, "connector_mandate_id").to .be.null; validateErrorMessage(response, resData); } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add("paymentMethodsCallTest", (globalState) => { const clientSecret = globalState.get("clientSecret"); const paymentIntentID = clientSecret.split("_secret_")[0]; cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/payment_methods?client_secret=${clientSecret}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body).to.have.property("redirect_url"); expect(response.body).to.have.property("payment_methods"); if ( globalState.get("collectBillingDetails") === true || globalState.get("alwaysCollectBillingDetails") === true ) { expect( response.body.collect_billing_details_from_wallets, "collectBillingDetailsFromWallets" ).to.be.true; } else expect( response.body.collect_billing_details_from_wallets, "collectBillingDetailsFromWallets" ).to.be.false; if ( globalState.get("collectShippingDetails") === true || globalState.get("alwaysCollectShippingDetails") === true ) { expect( response.body.collect_shipping_details_from_wallets, "collectShippingDetailsFromWallets" ).to.be.true; } else expect( response.body.collect_shipping_details_from_wallets, "collectShippingDetailsFromWallets" ).to.be.false; globalState.set("paymentID", paymentIntentID); cy.log(response); }); }); }); Cypress.Commands.add("createPaymentMethodTest", (globalState, data) => { const { Request: reqData, Response: resData } = data || {}; reqData.customer_id = globalState.get("customerId"); const merchant_id = globalState.get("merchantId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payment_methods`, headers: { "Content-Type": "application/json", Accept: "application/json", "api-key": globalState.get("apiKey"), }, body: reqData, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body.client_secret, "client_secret").to.include( "_secret_" ).and.to.not.be.null; expect(response.body.payment_method_id, "payment_method_id").to.not.be .null; expect(response.body.merchant_id, "merchant_id").to.equal(merchant_id); expect(reqData.payment_method_type, "payment_method_type").to.equal( response.body.payment_method_type ); expect(reqData.payment_method, "payment_method").to.equal( response.body.payment_method ); expect(response.body.last_used_at, "last_used_at").to.not.be.null; expect(reqData.customer_id, "customer_id").to.equal( response.body.customer_id ); globalState.set("paymentMethodId", response.body.payment_method_id); } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add("deletePaymentMethodTest", (globalState) => { const apiKey = globalState.get("apiKey"); const baseUrl = globalState.get("baseUrl"); const paymentMethodId = globalState.get("paymentMethodId"); const url = `${baseUrl}/payment_methods/${paymentMethodId}`; cy.request({ method: "DELETE", url: url, headers: { Accept: "application/json", "api-key": apiKey, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body.payment_method_id).to.equal(paymentMethodId); expect(response.body.deleted).to.be.true; } else if (response.status === 500 && baseUrl.includes("localhost")) { // delete payment method api endpoint requires tartarus (hyperswitch card vault) to be set up since it makes a call to the locker service to delete the payment method expect(response.body.error.code).to.include("HE_00"); expect(response.body.error.message).to.include("Something went wrong"); } else { throw new Error( `Payment Method Delete Call Failed with error message: ${response.body.error.message}` ); } }); }); }); Cypress.Commands.add("setDefaultPaymentMethodTest", (globalState) => { const payment_method_id = globalState.get("paymentMethodId"); const customer_id = globalState.get("customerId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/customers/${customer_id}/payment_methods/${payment_method_id}/default`, headers: { "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body).to.have.property( "default_payment_method_id", payment_method_id ); expect(response.body).to.have.property("customer_id", customer_id); } else { defaultErrorHandler(response); } }); }); }); Cypress.Commands.add( "confirmCallTest", (confirmBody, data, confirm, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const apiKey = globalState.get("publishableKey"); const baseUrl = globalState.get("baseUrl"); const configInfo = execConfig(validateConfig(configs)); const merchantConnectorId = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); const setupFutureUsage = globalState.get("setupFutureUsage"); const paymentIntentID = globalState.get("paymentID"); const profileId = globalState.get(`${configInfo.profilePrefix}Id`); const url = `${baseUrl}/payments/${paymentIntentID}/confirm`; confirmBody.client_secret = globalState.get("clientSecret"); confirmBody.confirm = confirm; confirmBody.profile_id = profileId; for (const key in reqData) { confirmBody[key] = reqData[key]; } cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": apiKey, }, failOnStatusCode: false, body: confirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", paymentIntentID); globalState.set("connectorId", response.body.connector); expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(paymentIntentID, "payment_id").to.equal( response.body.payment_id ); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(merchantConnectorId, "connector_id").to.equal( response.body.merchant_connector_id ); expect(response.body.customer, "customer").to.not.be.empty; expect(response.body.billing, "billing_address").to.not.be.empty; expect(response.body.profile_id, "profile_id").to.equal(profileId).and .to.not.be.null; validateErrorMessage(response, resData); if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); if (setupFutureUsage === "off_session") { expect( response.body.connector_mandate_id, "connector_mandate_id" ).to.not.be.null; } } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); if (setupFutureUsage === "off_session") { expect( response.body.connector_mandate_id, "connector_mandate_id" ).to.not.be.null; } } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "confirmBankRedirectCallTest", (confirmBody, data, confirm, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const connectorId = globalState.get("connectorId"); const paymentIntentId = globalState.get("paymentID"); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { confirmBody[key] = reqData[key]; } confirmBody.client_secret = globalState.get("clientSecret"); confirmBody.confirm = confirm; confirmBody.profile_id = profile_id; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${paymentIntentId}/confirm`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, body: confirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.headers["content-type"]).to.include( "application/json" ); globalState.set("paymentID", paymentIntentId); globalState.set("connectorId", response.body.connector); globalState.set("paymentMethodType", confirmBody.payment_method_type); if (response.status === 200) { validateErrorMessage(response, resData); switch (response.body.authentication_type) { case "three_ds": if ( response.body.capture_method === "automatic" || response.body.capture_method === "manual" ) { if (response.body.status !== "failed") { // we get many statuses here, hence this verification if ( connectorId === "adyen" && response.body.payment_method_type === "blik" ) { expect(response.body) .to.have.property("next_action") .to.have.property("type") .to.equal("wait_screen_information"); } else { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); } } else if (response.body.status === "failed") { expect(response.body.error_code).to.equal( resData.body.error_code ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } break; case "no_three_ds": if ( response.body.capture_method === "automatic" || response.body.capture_method === "manual" ) { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } break; default: throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "confirmBankTransferCallTest", (confirmBody, data, confirm, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const paymentIntentID = globalState.get("paymentID"); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { confirmBody[key] = reqData[key]; } confirmBody.client_secret = globalState.get("clientSecret"); confirmBody.confirm = confirm; confirmBody.profile_id = globalState.get(profile_id); globalState.set("paymentMethodType", confirmBody.payment_method_type); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${paymentIntentID}/confirm`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, body: confirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", paymentIntentID); validateErrorMessage(response, resData); if ( response.body.capture_method === "automatic" || response.body.capture_method === "manual" ) { switch (response.body.payment_method_type) { case "pix": expect(response.body) .to.have.property("next_action") .to.have.property("qr_code_url"); if (response.body.next_action.qr_code_url !== null) { globalState.set( "nextActionUrl", // This is intentionally kept as nextActionUrl to avoid issues during handleRedirection call, response.body.next_action.qr_code_url ); globalState.set("nextActionType", "qr_code_url"); } else { globalState.set( "nextActionUrl", // This is intentionally kept as nextActionUrl to avoid issues during handleRedirection call, response.body.next_action.image_data_url ); globalState.set("nextActionType", "image_data_url"); } break; default: expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); break; } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "confirmUpiCall", (confirmBody, data, confirm, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const paymentId = globalState.get("paymentID"); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { confirmBody[key] = reqData[key]; } confirmBody.client_secret = globalState.get("clientSecret"); confirmBody.confirm = confirm; confirmBody.profile_id = profile_id; globalState.set("paymentMethodType", confirmBody.payment_method_type); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${paymentId}/confirm`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, body: confirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { validateErrorMessage(response, resData); if ( response.body.capture_method === "automatic" || response.body.capture_method === "manual" ) { if (response.body.payment_method_type === "upi_collect") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); } else if (response.body.payment_method_type === "upi_intent") { expect(response.body) .to.have.property("next_action") .to.have.property("qr_code_fetch_url"); globalState.set( "nextActionUrl", response.body.next_action.qr_code_fetch_url ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "createConfirmPaymentTest", ( createConfirmPaymentBody, data, authentication_type, capture_method, globalState ) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const merchant_connector_id = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); createConfirmPaymentBody.authentication_type = authentication_type; createConfirmPaymentBody.capture_method = capture_method; createConfirmPaymentBody.customer_id = globalState.get("customerId"); createConfirmPaymentBody.profile_id = profile_id; for (const key in reqData) { createConfirmPaymentBody[key] = reqData[key]; } cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: createConfirmPaymentBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { globalState.set("clientSecret", response.body.client_secret); expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentAmount", createConfirmPaymentBody.amount); globalState.set("paymentID", response.body.payment_id); expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(response.body.payment_id, "payment_id").to.equal( globalState.get("paymentID") ); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(response.body.merchant_connector_id, "connector_id").to.equal( merchant_connector_id ); expect(response.body.customer, "customer").to.not.be.empty; expect(response.body.billing, "billing_address").to.not.be.empty; expect(response.body.profile_id, "profile_id").to.not.be.null; expect(response.body).to.have.property("status"); validateErrorMessage(response, resData); if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else { throw new Error( `Invalid authentication type: ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.deep.equal( response.body[key] ); } } else { throw new Error( `Invalid authentication type: ${response.body.authentication_type}` ); } } } else { defaultErrorHandler(response, resData); } }); }); } ); // This is consequent saved card payment confirm call test(Using payment token) Cypress.Commands.add( "saveCardConfirmCallTest", (saveCardConfirmBody, data, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const merchant_connector_id = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); const paymentIntentID = globalState.get("paymentID"); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); if (reqData.setup_future_usage === "on_session") { saveCardConfirmBody.card_cvc = reqData.payment_method_data.card.card_cvc; } saveCardConfirmBody.client_secret = globalState.get("clientSecret"); saveCardConfirmBody.payment_token = globalState.get("paymentToken"); saveCardConfirmBody.profile_id = profile_id; if (reqData.billing === null) { saveCardConfirmBody.billing = null; } cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${paymentIntentID}/confirm`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, failOnStatusCode: false, body: saveCardConfirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", paymentIntentID); globalState.set("paymentID", paymentIntentID); globalState.set("connectorId", response.body.connector); expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(paymentIntentID, "payment_id").to.equal( response.body.payment_id ); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(merchant_connector_id, "connector_id").to.equal( response.body.merchant_connector_id ); expect(response.body.customer, "customer").to.not.be.empty; if (reqData.billing !== null) { expect(response.body.billing, "billing_address").to.not.be.empty; } expect(response.body.profile_id, "profile_id").to.not.be.null; expect(response.body.payment_token, "payment_token").to.not.be.null; validateErrorMessage(response, resData); if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); if ( response.body?.payment_method_id && response.body.payment_method_id !== null ) { expect( response.body.payment_method_status, "payment_method_status" ).to.equal("active"); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } expect(response.body.customer_id).to.equal( globalState.get("customerId") ); if ( [ "partially_captured", "requires_capture", "succeeded", ].includes(response.body.status) ) { expect( response.body.payment_method_id, "payment_method_id should exist for succeeded/requires_capture status" ).to.exist.and.to.be.a("string"); expect( response.body.payment_method_id, "payment_method_id" ).to.include("pm_"); expect( response.body.payment_method_status, "payment_method_status" ).to.equal("active"); } } else { // Handle other authentication types as needed throw new Error( `Invalid authentication type: ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } expect(response.body.customer_id).to.equal( globalState.get("customerId") ); } else { // Handle other authentication types as needed throw new Error( `Invalid authentication type: ${response.body.authentication_type}` ); } } else { // Handle other capture methods as needed throw new Error( `Invalid capture method: ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add("captureCallTest", (requestBody, data, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const paymentId = globalState.get("paymentID"); const profileId = globalState.get(`${configInfo.profilePrefix}Id`); requestBody.profile_id = profileId; for (const key in reqData) { requestBody[key] = reqData[key]; } cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${paymentId}/capture`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.body.capture_method !== undefined) { expect(response.body.payment_id).to.equal(paymentId); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add("voidCallTest", (requestBody, data, globalState) => { const { Configs: configs = {}, Response: resData, Request: reqData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const payment_id = globalState.get("paymentID"); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); requestBody.profile_id = profile_id; requestBody.cancellation_reason = reqData?.cancellation_reason ?? requestBody.cancellation_reason; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments/${payment_id}/cancel`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add( "retrievePaymentCallTest", (globalState, data, autoretries = false, attempt = 1) => { const { Configs: configs = {} } = data || {}; const configInfo = execConfig(validateConfig(configs)); const merchant_connector_id = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); const payment_id = globalState.get("paymentID"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/payments/${payment_id}?force_sync=true&expand_attempts=true`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.headers["content-type"]).to.include( "application/json" ); expect(response.body.payment_id).to.equal(payment_id); expect(response.body.amount).to.equal( globalState.get("paymentAmount") ); expect(response.body.profile_id, "profile_id").to.not.be.null; expect(response.body.billing, "billing_address").to.not.be.null; expect(response.body.customer, "customer").to.not.be.empty; if ( ["succeeded", "processing", "requires_customer_action"].includes( response.body.status ) ) { expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(response.body.payment_method, "payment_method").to.not.be .null; expect( response.body.merchant_connector_id, "connector_id" ).to.equal(merchant_connector_id); } if ( response.body.payment_method_id && typeof response.body.payment_method_id === "string" ) { // Validate the payment_method_id format expect( response.body.payment_method_id, "payment_method_id" ).to.include("pm_").and.to.not.be.null; const activeStatuses = [ "succeeded", "requires_capture", "partially_captured", ]; // If capture method is manual, 'processing' status also means 'active' // for the payment method's usability. if (response.body.capture_method === "manual") { activeStatuses.push("processing"); } const expectedStatus = activeStatuses.includes(response.body.status) ? "active" : "inactive"; // Validate the status expect( response.body.payment_method_status, "payment_method_status" ).to.equal(expectedStatus); } if (autoretries) { expect(response.body).to.have.property("attempts"); expect(response.body.attempts).to.be.an("array").and.not.empty; expect(response.body.attempts.length).to.equal(attempt); expect(response.body.attempts[0].attempt_id).to.include( `${payment_id}_` ); for (const key in response.body.attempts) { if ( response.body.attempts[key].attempt_id === `${payment_id}_${attempt}` && response.body.status === "succeeded" ) { expect(response.body.attempts[key].status).to.equal("charged"); } else if ( response.body.attempts[key].attempt_id === `${payment_id}_${attempt}` && response.body.status === "requires_customer_action" ) { expect(response.body.attempts[key].status).to.equal( "authentication_pending" ); } else { expect(response.body.attempts[key].status).to.equal("failure"); } } } } else { throw new Error( `Retrieve Payment Call Failed with error code "${response.body.error.code}" error message "${response.body.error.message}"` ); } }); }); } ); Cypress.Commands.add("refundCallTest", (requestBody, data, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const payment_id = globalState.get("paymentID"); // we only need this to set the delay. We don't need the return value execConfig(validateConfig(configs)); for (const key in reqData) { requestBody[key] = reqData[key]; } requestBody.payment_id = payment_id; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/refunds`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("refundId", response.body.refund_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } expect(response.body.payment_id).to.equal(payment_id); } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add("syncRefundCallTest", (data, globalState) => { const { Response: resData } = data || {}; const refundId = globalState.get("refundId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/refunds/${refundId}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } }); }); }); Cypress.Commands.add( "citForMandatesCallTest", ( requestBody, data, amount, confirm, capture_method, payment_type, globalState ) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); const merchant_connector_id = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); const setupFutureUsage = globalState.get("setupFutureUsage"); for (const key in reqData) { requestBody[key] = reqData[key]; } requestBody.amount = amount; requestBody.capture_method = capture_method; requestBody.confirm = confirm; requestBody.customer_id = globalState.get("customerId"); requestBody.payment_type = payment_type; requestBody.profile_id = profile_id; globalState.set("paymentAmount", requestBody.amount); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", response.body.payment_id); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(merchant_connector_id, "connector_id").to.equal( response.body.merchant_connector_id ); expect(response.body.customer, "customer").to.not.be.empty; expect(response.body.profile_id, "profile_id").to.not.be.null; if (response.body.status !== "failed") { expect(response.body.payment_method_id, "payment_method_id").to.not .be.null; } if (requestBody.mandate_data === null) { expect(response.body).to.have.property("payment_method_id"); globalState.set("paymentMethodId", response.body.payment_method_id); } else { expect(response.body).to.have.property("mandate_id"); globalState.set("mandateId", response.body.mandate_id); } if (response.body.capture_method === "automatic") { expect(response.body).to.have.property("mandate_id"); if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); if (setupFutureUsage === "off_session") { expect( response.body.connector_mandate_id, "connector_mandate_id" ).to.not.be.null; } } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; globalState.set( "nextActionUrl", response.body.next_action.redirect_to_url ); cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); if (setupFutureUsage === "off_session") { expect( response.body.connector_mandate_id, "connector_mandate_id" ).to.not.be.null; } } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "mitForMandatesCallTest", (requestBody, data, amount, confirm, capture_method, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const profile_id = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { requestBody[key] = reqData[key]; } const merchant_connector_id = globalState.get( `${configInfo.merchantConnectorPrefix}Id` ); requestBody.amount = amount; requestBody.confirm = confirm; requestBody.capture_method = capture_method; requestBody.customer_id = globalState.get("customerId"); requestBody.mandate_id = globalState.get("mandateId"); requestBody.profile_id = profile_id; globalState.set("paymentAmount", requestBody.amount); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payments`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", response.body.payment_id); expect(response.body.payment_method_data, "payment_method_data").to .not.be.empty; expect(response.body.connector, "connector").to.equal( globalState.get("connectorId") ); expect(merchant_connector_id, "connector_id").to.equal( response.body.merchant_connector_id ); expect(response.body.customer, "customer").to.not.be.empty; expect(response.body.profile_id, "profile_id").to.not.be.null; expect(response.body.payment_method_id, "payment_method_id").to.not.be .null; if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else if (response.status === 400) { if (response.body.error.message === "Mandate Validation Failed") { expect(response.body.error.code).to.equal("HE_03"); expect(response.body.error.message).to.equal( "Mandate Validation Failed" ); expect(response.body.error.reason).to.equal( "request amount is greater than mandate amount" ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "mitUsingPMId", (requestBody, data, amount, confirm, capture_method, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const profileId = globalState.get(`${configInfo.profilePrefix}Id`); const apiKey = globalState.get("apiKey"); const baseUrl = globalState.get("baseUrl"); const customerId = globalState.get("customerId"); const paymentMethodId = globalState.get("paymentMethodId"); const url = `${baseUrl}/payments`; for (const key in reqData) { requestBody[key] = reqData[key]; } requestBody.amount = amount; requestBody.capture_method = capture_method; requestBody.confirm = confirm; requestBody.customer_id = customerId; requestBody.profile_id = profileId; requestBody.recurring_details.data = paymentMethodId; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": apiKey, }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("paymentID", response.body.payment_id); expect( response.body.payment_method_id, "payment_method_id" ).to.include("pm_").and.to.not.be.null; if (response.body.status === "failed") { expect( response.body.connector_transaction_id, "connector_transaction_id" ).to.be.null; } else { expect( response.body.connector_transaction_id, "connector_transaction_id" ).to.not.be.null; } expect( response.body.payment_method_status, "payment_method_status" ).to.equal("active"); if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "mitUsingNTID", (requestBody, data, amount, confirm, capture_method, globalState) => { const { Configs: configs = {}, Request: reqData, Response: resData, } = data || {}; const configInfo = execConfig(validateConfig(configs)); const profileId = globalState.get(`${configInfo.profilePrefix}Id`); for (const key in reqData) { requestBody[key] = reqData[key]; } requestBody.amount = amount; requestBody.confirm = confirm; requestBody.capture_method = capture_method; requestBody.profile_id = profileId; const apiKey = globalState.get("apiKey"); const baseUrl = globalState.get("baseUrl"); const url = `${baseUrl}/payments`; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": apiKey, }, failOnStatusCode: false, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.headers["content-type"]).to.include( "application/json" ); globalState.set("paymentID", response.body.payment_id); if (response.body.capture_method === "automatic") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else if (response.body.capture_method === "manual") { if (response.body.authentication_type === "three_ds") { expect(response.body) .to.have.property("next_action") .to.have.property("redirect_to_url"); const nextActionUrl = response.body.next_action.redirect_to_url; cy.log(nextActionUrl); for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else if (response.body.authentication_type === "no_three_ds") { for (const key in resData.body) { expect(resData.body[key], [key]).to.equal(response.body[key]); } } else { throw new Error( `Invalid authentication type ${response.body.authentication_type}` ); } } else { throw new Error( `Invalid capture method ${response.body.capture_method}` ); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add("listMandateCallTest", (globalState) => { const customerId = globalState.get("customerId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/customers/${customerId}/mandates`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); let i = 0; for (i in response.body) { if (response.body[i].mandate_id === globalState.get("mandateId")) { expect(response.body[i].status).to.equal("active"); } } }); }); }); Cypress.Commands.add("revokeMandateCallTest", (globalState) => { const mandateId = globalState.get("mandateId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/mandates/revoke/${mandateId}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.body.status === 200) { expect(response.body.status).to.equal("revoked"); } else if (response.body.status === 400) { expect(response.body.reason).to.equal( "Mandate has already been revoked" ); } }); }); }); Cypress.Commands.add( "handleRedirection", (globalState, expectedRedirection) => { const connectorId = globalState.get("connectorId"); const nextActionUrl = globalState.get("nextActionUrl"); const expectedUrl = new URL(expectedRedirection); const redirectionUrl = new URL(nextActionUrl); handleRedirection( "three_ds", { redirectionUrl, expectedUrl }, connectorId, null ); } ); Cypress.Commands.add( "handleBankRedirectRedirection", (globalState, paymentMethodType, expectedRedirection) => { const connectorId = globalState.get("connectorId"); const nextActionUrl = globalState.get("nextActionUrl"); const expectedUrl = new URL(expectedRedirection); const redirectionUrl = new URL(nextActionUrl); // explicitly restricting `sofort` payment method by adyen from running as it stops other tests from running // trying to handle that specific case results in stripe 3ds tests to fail if (!(connectorId == "adyen" && paymentMethodType == "sofort")) { handleRedirection( "bank_redirect", { redirectionUrl, expectedUrl }, connectorId, paymentMethodType ); } } ); Cypress.Commands.add( "handleBankTransferRedirection", (globalState, paymentMethodType, expectedRedirection) => { const connectorId = globalState.get("connectorId"); const nextActionUrl = globalState.get("nextActionUrl"); const nextActionType = globalState.get("nextActionType"); const expectedUrl = new URL(expectedRedirection); const redirectionUrl = new URL(nextActionUrl); handleRedirection( "bank_transfer", { redirectionUrl, expectedUrl }, connectorId, paymentMethodType, { nextActionType, } ); } ); Cypress.Commands.add( "handleUpiRedirection", (globalState, paymentMethodType, expected_redirection) => { const connectorId = globalState.get("connectorId"); const nextActionUrl = globalState.get("nextActionUrl"); const expectedUrl = new URL(expected_redirection); const redirectionUrl = new URL(nextActionUrl); handleRedirection( "upi", { redirectionUrl, expectedUrl }, connectorId, paymentMethodType ); } ); Cypress.Commands.add("listCustomerPMCallTest", (globalState, order = 0) => { const apiKey = globalState.get("apiKey"); const baseUrl = globalState.get("baseUrl"); const customerId = globalState.get("customerId"); const url = `${baseUrl}/customers/${customerId}/payment_methods`; cy.request({ method: "GET", url: url, headers: { "api-key": apiKey, "Content-Type": "application/json", }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); // Validate response has payment methods if (response.body.customer_payment_methods[order]?.payment_token) { const paymentToken = response.body.customer_payment_methods[order].payment_token; const paymentMethodId = response.body.customer_payment_methods[order].payment_method_id; const lastUsedAt = response.body.customer_payment_methods[order].last_used_at; globalState.set("paymentMethodId", paymentMethodId); globalState.set("paymentToken", paymentToken); // Validate last_used_at timestamp expect(new Date(lastUsedAt).getTime(), "last_used_at").to.be.lessThan( Date.now() ).and.to.not.be.null; // For order > 0, validate payment methods are ordered by last_used_at if (order > 0) { const prevLastUsedAt = response.body.customer_payment_methods[0].last_used_at; expect( new Date(prevLastUsedAt).getTime(), "last_used_at ordering" ).to.be.greaterThan(new Date(lastUsedAt).getTime()); } } else { expect(response.body) .to.have.property("customer_payment_methods") .to.be.an("array").and.empty; } // Validate other payment method properties for (const arrayCount in response.body.customer_payment_methods) { const paymentMethod = response.body.customer_payment_methods[arrayCount]; expect( globalState.get("customerId"), `${arrayCount} customer_id` ).to.equal(paymentMethod.customer_id); expect( paymentMethod.payment_token, `${arrayCount} payment_token` ).to.include("token_").and.not.be.null; expect( paymentMethod.payment_method_id, `${arrayCount} payment_method_id` ).to.include("pm_").and.not.be.null; expect(paymentMethod.payment_method, `${arrayCount} payment_method`).to .not.be.null; expect( paymentMethod.payment_method_type, `${arrayCount} payment_method_type` ).to.not.be.null; expect(paymentMethod.last_used_at, `${arrayCount} last_used_at`).to.not .be.null; } }); }); }); Cypress.Commands.add("listCustomerPMByClientSecret", (globalState) => { const clientSecret = globalState.get("clientSecret"); const setupFutureUsage = globalState.get("setupFutureUsage"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/customers/payment_methods?client_secret=${clientSecret}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("publishableKey"), }, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.body.customer_payment_methods[0]?.payment_token) { const paymentToken = response.body.customer_payment_methods[0].payment_token; const paymentMethodId = response.body.customer_payment_methods[0].payment_method_id; globalState.set("paymentToken", paymentToken); globalState.set("paymentMethodId", paymentMethodId); expect( response.body.customer_payment_methods[0].payment_method_id, "payment_method_id" ).to.not.be.null; if (setupFutureUsage === "off_session") { expect( response.body.customer_payment_methods[0].requires_cvv, "requires_cvv" ).to.be.false; } else if (setupFutureUsage === "on_session") { expect( response.body.customer_payment_methods[0].requires_cvv, "requires_cvv" ).to.be.true; } } else { // We only get an empty array if something's wrong. One exception is a 4xx when no customer exist but it is handled in the test expect(response.body) .to.have.property("customer_payment_methods") .to.be.an("array").and.empty; } }); }); }); Cypress.Commands.add("listRefundCallTest", (requestBody, globalState) => { cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/refunds/list`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, body: requestBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.data).to.be.an("array").and.not.empty; }); }); }); Cypress.Commands.add( "createConfirmPayoutTest", (createConfirmPayoutBody, data, confirm, auto_fulfill, globalState) => { const { Request: reqData, Response: resData } = data || {}; for (const key in reqData) { createConfirmPayoutBody[key] = reqData[key]; } createConfirmPayoutBody.auto_fulfill = auto_fulfill; createConfirmPayoutBody.confirm = confirm; createConfirmPayoutBody.customer_id = globalState.get("customerId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payouts/create`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: createConfirmPayoutBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("payoutAmount", createConfirmPayoutBody.amount); globalState.set("payoutID", response.body.payout_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "createConfirmWithTokenPayoutTest", (createConfirmPayoutBody, data, confirm, auto_fulfill, globalState) => { const { Request: reqData, Response: resData } = data || {}; for (const key in reqData) { createConfirmPayoutBody[key] = reqData[key]; } createConfirmPayoutBody.customer_id = globalState.get("customerId"); createConfirmPayoutBody.payout_token = globalState.get("paymentToken"); createConfirmPayoutBody.auto_fulfill = auto_fulfill; createConfirmPayoutBody.confirm = confirm; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payouts/create`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: createConfirmPayoutBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("payoutAmount", createConfirmPayoutBody.amount); globalState.set("payoutID", response.body.payout_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "createConfirmWithPayoutMethodIdTest", (createConfirmPayoutBody, data, confirm, auto_fulfill, globalState) => { const { Request: reqData, Response: resData } = data || {}; for (const key in reqData) { createConfirmPayoutBody[key] = reqData[key]; } createConfirmPayoutBody.customer_id = globalState.get("customerId"); createConfirmPayoutBody.auto_fulfill = auto_fulfill; createConfirmPayoutBody.confirm = confirm; createConfirmPayoutBody.payout_method_id = globalState.data.paymentMethodId; delete createConfirmPayoutBody.payout_token; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payouts/create`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: createConfirmPayoutBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { globalState.set("payoutAmount", createConfirmPayoutBody.amount); globalState.set("payoutID", response.body.payout_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "fulfillPayoutCallTest", (payoutFulfillBody, data, globalState) => { const { Response: resData } = data || {}; payoutFulfillBody.payout_id = globalState.get("payoutID"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/payouts/${globalState.get("payoutID")}/fulfill`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: payoutFulfillBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add( "updatePayoutCallTest", (payoutConfirmBody, data, auto_fulfill, globalState) => { const { Response: resData } = data || {}; payoutConfirmBody.confirm = true; payoutConfirmBody.auto_fulfill = auto_fulfill; cy.request({ method: "PUT", url: `${globalState.get("baseUrl")}/payouts/${globalState.get("payoutID")}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, body: payoutConfirmBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add("retrievePayoutCallTest", (globalState) => { const payout_id = globalState.get("payoutID"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/payouts/${payout_id}`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); expect(response.body.payout_id).to.equal(payout_id); expect(response.body.amount).to.equal(globalState.get("payoutAmount")); }); }); }); // User API calls // Below 3 commands should be called in sequence to login a user Cypress.Commands.add("userLogin", (globalState) => { const baseUrl = globalState.get("baseUrl"); const queryParams = `token_only=true`; const signinBody = { email: globalState.get("email"), password: globalState.get("password"), }; const url = `${baseUrl}/user/v2/signin?${queryParams}`; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", }, body: signinBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { if (response.body.token_type === "totp") { expect(response.body, "totp_token").to.have.property("token").and.to .not.be.empty; const totpToken = response.body.token; if (!totpToken) { throw new Error("No token received from login"); } globalState.set("totpToken", totpToken); } } else { throw new Error( `User login call failed to get totp token with status: "${response.status}" and message: "${response.body.error.message}"` ); } }); }); }); Cypress.Commands.add("terminate2Fa", (globalState) => { // Define the necessary variables and constant const baseUrl = globalState.get("baseUrl"); const queryParams = `skip_two_factor_auth=true`; const apiKey = globalState.get("totpToken"); const url = `${baseUrl}/user/2fa/terminate?${queryParams}`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { if (response.body.token_type === "user_info") { expect(response.body, "user_info_token").to.have.property("token").and .to.not.be.empty; const userInfoToken = response.body.token; if (!userInfoToken) { throw new Error("No user info token received"); } globalState.set("userInfoToken", userInfoToken); } } else { throw new Error( `2FA terminate call failed with status: "${response.status}" and message: "${response.body.error.message}"` ); } }); }); }); Cypress.Commands.add("userInfo", (globalState) => { // Define the necessary variables and constant const baseUrl = globalState.get("baseUrl"); const userInfoToken = globalState.get("userInfoToken"); const url = `${baseUrl}/user`; if (!userInfoToken) { throw new Error("No user info token available"); } cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${userInfoToken}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body, "merchant_id").to.have.property("merchant_id").and .to.not.be.empty; expect(response.body, "organization_id").to.have.property("org_id").and .to.not.be.empty; expect(response.body, "profile_id").to.have.property("profile_id").and .to.not.be.empty; globalState.set("merchantId", response.body.merchant_id); globalState.set("organizationId", response.body.org_id); globalState.set("profileId", response.body.profile_id); globalState.set("userInfoToken", userInfoToken); } else { throw new Error( `User login call failed to fetch user info with status: "${response.status}" and message: "${response.body.error.message}"` ); } }); }); }); // Specific to routing tests Cypress.Commands.add("ListMcaByMid", (globalState) => { const merchantId = globalState.get("merchantId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/account/${merchantId}/connectors`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), "X-Merchant-Id": merchantId, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); globalState.set("profileId", response.body[0].profile_id); globalState.set("stripeMcaId", response.body[0].merchant_connector_id); globalState.set("adyenMcaId", response.body[1].merchant_connector_id); globalState.set("bluesnapMcaId", response.body[3].merchant_connector_id); }); }); }); Cypress.Commands.add( "addRoutingConfig", (routingBody, data, type, routing_data, globalState) => { const { Request: reqData, Response: resData } = data || {}; for (const key in reqData) { routingBody[key] = reqData[key]; } // set profile id from env routingBody.profile_id = globalState.get("profileId"); routingBody.algorithm.type = type; routingBody.algorithm.data = routing_data; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/routing`, headers: { Authorization: `Bearer ${globalState.get("userInfoToken")}`, "Content-Type": "application/json", }, failOnStatusCode: false, body: routingBody, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body).to.have.property("id"); globalState.set("routingConfigId", response.body.id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); } ); Cypress.Commands.add("activateRoutingConfig", (data, globalState) => { const { Response: resData } = data || {}; const routing_config_id = globalState.get("routingConfigId"); cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/routing/${routing_config_id}/activate`, headers: { Authorization: `Bearer ${globalState.get("userInfoToken")}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body.id).to.equal(routing_config_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add("retrieveRoutingConfig", (data, globalState) => { const { Response: resData } = data || {}; const routing_config_id = globalState.get("routingConfigId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/routing/${routing_config_id}`, headers: { Authorization: `Bearer ${globalState.get("userInfoToken")}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { expect(response.headers["content-type"]).to.include("application/json"); if (response.status === 200) { expect(response.body.id).to.equal(routing_config_id); for (const key in resData.body) { expect(resData.body[key]).to.equal(response.body[key]); } } else { defaultErrorHandler(response, resData); } }); }); }); Cypress.Commands.add( "updateGsmConfig", (gsmBody, globalState, step_up_possible) => { gsmBody.step_up_possible = step_up_possible; cy.request({ method: "POST", url: `${globalState.get("baseUrl")}/gsm/update`, headers: { "Content-Type": "application/json", "api-key": globalState.get("adminApiKey"), }, body: gsmBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body) .to.have.property("message") .to.equal("card_declined"); expect(response.body) .to.have.property("connector") .to.equal("stripe"); expect(response.body) .to.have.property("step_up_possible") .to.equal(step_up_possible); } }); }); } ); Cypress.Commands.add("incrementalAuth", (globalState, data) => { const { Request: reqData, Response: resData } = data || {}; const baseUrl = globalState.get("baseUrl"); const paymentId = globalState.get("paymentID"); const apiKey = globalState.get("apiKey"); const url = `${baseUrl}/payments/${paymentId}/incremental_authorization`; cy.request({ method: "POST", url: url, headers: { "api-key": apiKey, "Content-Type": "application/json", }, body: reqData, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body.amount_capturable, "amount_capturable").to.equal( resData.body.amount_capturable ); expect( response.body.authorization_count, "authorization_count" ).to.be.a("number").and.not.be.null; expect( response.body.incremental_authorization_allowed, "incremental_authorization_allowed" ).to.be.true; expect( response.body.incremental_authorizations, "incremental_authorizations" ).to.be.an("array").and.not.be.empty; expect(response.body.payment_id, "payment_id").to.equal(paymentId); expect(response.body.status, "status").to.equal(resData.body.status); for (const key in response.body.incremental_authorizations) { expect(response.body.incremental_authorizations[key], "amount") .to.have.property("amount") .to.be.a("number") .to.equal(resData.body.amount).and.not.be.null; expect( response.body.incremental_authorizations[key], "error_code" ).to.have.property("error_code").to.be.null; expect( response.body.incremental_authorizations[key], "error_message" ).to.have.property("error_message").to.be.null; expect( response.body.incremental_authorizations[key], "previously_authorized_amount" ) .to.have.property("previously_authorized_amount") .to.be.a("number") .to.equal(response.body.amount).and.not.be.null; expect(response.body.incremental_authorizations[key], "status") .to.have.property("status") .to.equal("success"); } } }); }); }); Cypress.Commands.add("setConfigs", (globalState, key, value, requestType) => { if (!key || !requestType) { throw new Error("Key and requestType are required parameters"); } const REQUEST_CONFIG = { CREATE: { method: "POST", useKey: false }, UPDATE: { method: "POST", useKey: true }, FETCH: { method: "GET", useKey: true }, DELETE: { method: "DELETE", useKey: true }, }; const config = REQUEST_CONFIG[requestType]; if (!config) { throw new Error(`Invalid requestType: ${requestType}`); } const apiKey = globalState.get("adminApiKey"); const baseUrl = globalState.get("baseUrl"); const url = `${baseUrl}/configs/${config.useKey ? key : ""}`; const getRequestBody = { CREATE: () => ({ key, value }), UPDATE: () => ({ value }), }; const body = getRequestBody[requestType]?.() || undefined; cy.request({ method: config.method, url, headers: { "Content-Type": "application/json", "api-key": apiKey, }, ...(body && { body }), failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); cy.wrap(response).then(() => { if (response.status === 200) { expect(response.body).to.have.property("key").to.equal(key); expect(response.body).to.have.property("value").to.equal(value); } else { throw new Error( `Failed to set configs with status ${response.status} and message ${response.body.error.message}` ); } }); }); });
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 request", "authentication_type": "no_three_ds", "return_url": "https://example.com", "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "10", "card_exp_year": "50", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "setup_future_usage": "off_session", "mandate_data": { "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" } }, "mandate_type": { "single_use": { "amount": 8000, "currency": "USD" } } }, "payment_type": "setup_mandate", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }
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", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }
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", "secondary_email": "josephTest2@test.com", "secondary_phone": "proident adipisicing officia nulla", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://example.com", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "parent_merchant_id": "xkkdf909012sdjki2dkh5sdf", "metadata": { "city": "NY", "unit": "245" } }
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", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" } }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }
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": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "auto_fulfill": true, "confirm": true }
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": { "state": "New York", "city": "New York", "country": "US", "first_name": "john", "last_name": "doe", "zip": "10001", "line1": "123 Main Street Apt 4B", "line2": "123 Main Street Apt 4B", "line3": "123 Main Street Apt 4B" } }, "email": "hyperswitch_sdk_demo_id@gmail.com", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }
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"; import createConnectorBody from "./create-connector-body.json"; import customerCreateBody from "./create-customer-body.json"; import citConfirmBody from "./create-mandate-cit.json"; import mitConfirmBody from "./create-mandate-mit.json"; import createPaymentBody from "./create-payment-body.json"; import createPayoutBody from "./create-payout-confirm-body.json"; import pmIdConfirmBody from "./create-pm-id-mit.json"; import gsmBody from "./gsm-body.json"; import listRefundCall from "./list-refund-call-body.json"; import merchantCreateBody from "./merchant-create-body.json"; import merchantUpdateBody from "./merchant-update-body.json"; import refundBody from "./refund-flow-body.json"; import routingConfigBody from "./routing-config-body.json"; import saveCardConfirmBody from "./save-card-confirm-body.json"; import sessionTokenBody from "./session-token.json"; import apiKeyUpdateBody from "./update-api-key-body.json"; import updateConnectorBody from "./update-connector-body.json"; import customerUpdateBody from "./update-customer-body.json"; import voidBody from "./void-payment-body.json"; import ntidConfirmBody from "./create-ntid-mit.json"; export { apiKeyCreateBody, apiKeyUpdateBody, businessProfile, captureBody, citConfirmBody, configs, confirmBody, createConfirmPaymentBody, createConnectorBody, createPaymentBody, createPayoutBody, customerCreateBody, customerUpdateBody, gsmBody, listRefundCall, merchantCreateBody, merchantUpdateBody, mitConfirmBody, ntidConfirmBody, pmIdConfirmBody, refundBody, routingConfigBody, saveCardConfirmBody, sessionTokenBody, updateConnectorBody, voidBody, };
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", "authentication_type": "no_three_ds", "return_url": "https://example.com", "setup_future_usage": "on_session", "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" } }, "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "50", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "doe" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "doe" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }
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", "zip": "560095", "first_name": "John", "last_name": "Doe" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }
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" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }
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_person": "John Test2", "secondary_email": "JohnTest2@test.com", "secondary_phone": "cillum do dolor id", "website": "www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Francisco", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://example.com", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "metadata": { "city": "NY", "unit": "245" }, "primary_business_details": [ { "country": "US", "business": "default" } ] }
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_prefix": "AD", "merchant_name": "Cypress Test" } }
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", "card_exp_year": "2050", "card_holder_name": "joseph Doe", "network_transaction_id": "MCC5ZRGMI0925" } }, "off_session": true, "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "browser_info": { "ip_address": "129.0.0.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 30, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }
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_collect_shipping_details_from_wallet_connector": true } }
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", "country": "US", "first_name": "john", "last_name": "doe" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "john", "last_name": "doe" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }
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"] = Cypress.env("HS_PASSWORD"); this.data["connectorAuthFilePath"] = Cypress.env( "CONNECTOR_AUTH_FILE_PATH" ); } set(key, val) { this.data[key] = val; } get(key) { return this.data[key]; } } export default State;
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 ${type}, but got ${typeof value}.` ); return false; } return true; } // Helper function to validate specific config keys based on schema rules function validateConfigValue(key, value) { // At present, there are only 2 api keys for connectors. Will be scaled based on the need const SUPPORTED_CONNECTOR_CREDENTIAL = ["connector_1", "connector_2"]; if (config_fields.includes(key)) { switch (key) { case "DELAY": if (typeof value !== "object" || value === null) { console.error("DELAY must be an object."); return false; } if (!validateType(value.STATUS, "boolean")) return false; if ( !value.STATUS || typeof value.TIMEOUT !== "number" || value.TIMEOUT < 0 || value.TIMEOUT > 30000 ) { console.error( "DELAY.TIMEOUT must be an integer between 0 and 30000 and DELAY.STATUS must be enabled." ); return false; } break; case "CONNECTOR_CREDENTIAL": if (typeof value !== "object" || value === null) { console.error("CONNECTOR_CREDENTIAL must be an object."); return false; } // Validate nextConnector and multipleConnectors if present if ( value?.nextConnector !== undefined && typeof value.nextConnector !== "boolean" ) { console.error("nextConnector must be a boolean"); return false; } if ( value?.multipleConnectors && typeof value.multipleConnectors.status !== "boolean" ) { console.error("multipleConnectors.status must be a boolean"); return false; } // Validate structure if ( !value.value || !SUPPORTED_CONNECTOR_CREDENTIAL.includes(value.value) ) { console.error( `Config ${key}.value must be one of ${SUPPORTED_CONNECTOR_CREDENTIAL.join(", ")}.` ); return false; } break; case "TRIGGER_SKIP": case "DELAY.STATUS": if (!validateType(value, "boolean")) return false; break; default: console.error(`Config key ${key} is invalid.`); return false; } } else { console.error(`Config key ${key} is invalid.`); } return true; } // Function to validate the config object export function validateConfig(configObject) { // Configs object is an optional field in Connector Configs // If passed, it must be a valid Object if (typeof configObject === "undefined") { return null; } else if (typeof configObject !== "object" || configObject === null) { console.error(`Provided config is invalid:\n${configObject}`); return null; } for (const key in configObject) { if (Object.prototype.hasOwnProperty.call(configObject, key)) { const value = configObject[key]; if (!validateConfigValue(key, value)) { return null; // Return null if any validation fails } } } return configObject; } export function getProfileAndConnectorId(connectorType) { const credentials = { connector_1: { profileId: "profile", connectorId: "merchantConnector", }, connector_2: { profileId: "profile1", connectorId: "merchantConnector1", }, }; return credentials[connectorType] || credentials.connector_1; } function getSpecName() { return Cypress.spec.name.toLowerCase() === "__all" ? String( Cypress.mocha.getRunner().suite.ctx.test.invocationDetails.relativeFile ) .split("/") .pop() .toLowerCase() : Cypress.spec.name.toLowerCase(); } function matchesSpecName(specName) { if (!specName || !Array.isArray(specName) || specName.length === 0) { return false; } const currentSpec = getSpecName(); return specName.some( (name) => name && currentSpec.includes(name.toLowerCase()) ); } export function determineConnectorConfig(config) { const connectorCredential = config?.CONNECTOR_CREDENTIAL; const multipleConnectors = config?.multipleConnectors; // If CONNECTOR_CREDENTIAL doesn't exist or value is null, return default if (!connectorCredential || connectorCredential.value === null) { return DEFAULT_CONNECTOR; } // Handle nextConnector cases if ( Object.prototype.hasOwnProperty.call(connectorCredential, "nextConnector") ) { if (connectorCredential.nextConnector === true) { // Check multipleConnectors conditions if available if ( multipleConnectors?.status === true && multipleConnectors?.count > 1 ) { return "connector_2"; } return DEFAULT_CONNECTOR; } return DEFAULT_CONNECTOR; } // Handle specName cases if (Object.prototype.hasOwnProperty.call(connectorCredential, "specName")) { return matchesSpecName(connectorCredential.specName) ? connectorCredential.value : DEFAULT_CONNECTOR; } // Return value if it's the only property return connectorCredential.value; } export function execConfig(configs) { if (configs?.DELAY?.STATUS) { cy.wait(configs.DELAY.TIMEOUT); } const connectorType = determineConnectorConfig(configs); const { profileId, connectorId } = getProfileAndConnectorId(connectorType); return { profilePrefix: profileId, merchantConnectorPrefix: connectorId, }; }
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["client_secret"] = clientSecret; }; export const setCardNo = (requestBody, cardNo) => { // pass confirm body here to set CardNo requestBody["payment_method_data"]["card"]["card_number"] = cardNo; }; export const setApiKey = (requestBody, apiKey) => { requestBody["connector_account_details"]["api_key"] = apiKey; }; export const generateRandomString = (prefix = "cyMerchant") => { const uuidPart = "xxxxxxxx"; const randomString = uuidPart.replace(/[xy]/g, function (c) { const r = (Math.random() * 16) | 0; const v = c === "x" ? r : (r & 0x3) | 0x8; return v.toString(16); }); return `${prefix}_${randomString}`; }; export const setMerchantId = (merchantCreateBody, merchantId) => { merchantCreateBody["merchant_id"] = merchantId; }; export function isoTimeTomorrow() { const now = new Date(); // Create a new date object for tomorrow const tomorrow = new Date(now); tomorrow.setDate(now.getDate() + 1); // Convert to ISO string format const isoStringTomorrow = tomorrow.toISOString(); return isoStringTomorrow; } export function validateEnv(baseUrl, keyIdType) { if (!baseUrl) { throw new Error("Please provide a baseUrl"); } const environment = Object.keys(keyPrefixes).find((env) => baseUrl.includes(env) ); if (!environment) { throw new Error("Unsupported baseUrl"); } const prefix = keyPrefixes[environment][keyIdType]; if (!prefix) { throw new Error(`Unsupported keyIdType: ${keyIdType}`); } return prefix; }
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 volumes: - ../logs:/var/log/router - ../config:/etc/promtail command: -config.file=/etc/promtail/promtail.yaml networks: - loki restart: unless-stopped loki: image: grafana/loki:latest ports: - "3100:3100" command: -config.file=/etc/loki/loki.yaml networks: - loki restart: unless-stopped volumes: - ../config:/etc/loki otel-collector: image: otel/opentelemetry-collector:latest command: --config=/etc/otel-collector.yaml networks: - loki volumes: - ../config/otel-collector.yaml:/etc/otel-collector.yaml ports: - "4317:4317" - "8888:8888" - "8889:8889" restart: unless-stopped prometheus: image: prom/prometheus:latest networks: - loki volumes: - ../config/prometheus.yaml:/etc/prometheus/prometheus.yml ports: - "9090:9090" restart: unless-stopped tempo: image: grafana/tempo:latest command: -config.file=/etc/tempo.yaml volumes: - ../config/tempo.yaml:/etc/tempo.yaml - ./tempo.tmp:/tmp/tempo networks: - loki ports: - "3200" # tempo - "4317" # otlp grpc - "4318" # otlp http restart: unless-stopped grafana: image: grafana/grafana:latest ports: - "3000:3000" networks: - loki restart: unless-stopped volumes: - ../config:/etc/grafana # router-sc: # image: rust:latest # ports: # - "8080:8080" # networks: # - loki # restart: unless-stopped # volumes: # - ../:/router
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: ckh_net: services: promtail: image: grafana/promtail:latest volumes: - ../logs:/var/log/router - ./config:/etc/promtail - /var/run/docker.sock:/var/run/docker.sock command: -config.file=/etc/promtail/promtail.yaml networks: - ckh_net restart: unless-stopped loki: image: grafana/loki:latest ports: - "3100" command: -config.file=/etc/loki/loki.yaml networks: - ckh_net restart: unless-stopped volumes: - ../config:/etc/loki otel-collector: image: lsampras/otelcontribcol:promtail-receiver command: --config=/etc/otel-collector.yaml networks: - ckh_net depends_on: - kafka0 volumes: - ./config:/etc - /var/run/docker.sock:/var/run/docker.sock - ./otel.tmp:/tmp ports: - "4317" - "8888" - "3101" - "8889" - "24224" restart: unless-stopped prometheus: image: prom/prometheus:latest networks: - ckh_net volumes: - ../config/prometheus.yaml:/etc/prometheus/prometheus.yml ports: - "9090:9090" restart: unless-stopped tempo: image: grafana/tempo:latest command: -config.file=/etc/tempo.yaml volumes: - ../config/tempo.yaml:/etc/tempo.yaml - ./tempo.tmp:/tmp/tempo networks: - ckh_net ports: - "3200" # tempo - "4317" # otlp grpc - "4318" # otlp http restart: unless-stopped grafana: image: grafana/grafana:latest ports: - "3000:3000" networks: - ckh_net restart: unless-stopped volumes: - ../config:/etc/grafana kafka0: image: confluentinc/cp-kafka:7.0.5.arm64 hostname: kafka0 container_name: kafka0 networks: - ckh_net ports: - 9092 - 9093 - 9997 - "29092" environment: KAFKA_BROKER_ID: 1 KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092 KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0 KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 KAFKA_PROCESS_ROLES: 'broker,controller' KAFKA_NODE_ID: 1 KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka0:29093' KAFKA_LISTENERS: 'PLAINTEXT://kafka0:29092,CONTROLLER://kafka0:29093,PLAINTEXT_HOST://0.0.0.0:9092' KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER' KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs' JMX_PORT: 9997 KAFKA_JMX_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=kafka0 -Dcom.sun.management.jmxremote.rmi.port=9997 volumes: - ./kafka-script.sh:/tmp/update_run.sh command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'" # Kafka UI for debugging kafka queues kafka-ui: container_name: kafka-ui image: provectuslabs/kafka-ui:latest ports: - 8090:8080 networks: - ckh_net depends_on: - kafka0 environment: KAFKA_CLUSTERS_0_NAME: local KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka0:29092 KAFKA_CLUSTERS_0_JMXPORT: 9997 clickhouse-server: image: clickhouse/clickhouse-server:latest networks: - ckh_net ports: - "9000" - "8123:8123" volumes: - ckh_data:/var/lib/clickhouse ulimits: nofile: soft: 262144 hard: 262144 hyperswitch-server: image: rust:latest command: cargo run -- -f ./config/docker_compose.toml working_dir: /app ports: - "8080:8080" networks: - ckh_net volumes: - ../:/app - cargo_cache:/cargo_cache - cargo_build_cache:/cargo_build_cache environment: - CARGO_TARGET_DIR=/cargo_build_cache - OTEL_EXPORTER_OTLP_ENDPOINT=https://otel-collector:4317 labels: logs: "promtail" depends_on: - otel-collector healthcheck: test: curl --fail http://localhost:8080/health || exit 1 interval: 60s retries: 3 start_period: 20s timeout: 10s pg: image: postgres:14.5 ports: - "5432" networks: - ckh_net volumes: - pg_data:/VAR/LIB/POSTGRESQL/DATA environment: - POSTGRES_USER=db_user - POSTGRES_PASSWORD=db_pass - POSTGRES_DB=hyperswitch_db redis-queue: image: redis:7 command: redis-server /usr/local/etc/redis/redis.conf volumes: - ../config/redis.conf:/usr/local/etc/redis/redis.conf labels: - redis networks: - ckh_net ports: - "6379"
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/docker/ensure # KRaft required step: Format the storage directory with a new cluster ID echo "kafka-storage format --ignore-formatted -t $(kafka-storage random-uuid) -c /etc/kafka/kafka.properties" >> /etc/confluent/docker/ensure
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 every machine that has applications needed to be monitored. [Loki](https://grafana.com/docs/loki/latest/) : is a search engine for logs inspired by Prometheus. [OTEL Collector](https://opentelemetry.io/docs/collector/) : is vendor-agnostic way to receive, process and export telemetry data. [Tempo](https://grafana.com/docs/tempo/latest/) : is a distributed tracing backend. [Grafana](https://grafana.com/docs/grafana/latest/introduction/) : is a query frontend to output data. ## How to run ```bash cd monitoring # start containers docker-compose up -d # FIXME: maybe we can remove manual setups with help of a config or automation? ``` ### Set up logs monitor 1. Go to page of grafana: http://127.0.0.1:3000/ 2. Use login and password "admin" 3. Add Loki data source: http://loki:3100 4. "Save & Exit" should give "Data source connected and labels found." if everything is okay. 5. Go to "Explore" tab and make a query "{job="varlogs"} |= ``". ### Set up logs monitor along with tracing 1. Navigate to [Grafana](http://localhost:3000/) 2. Enter "admin" for both username and password [skip if it asks for updating the password] 3. Add data source (Tempo) 1. select `Tempo` 2. set `URL` to `http://tempo:3200` 3. save 4. Add data source (Loki) 1. select Loki 2. make it default 3. set `URL` to `http://loki:3100` 4. add `Derived fields`- 5. set `Name` to `trace_id` 6. set `Regex` to `trace_id":"(.*?)"(?=,|}|$)` 7. set `URL` to `${__value.raw}` 8. set `URL label` to `Tempo` 9. enable `Internal link` and select `Tempo` 10. save 5. Navigate to [Explore](http://localhost:3000/explore) 6. Add query [example, `job`=`router`] ### Notes: - Use `trace_id` in logs to jump to Tempo view to visualize the tracing. - Searching through recent trace ids is also possible by selecting appropriate `Service Name` in Tempo view under `Search` tab. The UI also provides other filter options. ## Helpful commands `http://127.0.0.1:3100/ready` : To get status of Loki, it should give "Ready". `docker container ls -as` : List running containers. `docker exec -it monitoring_promtail_1 bash` : Look inside of promtail container. `docker-compose down` : Stop containers
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: grpc: exporters: kafka: brokers: - kafka0:29092 encoding: raw protocol_version: 2.0.0 otlp: endpoint: tempo:4317 tls: insecure: true logging: loglevel: debug loki: endpoint: http://loki:3100/loki/api/v1/push prometheus: endpoint: 0.0.0.0:8889 namespace: router const_labels: app_name: router-api processors: attributes/log_stream: actions: - key: loki.attribute.labels action: insert value: service,scrape_source,log_stream,container filter/kafka_logs: logs: include: match_type: strict record_attributes: - Key: source Value: stdout service: telemetry: logs: level: debug metrics: level: detailed address: 0.0.0.0:8888 pipelines: logs/ckh: receivers: [promtail] processors: [filter/kafka_logs] exporters: [logging, loki, kafka] logs/loki: receivers: [promtail] processors: [attributes/log_stream] exporters: [logging, loki, kafka] metrics: receivers: [otlp] exporters: [prometheus] traces: receivers: [otlp] exporters: [otlp]
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/router/**/*.log* pipeline_stages: - labeldrop: # Dropping filename since it causes extra labels (leading to unnecessary loki indexes) - filename - job_name: router_console_logs docker_sd_configs: - host: "unix:///var/run/docker.sock" refresh_interval: 10s filters: - name: label values: ["logs=promtail"] relabel_configs: - source_labels: ['__meta_docker_container_name'] regex: '/(.*)' target_label: 'container' - source_labels: ['__meta_docker_container_log_stream'] target_label: 'log_stream' pipeline_stages: - json: expressions: log_type: - labels: log_type: - static_labels: scrape_source: console
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 (InvalidateBucketResponse); } // API-1 types message EliminationRequest { string id = 1; string params = 2; repeated string labels = 3; EliminationBucketConfig config = 4; } message EliminationBucketConfig { uint64 bucket_size = 1; uint64 bucket_leak_interval_in_secs = 2; } message EliminationResponse { repeated LabelWithStatus labels_with_status = 1; } message LabelWithStatus { string label = 1; EliminationInformation elimination_information = 2; } message EliminationInformation { BucketInformation entity = 1; BucketInformation global = 2; } message BucketInformation { bool is_eliminated = 1; repeated string bucket_name = 2; } // API-2 types message UpdateEliminationBucketRequest { string id = 1; string params = 2; repeated LabelWithBucketName labels_with_bucket_name = 3; EliminationBucketConfig config = 4; } message LabelWithBucketName { string label = 1; string bucket_name = 2; } message UpdateEliminationBucketResponse { enum UpdationStatus { BUCKET_UPDATION_SUCCEEDED = 0; BUCKET_UPDATION_FAILED = 1; } UpdationStatus status = 1; } // API-3 types message InvalidateBucketRequest { string id = 1; } message InvalidateBucketResponse { enum InvalidationStatus { BUCKET_INVALIDATION_SUCCEEDED = 0; BUCKET_INVALIDATION_FAILED = 1; } InvalidationStatus status = 1; }
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) returns (InvalidateWindowsResponse); rpc FetchEntityAndGlobalSuccessRate (CalGlobalSuccessRateRequest) returns (CalGlobalSuccessRateResponse); } // API-1 types message CalSuccessRateRequest { string id = 1; string params = 2; repeated string labels = 3; CalSuccessRateConfig config = 4; } message CalSuccessRateConfig { uint32 min_aggregates_size = 1; double default_success_rate = 2; optional SuccessRateSpecificityLevel specificity_level = 3; } enum SuccessRateSpecificityLevel { ENTITY = 0; GLOBAL = 1; } message CalSuccessRateResponse { repeated LabelWithScore labels_with_score = 1; } message LabelWithScore { double score = 1; string label = 2; } // API-2 types message UpdateSuccessRateWindowRequest { string id = 1; string params = 2; repeated LabelWithStatus labels_with_status = 3; UpdateSuccessRateWindowConfig config = 4; repeated LabelWithStatus global_labels_with_status = 5; } message LabelWithStatus { string label = 1; bool status = 2; } message UpdateSuccessRateWindowConfig { uint32 max_aggregates_size = 1; CurrentBlockThreshold current_block_threshold = 2; } message CurrentBlockThreshold { optional uint64 duration_in_mins = 1; uint64 max_total_count = 2; } message UpdateSuccessRateWindowResponse { enum UpdationStatus { WINDOW_UPDATION_SUCCEEDED = 0; WINDOW_UPDATION_FAILED = 1; } UpdationStatus status = 1; } // API-3 types message InvalidateWindowsRequest { string id = 1; } message InvalidateWindowsResponse { enum InvalidationStatus { WINDOW_INVALIDATION_SUCCEEDED = 0; WINDOW_INVALIDATION_FAILED = 1; } InvalidationStatus status = 1; } // API-4 types message CalGlobalSuccessRateRequest { string entity_id = 1; string entity_params = 2; repeated string entity_labels = 3; repeated string global_labels = 4; CalGlobalSuccessRateConfig config = 5; } message CalGlobalSuccessRateConfig { uint32 entity_min_aggregates_size = 1; double entity_default_success_rate = 2; } message CalGlobalSuccessRateResponse { repeated LabelWithScore entity_scores_with_labels = 1; repeated LabelWithScore global_scores_with_labels = 2; }
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 (InvalidateContractResponse); } // API-1 types message CalContractScoreRequest { string id = 1; string params = 2; repeated string labels = 3; CalContractScoreConfig config = 4; } message CalContractScoreConfig { repeated double constants = 1; TimeScale time_scale = 2; } message TimeScale { enum Scale { Day = 0; Month = 1; } Scale time_scale = 1; } message CalContractScoreResponse { repeated ScoreData labels_with_score = 1; } message ScoreData { double score = 1; string label = 2; uint64 current_count = 3; } // API-2 types message UpdateContractRequest { string id = 1; string params = 2; repeated LabelInformation labels_information = 3; } message LabelInformation { string label = 1; uint64 target_count = 2; uint64 target_time = 3; uint64 current_count = 4; } message UpdateContractResponse { enum UpdationStatus { CONTRACT_UPDATION_SUCCEEDED = 0; CONTRACT_UPDATION_FAILED = 1; } UpdationStatus status = 1; } // API-3 types message InvalidateContractRequest { string id = 1; } message InvalidateContractResponse { enum InvalidationStatus { CONTRACT_INVALIDATION_SUCCEEDED = 0; CONTRACT_INVALIDATION_FAILED = 1; } InvalidationStatus status = 1; }
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 { rpc Check(HealthCheckRequest) returns (HealthCheckResponse); }
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/**/*'", "cypress:payouts": "cypress run --headless --spec 'cypress/e2e/spec/Payout/**/*'", "cypress:payment-method-list": "cypress run --headless --spec 'cypress/e2e/spec/PaymentMethodList/**/*'", "cypress:routing": "cypress run --headless --spec 'cypress/e2e/spec/Routing/**/*'" }, "author": "Hyperswitch Team", "license": "ISC", "devDependencies": { "@types/fs-extra": "^11.0.4", "cypress": "^13.16.0", "cypress-mochawesome-reporter": "^3.8.2", "jsqr": "^1.4.0", "prettier": "^3.3.2", "nanoid": "^5.0.8" } }
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 = defineConfig({ e2e: { setupNodeEvents(on, config) { require("cypress-mochawesome-reporter/plugin")(on); on("task", { setGlobalState: (val) => { return (globalState = val || {}); }, getGlobalState: () => { return globalState || {}; }, cli_log: (message) => { console.log("Logging console message from task"); console.log(message); return null; }, }); on("after:screenshot", async (details) => { // Full path to the screenshot file const screenshotPath = details.path; // Extract filename without extension const name = path.basename( screenshotPath, path.extname(screenshotPath) ); // Define a new name with a connectorId const newName = `[${connectorId}] ${name}.png`; const newPath = path.join(path.dirname(screenshotPath), newName); try { await fs.rename(screenshotPath, newPath); console.log("Screenshot renamed successfully"); return { path: newPath }; } catch (err) { console.error("Failed to rename screenshot:", err); } }); }, experimentalRunAllSpecs: true, reporter: "cypress-mochawesome-reporter", reporterOptions: { reportDir: "cypress/reports", reportFilename: reportName, reportPageTitle: `[${connectorId}] Cypress test report`, embeddedScreenshots: true, overwrite: false, inlineAssets: true, saveJson: true, }, }, chromeWebSecurity: false, defaultCommandTimeout: 10000, pageLoadTimeout: 20000, });
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. ## Installation ### Prerequisites Before installing Cypress, ensure you have the following prerequisites installed: - npm (Node Package Manager) - Node.js (18.x and above) ### Run Test Cases on your local To run test cases, follow these steps: 1. Clone the repository and switch to the project directory: ```shell git clone https://github.com/juspay/hyperswitch cd cypress-tests ``` 2. Install Cypress and its dependencies to `cypress-tests` directory by running the following command: ```shell npm install ``` 3. Set environment variables for cypress ```shell export CYPRESS_CONNECTOR="connector_id" export CYPRESS_BASEURL="base_url" export DEBUG=cypress:cli export CYPRESS_ADMINAPIKEY="admin_api_key" export CYPRESS_CONNECTOR_AUTH_FILE_PATH="path/to/creds.json" ``` 4. Run Cypress test cases To run the tests in interactive mode run the following command ```shell npm run cypress ``` To run all the tests in headless mode run the following command ```shell npm run cypress:ci ``` To run payment tests in headless mode run the following command ```shell npm run cypress:payments ``` To run payout tests in headless mode run the following command ```shell npm run cypress:payouts ``` To run routing tests in headless mode run the following command ```shell npm run cypress:routing ``` > [!NOTE] > To learn about how creds file should be structured, refer to the [example.creds.json](#example-credsjson) section below. ## Folder Structure The folder structure of this directory is as follows: ```text . # The root directory for the Cypress tests. ├── .gitignore ├── cypress # Contains Cypress-related files and folders. │ ├── e2e # End-to-end test directory. │ │ ├── ConnectorTest # Directory for test scenarios related to connectors. │ │ │ ├── your_testcase1_files_here.cy.js │ │ │ ├── your_testcase2_files_here.cy.js │ │ │ └── ... │ │ └── ConnectorUtils # Directory for utility functions related to connectors. │ │ ├── connector_detail_files_here.js │ │ └── utils.js │ ├── fixtures # Directory for storing test data API request. │ │ └── your_fixture_files_here.json │ ├── support # Directory for Cypress support files. │ │ ├── commands.js # File containing custom Cypress commands and utilities. │ │ └── e2e.js │ └── utils │ └── utility_files_go_here.js ├── cypress.config.js # Cypress configuration file. ├── cypress.env.json # File is used to store environment-specific configuration values,such as base URLs, which can be accessed within your Cypress tests. ├── package.json # Node.js package file. ├── readme.md # This file └── yarn.lock ``` ## Writing Tests ### Adding Connectors To add a new connector for testing with Hyperswitch, follow these steps: 1.Include the connector details in the `creds.json` file: example: ```json { "stripe": { "auth_type": "HeaderKey", "api_key": "SK_134" } } ``` 2.Add the new connector details to the ConnectorUtils folder (including CardNo and connector-specific information). Refer to Stripe.js file for guidance: ```javascript /cypress-tests/cypress/e2e/ConnectorUtils/Stripe.js ``` Similarly, create a new file named newconnectorname.js and include all the relevant information for that connector. 3.In util.js, import the new connector details. ### Adding Functions Similarly, add any helper functions or utilities in the `command.js` in support folder and import them into your tests as needed. Example: Adding List Mandate function to support `ListMandate` scenario ```javascript Cypress.Commands.add("listMandateCallTest", (globalState) => { const customerId = globalState.get("customerId"); cy.request({ method: "GET", url: `${globalState.get("baseUrl")}/customers/${customerId}/mandates`, headers: { "Content-Type": "application/json", "api-key": globalState.get("apiKey"), }, }).then((response) => { const xRequestId = response.headers["x-request-id"]; if (xRequestId) { cy.task("cli_log", "x-request-id ->> " + xRequestId); } else { cy.task( "cli_log", "x-request-id is not available in the response headers" ); } expect(response.headers["content-type"]).to.include("application/json"); console.log(response.body); let i = 0; for (i in response.body) { if (response.body[i].mandate_id === globalState.get("mandateId")) { expect(response.body[i].status).to.equal("active"); } } }); }); ``` ### Adding Scenarios To add new test scenarios: 1. Navigate to the ConnectorTest directory. 2. Create a new test file or modify existing ones to add your scenarios. 3. Write your test scenarios using Cypress commands. For example, to add a scenario for listing mandates in the `Mandateflows`: ```javascript // cypress/ConnectorTest/CreateSingleuseMandate.js describe("Payment Scenarios", () => { it("should complete a successful payment", () => { // Your test logic here }); }); ``` In this scenario, you can call functions defined in `command.js`. For instance, to test the `listMandateCallTest` function: ```javascript describe("Payment Scenarios", () => { it("list-mandate-call-test", () => { cy.listMandateCallTest(globalState); }); }); ``` You can create similar scenarios by calling other functions defined in `command.js`. These functions interact with utility files like `connector.js` and include necessary assertions to support various connector scenarios. ## Additional Resources For more information on using Cypress and writing effective tests, refer to the official Cypress documentation: [Cypress Documentation](https://docs.cypress.io/) ## Example creds.json ```json { "adyen": { "auth_type": "SignatureKey", "api_key": "api_key", "key1": "key1", "api_secret": "api_secret" }, "bankofamerica": { "auth_type": "SignatureKey", "api_key": "api_key", "key1": "key1", "api_secret": "api_secret" }, "bluesnap": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "cybersource": { "auth_type": "SignatureKey", "api_key": "api_key", "key1": "key1", "api_secret": "api_secret" }, "nmi": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "paypal": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "stripe": { "auth_type": "HeaderKey", "api_key": "api_key" }, "trustpay": { "auth_type": "SignatureKey", "api_key": "api_key", "key1": "key1", "api_secret": "api_secret" } } ```
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-reporter": "^3.8.2", "jsqr": "^1.4.0", "nanoid": "^5.0.8", "prettier": "^3.3.2" } }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", "dev": true, "license": "MIT", "optional": true, "engines": { "node": ">=0.1.90" } }, "node_modules/@cypress/request": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.7.tgz", "integrity": "sha512-LzxlLEMbBOPYB85uXrDqvD4MgcenjRBLIns3zyhx7vTPj/0u2eQhzXvPiGcaJrV38Q9dbkExWp6cOHPJ+EtFYg==", "dev": true, "license": "Apache-2.0", "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", "caseless": "~0.12.0", "combined-stream": "~1.0.6", "extend": "~3.0.2", "forever-agent": "~0.6.1", "form-data": "~4.0.0", "http-signature": "~1.4.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", "mime-types": "~2.1.19", "performance-now": "^2.1.0", "qs": "6.13.1", "safe-buffer": "^5.1.2", "tough-cookie": "^5.0.0", "tunnel-agent": "^0.6.0", "uuid": "^8.3.2" }, "engines": { "node": ">= 6" } }, "node_modules/@cypress/xvfb": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@cypress/xvfb/-/xvfb-1.2.4.tgz", "integrity": "sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q==", "dev": true, "license": "MIT", "dependencies": { "debug": "^3.1.0", "lodash.once": "^4.1.1" } }, "node_modules/@cypress/xvfb/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.1" } }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", "strip-ansi": "^7.0.1", "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", "wrap-ansi": "^8.1.0", "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/ansi-styles": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT", "peer": true }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "ansi-regex": "^6.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", "optional": true, "peer": true, "engines": { "node": ">=14" } }, "node_modules/@types/fs-extra": { "version": "11.0.4", "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "license": "MIT", "dependencies": { "@types/jsonfile": "*", "@types/node": "*" } }, "node_modules/@types/jsonfile": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@types/node": { "version": "22.10.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz", "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==", "dev": true, "license": "MIT", "dependencies": { "undici-types": "~6.20.0" } }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz", "integrity": "sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g==", "dev": true, "license": "MIT" }, "node_modules/@types/sizzle": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.9.tgz", "integrity": "sha512-xzLEyKB50yqCUPUJkIsrVvoWNfFUbIZI+RspLWt8u+tIW/BetMBZtgV2LY/2o+tYH8dRvQ+eoPf3NdhQCcLE2w==", "dev": true, "license": "MIT" }, "node_modules/@types/yauzl": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" } }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "license": "MIT", "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.21.3" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" }, "engines": { "node": ">= 8" } }, "node_modules/arch": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT" }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, "license": "Python-2.0", "peer": true }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dev": true, "license": "MIT", "dependencies": { "safer-buffer": "~2.1.0" } }, "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true, "license": "MIT", "engines": { "node": ">=0.8" } }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", "dev": true, "license": "MIT" }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true, "license": "MIT" }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, "license": "ISC", "engines": { "node": ">= 4.0.0" } }, "node_modules/aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "dev": true, "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/aws4": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==", "dev": true, "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, "license": "MIT" }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT" }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "tweetnacl": "^0.14.3" } }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/blob-util": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/blob-util/-/blob-util-2.0.2.tgz", "integrity": "sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ==", "dev": true, "license": "Apache-2.0" }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", "dev": true, "license": "MIT" }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true, "license": "ISC", "peer": true }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "node_modules/buffer-crc32": { "version": "0.2.13", "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, "license": "MIT", "engines": { "node": "*" } }, "node_modules/cachedir": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.4.0.tgz", "integrity": "sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/call-bind-apply-helpers": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/call-bound": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true, "license": "Apache-2.0" }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chalk/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/check-more-types": { "version": "2.24.0", "resolved": "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz", "integrity": "sha512-Pj779qHxV2tuapviy1bSZNEL1maXr13bPYpsvSDB68HlYcYuhlDrmGd63i0JHMCLKzc7rUSNIrpdJlhVlNwrxA==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "engines": { "node": ">= 8.10.0" }, "funding": { "url": "https://paulmillr.com/funding/" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/ci-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/sibiraj-s" } ], "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/cli-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", "dev": true, "license": "MIT", "dependencies": { "restore-cursor": "^3.1.0" }, "engines": { "node": ">=8" } }, "node_modules/cli-table3": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.5.tgz", "integrity": "sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==", "dev": true, "license": "MIT", "dependencies": { "string-width": "^4.2.0" }, "engines": { "node": "10.* || >= 12.*" }, "optionalDependencies": { "@colors/colors": "1.5.0" } }, "node_modules/cli-truncate": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", "dev": true, "license": "MIT", "dependencies": { "slice-ansi": "^3.0.0", "string-width": "^4.2.0" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^7.0.0" } }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, "license": "MIT" }, "node_modules/colorette": { "version": "2.0.20", "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true, "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, "engines": { "node": ">= 0.8" } }, "node_modules/commander": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, "license": "MIT", "engines": { "node": ">= 6" } }, "node_modules/common-tags": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", "dev": true, "license": "MIT", "engines": { "node": ">=4.0.0" } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, "license": "MIT" }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", "dev": true, "license": "MIT" }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, "node_modules/cypress": { "version": "13.17.0", "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.17.0.tgz", "integrity": "sha512-5xWkaPurwkIljojFidhw8lFScyxhtiFHl/i/3zov+1Z5CmY4t9tjIdvSXfu82Y3w7wt0uR9KkucbhkVvJZLQSA==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { "@cypress/request": "^3.0.6", "@cypress/xvfb": "^1.2.4", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", "buffer": "^5.7.1", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "ci-info": "^4.0.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", "debug": "^4.3.4", "enquirer": "^2.3.6", "eventemitter2": "6.4.7", "execa": "4.1.0", "executable": "^4.1.1", "extract-zip": "2.0.1", "figures": "^3.2.0", "fs-extra": "^9.1.0", "getos": "^3.2.1", "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.3", "tree-kill": "1.2.2", "untildify": "^4.0.0", "yauzl": "^2.10.0" }, "bin": { "cypress": "bin/cypress" }, "engines": { "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, "node_modules/cypress-mochawesome-reporter": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/cypress-mochawesome-reporter/-/cypress-mochawesome-reporter-3.8.2.tgz", "integrity": "sha512-oJZkNzhNmN9ZD+LmZyFuPb8aWaIijyHyqYh52YOBvR6B6ckfJNCHP3A98a+/nG0H4t46CKTNwo+wNpMa4d2kjA==", "dev": true, "license": "MIT", "dependencies": { "commander": "^10.0.1", "fs-extra": "^10.0.1", "mochawesome": "^7.1.3", "mochawesome-merge": "^4.2.1", "mochawesome-report-generator": "^6.2.0" }, "bin": { "generate-mochawesome-report": "cli.js" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/LironEr" }, "peerDependencies": { "cypress": ">=6.2.0" } }, "node_modules/cypress-mochawesome-reporter/node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "license": "MIT", "engines": { "node": ">=14" } }, "node_modules/cypress-mochawesome-reporter/node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { "node": ">=12" } }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" }, "engines": { "node": ">=0.10" } }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", "dev": true, "license": "MIT", "engines": { "node": "*" } }, "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==", "dev": true, "license": "MIT" }, "node_modules/debug": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/decamelize": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/diff": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" } }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, "license": "MIT", "peer": true }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dev": true, "license": "MIT", "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true, "license": "MIT" }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "license": "MIT", "dependencies": { "once": "^1.4.0" } }, "node_modules/enquirer": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8.6" } }, "node_modules/es-define-property": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-object-atoms": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "dev": true, "license": "MIT" }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "license": "MIT", "engines": { "node": ">=0.8.0" } }, "node_modules/eventemitter2": { "version": "6.4.7", "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.7.tgz", "integrity": "sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg==", "dev": true, "license": "MIT" }, "node_modules/execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "license": "MIT", "dependencies": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", "human-signals": "^1.1.1", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.0", "onetime": "^5.1.0", "signal-exit": "^3.0.2", "strip-final-newline": "^2.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, "node_modules/executable": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/executable/-/executable-4.1.1.tgz", "integrity": "sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg==", "dev": true, "license": "MIT", "dependencies": { "pify": "^2.2.0" }, "engines": { "node": ">=4" } }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true, "license": "MIT" }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", "yauzl": "^2.10.0" }, "bin": { "extract-zip": "cli.js" }, "engines": { "node": ">= 10.17.0" }, "optionalDependencies": { "@types/yauzl": "^2.9.1" } }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true, "engines": [ "node >=0.6.0" ], "license": "MIT" }, "node_modules/fd-slicer": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, "license": "MIT", "dependencies": { "pend": "~1.2.0" } }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", "dev": true, "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, "license": "BSD-3-Clause", "peer": true, "bin": { "flat": "cli.js" } }, "node_modules/foreground-child": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/foreground-child/node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "peer": true, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", "dev": true, "license": "Apache-2.0", "engines": { "node": "*" } }, "node_modules/form-data": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" }, "engines": { "node": ">= 6" } }, "node_modules/fs-extra": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, "license": "MIT", "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { "node": ">=10" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, "license": "ISC" }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "license": "MIT", "optional": true, "os": [ "darwin" ], "peer": true, "engines": { "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, "node_modules/fsu": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/fsu/-/fsu-1.1.1.tgz", "integrity": "sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==", "dev": true, "license": "MIT" }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/get-intrinsic": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "dunder-proto": "^1.0.0", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "license": "MIT", "dependencies": { "pump": "^3.0.0" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/getos": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", "integrity": "sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==", "dev": true, "license": "MIT", "dependencies": { "async": "^3.2.0" } }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0" } }, "node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^3.1.2", "minimatch": "^9.0.4", "minipass": "^7.1.2", "package-json-from-dist": "^1.0.0", "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/glob/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/global-dirs": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", "dev": true, "license": "MIT", "dependencies": { "ini": "2.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true, "license": "ISC" }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true, "license": "MIT", "peer": true, "bin": { "he": "bin/he" } }, "node_modules/http-signature": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", "dev": true, "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^2.0.2", "sshpk": "^1.18.0" }, "engines": { "node": ">=0.10" } }, "node_modules/human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true, "license": "Apache-2.0", "engines": { "node": ">=8.12.0" } }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "BSD-3-Clause" }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true, "license": "ISC" }, "node_modules/ini": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", "dev": true, "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "binary-extensions": "^2.0.0" }, "engines": { "node": ">=8" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-installed-globally": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", "dev": true, "license": "MIT", "dependencies": { "global-dirs": "^3.0.0", "is-path-inside": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=0.12.0" } }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=8" } }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true, "license": "MIT", "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true, "license": "MIT" }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "license": "MIT", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, "license": "ISC" }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true, "license": "MIT" }, "node_modules/jackspeak": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "license": "BlueOak-1.0.0", "peer": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, "funding": { "url": "https://github.com/sponsors/isaacs" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true, "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", "dev": true, "license": "MIT" }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", "dev": true, "license": "(AFL-2.1 OR BSD-3-Clause)" }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", "dev": true, "license": "ISC" }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, "license": "MIT", "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "node_modules/jsprim": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "engines": [ "node >=0.6.0" ], "license": "MIT", "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", "json-schema": "0.4.0", "verror": "1.10.0" } }, "node_modules/jsqr": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==", "dev": true, "license": "Apache-2.0" }, "node_modules/lazy-ass": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", "integrity": "sha512-cc8oEVoctTvsFZ/Oje/kGnHbpWHYBe8IAJe4C0QNc3t8uM/0Y8+erSz/7Y1ALuXTEZTMvxXwO6YbX1ey3ujiZw==", "dev": true, "license": "MIT", "engines": { "node": "> 0.8" } }, "node_modules/listr2": { "version": "3.14.0", "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.14.0.tgz", "integrity": "sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g==", "dev": true, "license": "MIT", "dependencies": { "cli-truncate": "^2.1.0", "colorette": "^2.0.16", "log-update": "^4.0.0", "p-map": "^4.0.0", "rfdc": "^1.3.0", "rxjs": "^7.5.1", "through": "^2.3.8", "wrap-ansi": "^7.0.0" }, "engines": { "node": ">=10.0.0" }, "peerDependencies": { "enquirer": ">= 2.3.0 < 3" }, "peerDependenciesMeta": { "enquirer": { "optional": true } } }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "p-locate": "^5.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true, "license": "MIT" }, "node_modules/lodash.isempty": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", "integrity": "sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==", "dev": true, "license": "MIT" }, "node_modules/lodash.isfunction": { "version": "3.0.9", "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", "dev": true, "license": "MIT" }, "node_modules/lodash.isobject": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", "integrity": "sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA==", "dev": true, "license": "MIT" }, "node_modules/lodash.isstring": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==", "dev": true, "license": "MIT" }, "node_modules/lodash.once": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==", "dev": true, "license": "MIT" }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.0", "cli-cursor": "^3.1.0", "slice-ansi": "^4.0.0", "wrap-ansi": "^6.2.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/log-update/node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/log-update/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=8" } }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, "bin": { "loose-envify": "cli.js" } }, "node_modules/lru-cache": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC", "peer": true }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true, "license": "MIT" }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/minimatch": { "version": "5.1.6", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "license": "ISC", "peer": true, "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { "node": ">=10" } }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "license": "ISC", "peer": true, "engines": { "node": ">=16 || 14 >=14.17" } }, "node_modules/mocha": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.0.1.tgz", "integrity": "sha512-+3GkODfsDG71KSCQhc4IekSW+ItCK/kiez1Z28ksWvYhKXV/syxMlerR/sC7whDp7IyreZ4YxceMLdTs5hQE8A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "ansi-colors": "^4.1.3", "browser-stdout": "^1.3.1", "chokidar": "^3.5.3", "debug": "^4.3.5", "diff": "^5.2.0", "escape-string-regexp": "^4.0.0", "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^5.1.6", "ms": "^2.1.3", "serialize-javascript": "^6.0.2", "strip-json-comments": "^3.1.1", "supports-color": "^8.1.1", "workerpool": "^6.5.1", "yargs": "^16.2.0", "yargs-parser": "^20.2.9", "yargs-unparser": "^2.0.0" }, "bin": { "_mocha": "bin/_mocha", "mocha": "bin/mocha.js" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, "node_modules/mocha/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mochawesome": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/mochawesome/-/mochawesome-7.1.3.tgz", "integrity": "sha512-Vkb3jR5GZ1cXohMQQ73H3cZz7RoxGjjUo0G5hu0jLaW+0FdUxUwg3Cj29bqQdh0rFcnyV06pWmqmi5eBPnEuNQ==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.2", "diff": "^5.0.0", "json-stringify-safe": "^5.0.1", "lodash.isempty": "^4.4.0", "lodash.isfunction": "^3.0.9", "lodash.isobject": "^3.0.2", "lodash.isstring": "^4.0.1", "mochawesome-report-generator": "^6.2.0", "strip-ansi": "^6.0.1", "uuid": "^8.3.2" }, "peerDependencies": { "mocha": ">=7" } }, "node_modules/mochawesome-merge": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/mochawesome-merge/-/mochawesome-merge-4.3.0.tgz", "integrity": "sha512-1roR6g+VUlfdaRmL8dCiVpKiaUhbPVm1ZQYUM6zHX46mWk+tpsKVZR6ba98k2zc8nlPvYd71yn5gyH970pKBSw==", "dev": true, "license": "MIT", "dependencies": { "fs-extra": "^7.0.1", "glob": "^7.1.6", "yargs": "^15.3.1" }, "bin": { "mochawesome-merge": "bin/mochawesome-merge.js" }, "engines": { "node": ">=10.0.0" } }, "node_modules/mochawesome-merge/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/mochawesome-merge/node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/mochawesome-merge/node_modules/cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "node_modules/mochawesome-merge/node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/mochawesome-merge/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "license": "MIT", "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/mochawesome-merge/node_modules/fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", "universalify": "^0.1.0" }, "engines": { "node": ">=6 <7 || >=8" } }, "node_modules/mochawesome-merge/node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/mochawesome-merge/node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, "license": "MIT", "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "node_modules/mochawesome-merge/node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "license": "MIT", "dependencies": { "p-locate": "^4.1.0" }, "engines": { "node": ">=8" } }, "node_modules/mochawesome-merge/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/mochawesome-merge/node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "license": "MIT", "dependencies": { "p-try": "^2.0.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mochawesome-merge/node_modules/p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "license": "MIT", "dependencies": { "p-limit": "^2.2.0" }, "engines": { "node": ">=8" } }, "node_modules/mochawesome-merge/node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true, "license": "MIT", "engines": { "node": ">= 4.0.0" } }, "node_modules/mochawesome-merge/node_modules/wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=8" } }, "node_modules/mochawesome-merge/node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true, "license": "ISC" }, "node_modules/mochawesome-merge/node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "license": "MIT", "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" }, "engines": { "node": ">=8" } }, "node_modules/mochawesome-merge/node_modules/yargs-parser": { "version": "18.1.3", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "license": "ISC", "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" }, "engines": { "node": ">=6" } }, "node_modules/mochawesome-report-generator": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/mochawesome-report-generator/-/mochawesome-report-generator-6.2.0.tgz", "integrity": "sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==", "dev": true, "license": "MIT", "dependencies": { "chalk": "^4.1.2", "dateformat": "^4.5.1", "escape-html": "^1.0.3", "fs-extra": "^10.0.0", "fsu": "^1.1.1", "lodash.isfunction": "^3.0.9", "opener": "^1.5.2", "prop-types": "^15.7.2", "tcomb": "^3.2.17", "tcomb-validation": "^3.3.0", "validator": "^13.6.0", "yargs": "^17.2.1" }, "bin": { "marge": "bin/cli.js" } }, "node_modules/mochawesome-report-generator/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" }, "engines": { "node": ">=12" } }, "node_modules/mochawesome-report-generator/node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { "node": ">=12" } }, "node_modules/mochawesome-report-generator/node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/mochawesome-report-generator/node_modules/yargs-parser": { "version": "21.1.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "license": "ISC", "engines": { "node": ">=12" } }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, "node_modules/nanoid": { "version": "5.0.9", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.9.tgz", "integrity": "sha512-Aooyr6MXU6HpvvWXKoVoXwKMs/KyVakWwg7xQfv5/S/RIgJMy0Ifa45H9qqYy7pTCszrHzP21Uk4PZq2HpEM8Q==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "bin": { "nanoid": "bin/nanoid.js" }, "engines": { "node": "^18 || >=20" } }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { "version": "1.13.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/onetime": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "license": "MIT", "dependencies": { "mimic-fn": "^2.1.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/opener": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true, "license": "(WTFPL OR MIT)", "bin": { "opener": "bin/opener-bin.js" } }, "node_modules/ospath": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz", "integrity": "sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA==", "dev": true, "license": "MIT" }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "p-limit": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-map": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "license": "MIT", "dependencies": { "aggregate-error": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/package-json-from-dist": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", "dev": true, "license": "BlueOak-1.0.0", "peer": true }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "license": "BlueOak-1.0.0", "peer": true, "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", "dev": true, "license": "MIT" }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", "dev": true, "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/prettier": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true, "license": "MIT", "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.6.0" } }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", "dev": true, "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.13.1" } }, "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", "integrity": "sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==", "dev": true, "license": "MIT" }, "node_modules/pump": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "node_modules/qs": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "safe-buffer": "^5.1.0" } }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true, "license": "MIT" }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "picomatch": "^2.2.1" }, "engines": { "node": ">=8.10.0" } }, "node_modules/request-progress": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz", "integrity": "sha512-MnWzEHHaxHO2iWiQuHrUPBi/1WeBf5PkxQqNyNvLl9VAYSdXkP8tQ3pBSeCPD+yw0v0Aq1zosWLz0BdeXpWwZg==", "dev": true, "license": "MIT", "dependencies": { "throttleit": "^1.0.0" } }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true, "license": "ISC" }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", "dev": true, "license": "MIT", "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" }, "engines": { "node": ">=8" } }, "node_modules/rfdc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true, "license": "MIT" }, "node_modules/rxjs": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "license": "MIT" }, "node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "license": "ISC", "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/serialize-javascript": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "license": "BSD-3-Clause", "peer": true, "dependencies": { "randombytes": "^2.1.0" } }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true, "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3", "side-channel-list": "^1.0.0", "side-channel-map": "^1.0.1", "side-channel-weakmap": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel-list": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "object-inspect": "^1.13.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel-map": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel-weakmap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.5", "object-inspect": "^1.13.3", "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true, "license": "ISC" }, "node_modules/slice-ansi": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/sshpk": { "version": "1.18.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "license": "MIT", "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", "bcrypt-pbkdf": "^1.0.0", "dashdash": "^1.12.0", "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, "bin": { "sshpk-conv": "bin/sshpk-conv", "sshpk-sign": "bin/sshpk-sign", "sshpk-verify": "bin/sshpk-verify" }, "engines": { "node": ">=0.10.0" } }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/string-width-cjs": { "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi-cjs": { "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/tcomb": { "version": "3.2.29", "resolved": "https://registry.npmjs.org/tcomb/-/tcomb-3.2.29.tgz", "integrity": "sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==", "dev": true, "license": "MIT" }, "node_modules/tcomb-validation": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/tcomb-validation/-/tcomb-validation-3.4.1.tgz", "integrity": "sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==", "dev": true, "license": "MIT", "dependencies": { "tcomb": "^3.0.0" } }, "node_modules/throttleit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.1.tgz", "integrity": "sha512-vDZpf9Chs9mAdfY046mcPt8fg5QSZr37hEH4TXYBnDF+izxgrbRGUAAaBvIk/fJm9aOFCGFd1EsNg5AZCbnQCQ==", "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true, "license": "MIT" }, "node_modules/tldts": { "version": "6.1.69", "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.69.tgz", "integrity": "sha512-Oh/CqRQ1NXNY7cy9NkTPUauOWiTro0jEYZTioGbOmcQh6EC45oribyIMJp0OJO3677r13tO6SKdWoGZUx2BDFw==", "dev": true, "license": "MIT", "dependencies": { "tldts-core": "^6.1.69" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { "version": "6.1.69", "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.69.tgz", "integrity": "sha512-nygxy9n2PBUFQUtAXAc122gGo+04/j5qr5TGQFZTHafTKYvmARVXt2cA5rgero2/dnXUfkdPtiJoKmrd3T+wdA==", "dev": true, "license": "MIT" }, "node_modules/tmp": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, "license": "MIT", "engines": { "node": ">=14.14" } }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/tough-cookie": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", "dev": true, "license": "BSD-3-Clause", "dependencies": { "tldts": "^6.1.32" }, "engines": { "node": ">=16" } }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true, "license": "MIT", "bin": { "tree-kill": "cli.js" } }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, "engines": { "node": "*" } }, "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true, "license": "Unlicense" }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/undici-types": { "version": "6.20.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, "license": "MIT" }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "license": "MIT", "engines": { "node": ">= 10.0.0" } }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } }, "node_modules/validator": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz", "integrity": "sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==", "dev": true, "license": "MIT", "engines": { "node": ">= 0.10" } }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" ], "license": "MIT", "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", "extsprintf": "^1.2.0" } }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" }, "engines": { "node": ">= 8" } }, "node_modules/which-module": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true, "license": "ISC" }, "node_modules/workerpool": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true, "license": "Apache-2.0", "peer": true }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrap-ansi-cjs": { "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true, "license": "ISC" }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, "license": "ISC", "engines": { "node": ">=10" } }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" }, "engines": { "node": ">=10" } }, "node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "license": "ISC", "peer": true, "engines": { "node": ">=10" } }, "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, "engines": { "node": ">=10" } }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "license": "MIT", "peer": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } } } }
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("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("Organization create call", () => { cy.organizationCreateCall( fixtures.organization_body.org_create, globalState ); }); it("Organization retrieve call", () => { cy.organizationRetrieveCall(globalState); }); it("Organization update call", () => { cy.organizationUpdateCall( fixtures.organization_body.org_update, globalState ); }); }); context("Merchant account APIs", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("Merchant account create call", () => { cy.merchantAccountCreateCall( fixtures.merchant_account_body.ma_create, globalState ); }); it("Merchant account retrieve call", () => { cy.merchantAccountRetrieveCall(globalState); }); it("Merchant account update call", () => { cy.merchantAccountUpdateCall( fixtures.merchant_account_body.ma_update, globalState ); }); it("Second merchant account create call", () => { cy.merchantAccountCreateCall( fixtures.merchant_account_body.ma_create, globalState ); }); it("List merchant accounts call", () => { cy.merchantAccountsListCall(globalState); }); }); context("Business profile APIs", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("Business profile create call", () => { cy.businessProfileCreateCall( fixtures.business_profile_body.bp_create, globalState ); }); it("Business profile retrieve call", () => { cy.businessProfileRetrieveCall(globalState); }); it("Business profile update call", () => { cy.businessProfileUpdateCall( fixtures.business_profile_body.bp_update, globalState ); }); it("Second business profile create call", () => { fixtures.business_profile_body.bp_create.profile_name = "HyperSx2"; cy.businessProfileCreateCall( fixtures.business_profile_body.bp_create, globalState ); }); it("List business profiles", () => { cy.businessProfilesListCall(globalState); }); }); context("Merchant connector account APIs", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("[Payment] Merchant connector account create call", () => { // `globalState` can only be accessed in the `it` block const connector_name = globalState.data.connectorId; cy.mcaCreateCall( `${connector_name}_default`, connector_name, "payment_processor", globalState, fixtures.merchant_connector_account_body.mca_create, payment_methods_enabled ); }); it("[Payment] Merchant connector account retrieve call", () => { cy.mcaRetrieveCall(globalState); }); it("[Payment] Merchant connector account update call", () => { // `globalState` can only be accessed in the `it` block const connector_name = globalState.data.connectorId; cy.mcaUpdateCall( `${connector_name}_default`, connector_name, "payment_processor", globalState, fixtures.merchant_connector_account_body.mca_update, payment_methods_enabled ); }); it("[Payment] Merchant connector accounts list call", () => { cy.mcaListCall(globalState, null); }); }); context("API Key APIs", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("API Key create call", () => { cy.apiKeyCreateCall(fixtures.api_key_body.api_key_create, globalState); }); it("API Key retrieve call", () => { cy.apiKeyRetrieveCall(globalState); }); it("API Key update call", () => { cy.apiKeyUpdateCall(fixtures.api_key_body.api_key_update, globalState); }); it("Second API Key create call", () => { cy.apiKeyCreateCall(fixtures.api_key_body.api_key_create, globalState); }); it("API Keys list call", () => { cy.apiKeysListCall(globalState); }); }); });
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"; import State from "../../../utils/State"; import getConnectorDetails from "../../configs/Payment/Utils"; let globalState; // Below is an example of a test that is skipped just because it is not implemented yet describe("[Payment] [No 3DS] [Payment Method: Card]", () => { context("[Payment] [No 3DS] [Capture: Automatic] [Confirm: True]", () => { let should_continue = true; before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); beforeEach(function () { if (!should_continue) { this.skip(); } }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it.skip("Create payment intent", () => { let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][ "PaymentIntent" ]; let req_data = data["Request"]; let res_data = data["Response"]; cy.paymentIntentCreateCall( fixtures.createPaymentBody, req_data, res_data, "no_three_ds", "automatic", globalState ); }); it.skip("List payment methods", () => { cy.paymentMethodsListCall(globalState); }); it.skip("Confirm payment intent", () => { let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][ "No3DSAutoCapture" ]; let req_data = data["Request"]; let res_data = data["Response"]; cy.paymentIntentConfirmCall( fixtures.confirmBody, req_data, res_data, true, globalState ); }); it.skip("Retrieve payment intent", () => { cy.paymentIntentRetrieveCall(globalState); }); }); context("[Payment] [No 3DS] [Capture: Automatic] [Confirm: False]", () => { let should_continue = true; before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); beforeEach(function () { if (!should_continue) { this.skip(); } }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it.skip("Create Payment Intent", () => { let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][ "PaymentIntent" ]; let req_data = data["Request"]; let res_data = data["Response"]; cy.paymentIntentCreateCall( fixtures.createPaymentBody, req_data, res_data, "no_three_ds", "automatic", globalState ); }); it.skip("Payment Methods", () => { cy.paymentMethodsCallTest(globalState); }); it.skip("Confirm No 3DS", () => { let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][ "No3DSAutoCapture" ]; let req_data = data["Request"]; let res_data = data["Response"]; cy.paymentIntentConfirmCall( fixtures.confirmBody, req_data, res_data, true, globalState ); }); it.skip("Retrieve payment intent", () => { cy.paymentIntentRetrieveCall(globalState); }); }); });
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. describe("Routing core APIs", () => { context("Login", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("User login", () => { cy.userLogin(globalState); cy.terminate2Fa(globalState); cy.userInfo(globalState); }); }); context("Fetch MCA Ids", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("List MCA call", () => { cy.mcaListCall(globalState, "routing"); }); }); context("Routing APIs", () => { before("seed global state", () => { cy.task("getGlobalState").then((state) => { globalState = new State(state); }); }); after("flush global state", () => { cy.task("setGlobalState", globalState.data); }); it("Routing algorithm create call", () => { const adyen_merchant_connector_id = globalState.data.adyenMerchantConnectorId; const bluesnap_merchant_connector_id = globalState.data.bluesnapMerchantConnectorId; const stripe_merchant_connector_id = globalState.data.stripeMerchantConnectorId; // Fetching the advanced config details const advanced_config_details = utils.getServiceDetails("advanced_configs"); // setting the merchant connector ids in the payload // defaultSelection data advanced_config_details[ "data" ].defaultSelection.data[0].merchant_connector_id = adyen_merchant_connector_id; // rules data // rule 1 advanced_config_details[ "data" ].rules[0].connectorSelection.data[0].merchant_connector_id = stripe_merchant_connector_id; advanced_config_details[ "data" ].rules[0].connectorSelection.data[1].merchant_connector_id = bluesnap_merchant_connector_id; // rule 2 advanced_config_details[ "data" ].rules[1].connectorSelection.data[0].merchant_connector_id = adyen_merchant_connector_id; const payload = { name: advanced_config_details["name"], data: advanced_config_details["data"], description: advanced_config_details["description"], }; const type = "advanced"; cy.routingSetupCall(fixtures.routing_create, type, payload, globalState); }); it("Routing algorithm activate call", () => { cy.routingActivateCall(fixtures.routing_activate, globalState); }); it("Routing algorithm activation retrieve call", () => { cy.routingActivationRetrieveCall(globalState); }); it("Routing algorithm deactivate call", () => { cy.routingDeactivateCall(globalState); }); it("Routing algorithm retrieve call", () => { cy.routingRetrieveCall(globalState); }); it("Routing algorithm default fallback update call", () => { //fallback_config_details const payload = utils.getServiceDetails("fallback_configs"); cy.routingDefaultFallbackCall( fixtures.default_fallback_update, payload, globalState ); }); it("Routing algorithm fallback retrieve call", () => { cy.routingFallbackRetrieveCall(globalState); }); }); });
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 successfulThreeDSTestCardDetails = { card_number: "4111111111111111", card_exp_month: "10", card_exp_year: "25", card_holder_name: "morino", card_cvc: "999", }; const singleUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { single_use: { amount: 8000, currency: "USD", }, }, }; const multiUseMandateData = { customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, mandate_type: { multi_use: { amount: 8000, currency: "USD", }, }, }; export const payment_methods_enabled = [ { payment_method: "bank_debit", payment_method_types: [ { payment_method_type: "ach", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "bacs", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "becs", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "sepa", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, ], }, { payment_method: "bank_redirect", payment_method_types: [ { payment_method_type: "blik", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "eps", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "ideal", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "giropay", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "local_bank_redirect", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "przelewy24", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "sofort", payment_experience: null, card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, ], }, { payment_method: "bank_transfer", payment_method_types: [ { payment_method_type: "ach", payment_experience: "redirect_to_url", card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "bacs", payment_experience: "redirect_to_url", card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, { payment_method_type: "pix", minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, { payment_method_type: "sepa", payment_experience: "redirect_to_url", card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, ], }, { payment_method: "card", payment_method_types: [ { payment_method_type: "credit", card_networks: [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay", ], minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, { payment_method_type: "debit", card_networks: [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay", ], minimum_amount: -1, maximum_amount: 68607706, recurring_enabled: false, installment_payment_enabled: true, }, ], }, { payment_method: "card_redirect", payment_method_types: [ { payment_method_type: "card_redirect", payment_experience: "redirect_to_url", card_networks: null, accepted_currencies: null, accepted_countries: null, minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, }, ], }, { payment_method: "real_time_payment", payment_method_types: [ { payment_method_type: "duit_now", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, { payment_method_type: "fps", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, { payment_method_type: "prompt_pay", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, { payment_method_type: "viet_qr", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, ], }, { payment_method: "upi", payment_method_types: [ { payment_method_type: "upi_collect", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, { payment_method_type: "upi_intent", minimum_amount: 1, maximum_amount: 68607706, recurring_enabled: true, installment_payment_enabled: true, payment_experience: "redirect_to_url", }, ], }, ]; export const connectorDetails = { bank_transfer_pm: { PaymentIntent: getCustomExchange({ Request: { currency: "BRL", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), Pix: getCustomExchange({ Request: { payment_method: "bank_transfer", payment_method_type: "pix", payment_method_data: { bank_transfer: { pix: {}, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "BR", first_name: "john", last_name: "doe", }, }, currency: "BRL", }, }), }, bank_redirect_pm: { PaymentIntent: getCustomExchange({ Request: { currency: "EUR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), Ideal: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "ideal", payment_method_data: { bank_redirect: { ideal: { bank_name: "ing", country: "NL", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "NL", first_name: "john", last_name: "doe", }, }, }, }), Giropay: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "giropay", payment_method_data: { bank_redirect: { giropay: { bank_name: "", bank_account_bic: "", bank_account_iban: "", preferred_language: "en", country: "DE", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "john", last_name: "doe", }, }, }, }), Sofort: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "sofort", payment_method_data: { bank_redirect: { sofort: { country: "DE", preferred_language: "en", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "DE", first_name: "john", last_name: "doe", }, }, }, }), Eps: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "eps", payment_method_data: { bank_redirect: { eps: { bank_name: "ing", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "AT", first_name: "john", last_name: "doe", }, }, }, }), Przelewy24: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "przelewy24", payment_method_data: { bank_redirect: { przelewy24: { bank_name: "citi", billing_details: { email: "guest@juspay.in", }, }, }, }, }, }), BlikPaymentIntent: getCustomExchange({ Request: { currency: "PLN", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), Blik: getCustomExchange({ Request: { payment_method: "bank_redirect", payment_method_type: "blik", payment_method_data: { bank_redirect: { blik: { blik_code: "777987", }, }, }, billing: { address: { line1: "1467", line2: "Harrison Street", line3: "Harrison Street", city: "San Fransico", state: "California", zip: "94122", country: "PL", first_name: "john", last_name: "doe", }, }, }, }), }, card_pm: { PaymentIntent: getCustomExchange({ Request: { currency: "USD", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), PaymentIntentOffSession: getCustomExchange({ Request: { currency: "USD", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), "3DSManualCapture": getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, }), "3DSAutoCapture": getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, }), No3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, }), No3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, setup_future_usage: "on_session", }, }), Capture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, }), PartialCapture: getCustomExchange({ Request: {}, }), Void: getCustomExchange({ Request: {}, Response: { status: 200, body: { status: "cancelled", capture_method: "manual", }, }, ResponseCustom: { status: 400, body: { error: { type: "invalid_request", message: "You cannot cancel this payment because it has status succeeded", code: "IR_16", }, }, }, }), Refund: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, ResponseCustom: { status: 400, body: { error: { type: "invalid_request", message: "The refund amount exceeds the amount captured", code: "IR_13", }, }, }, }), PartialRefund: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, }), SyncRefund: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, }), MandateSingleUse3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, }), MandateSingleUse3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, }), MandateSingleUseNo3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, }), MandateSingleUseNo3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, }), MandateMultiUseNo3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, }), MandateMultiUseNo3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, }), MandateMultiUse3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, }), MandateMultiUse3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: multiUseMandateData, }, }), ZeroAuthMandate: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: singleUseMandateData, }, }), SaveCardUseNo3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, }), SaveCardUseNo3DSAutoCaptureOffSession: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", 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", }, }, }, }), SaveCardUseNo3DSManualCaptureOffSession: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, setup_future_usage: "off_session", 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", }, }, }, }), SaveCardConfirmAutoCaptureOffSession: getCustomExchange({ Request: { setup_future_usage: "off_session", }, }), SaveCardConfirmManualCaptureOffSession: getCustomExchange({ Request: { setup_future_usage: "off_session", }, }), SaveCardUseNo3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", setup_future_usage: "on_session", 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", }, }, }, }), PaymentMethodIdMandateNo3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: null, customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, }, }), PaymentMethodIdMandateNo3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", mandate_data: null, customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, }, }), PaymentMethodIdMandate3DSAutoCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, currency: "USD", mandate_data: null, authentication_type: "three_ds", customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, }, }), PaymentMethodIdMandate3DSManualCapture: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulThreeDSTestCardDetails, }, mandate_data: null, authentication_type: "three_ds", customer_acceptance: { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", online: { ip_address: "125.0.0.1", user_agent: "amet irure esse", }, }, }, }), InvalidCardNumber: { Request: { currency: "USD", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "123456", card_exp_month: "10", card_exp_year: "25", card_holder_name: "joseph Doe", card_cvc: "123", }, }, }, Response: { status: 400, body: { error: { error_type: "invalid_request", message: "Json deserialize error: invalid card number length", code: "IR_06" }, }, }, }, InvalidExpiryMonth: { Request: { currency: "USD", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "00", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123", }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Invalid Expiry Month", code: "IR_16", }, }, }, }, InvalidExpiryYear: { Request: { currency: "USD", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123", }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Invalid Expiry Year", code: "IR_16", }, }, }, }, InvalidCardCvv: { Request: { currency: "USD", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123456", }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Invalid card_cvc length", code: "IR_16", }, }, }, }, InvalidCurrency: { Request: { currency: "United", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123456", }, }, }, Response: { status: 400, body: { error: { error_type: "invalid_request", message: "Json deserialize error: unknown variant `United`, expected one of `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`", code: "IR_06" }, }, }, }, InvalidCaptureMethod: { Request: { currency: "USD", capture_method: "auto", payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123456", }, }, }, Response: { status: 400, body: { error: { error_type: "invalid_request", message: "Json deserialize error: unknown variant `auto`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled`", code: "IR_06" }, }, }, }, InvalidPaymentMethod: { Request: { currency: "USD", payment_method: "this_supposed_to_be_a_card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2023", card_holder_name: "joseph Doe", card_cvc: "123456", }, }, }, Response: { status: 400, body: { error: { error_type: "invalid_request", message: "Json deserialize error: unknown variant `this_supposed_to_be_a_card`, expected one of `card`, `card_redirect`, `pay_later`, `wallet`, `bank_redirect`, `bank_transfer`, `crypto`, `bank_debit`, `reward`, `real_time_payment`, `upi`, `voucher`, `gift_card`, `open_banking`, `mobile_payment`", code: "IR_06" }, }, }, }, InvalidAmountToCapture: { Request: { currency: "USD", amount_to_capture: 10000, payment_method: "card", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2026", card_holder_name: "joseph Doe", card_cvc: "123", }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "amount_to_capture contains invalid data. Expected format is amount_to_capture lesser than amount", code: "IR_05", }, }, }, }, MissingRequiredParam: { Request: { currency: "USD", payment_method_type: "debit", setup_future_usage: "on_session", payment_method_data: { card: { card_number: "4242424242424242", card_exp_month: "01", card_exp_year: "2026", card_holder_name: "joseph Doe", card_cvc: "123", }, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "Missing required param: payment_method", code: "IR_04", }, }, }, }, PaymentIntentErrored: { Request: { currency: "USD", }, Response: { status: 422, body: { error: { type: "invalid_request", message: "A payment token or payment method data or ctp service details is required", code: "IR_06", }, }, }, }, CaptureGreaterAmount: { Request: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "amount_to_capture is greater than amount", code: "IR_06", }, }, }, }, CaptureCapturedAmount: getCustomExchange({ Request: { Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "This Payment could not be captured because it has a payment.status of succeeded. The expected state is requires_capture, partially_captured_and_capturable, processing", code: "IR_14", }, }, }, }), ConfirmSuccessfulPayment: getCustomExchange({ Request: { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, }, currency: "USD", customer_acceptance: null, }, Response: { status: 400, body: { error: { type: "invalid_request", message: "You cannot confirm this payment because it has status succeeded", code: "IR_16", }, }, }, }), }, upi_pm: { PaymentIntent: getCustomExchange({ Request: { currency: "INR", }, Response: { status: 200, body: { status: "requires_payment_method", }, }, }), UpiCollect: getCustomExchange({ Request: { payment_method: "upi", payment_method_type: "upi_collect", payment_method_data: { upi: { upi_collect: { vpa_id: "successtest@iata", }, }, }, }, }), UpiIntent: getCustomExchange({ Request: { payment_method: "upi", payment_method_type: "upi_intent", payment_method_data: { upi: { upi_intent: {}, }, }, }, }), }, };
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 = getValueByKey(connectorDetails, connectorId); const fallbackData = getValueByKey(connectorDetails, "commons"); // Merge data, prioritizing connectorData and filling missing data from fallbackData const mergedDetails = mergeConnectorDetails(connectorData, fallbackData); return mergedDetails; } function mergeConnectorDetails(source, fallback) { const merged = {}; // Loop through each key in the source object for (const key in source) { merged[key] = { ...source[key] }; // Copy properties from source // Check if fallback has the same key and properties are missing in source if (fallback[key]) { for (const subKey in fallback[key]) { if (!merged[key][subKey]) { merged[key][subKey] = fallback[key][subKey]; } } } } // Add missing keys from fallback that are not present in source for (const key in fallback) { if (!merged[key]) { merged[key] = fallback[key]; } } return merged; } export function getValueByKey(jsonObject, key) { const data = typeof jsonObject === "string" ? JSON.parse(jsonObject) : jsonObject; if (data && typeof data === "object" && key in data) { return data[key]; } else { return null; } } export const should_continue_further = (res_data) => { if (res_data.trigger_skip !== undefined) { return !res_data.trigger_skip; } if ( res_data.body.error !== undefined || res_data.body.error_code !== undefined || res_data.body.error_message !== undefined ) { return false; } else { return true; } }; export function defaultErrorHandler(response, response_data) { if ( response.status === 400 && response.body.error.message === "Payment method type not supported" ) { // Update the default status from 501 to 400 as `unsupported payment method` error is the next common error after `not implemented` error response_data = updateDefaultStatusCode(); } if (response_data.status === 200) { throw new Error("Expecting valid response but got an error response"); } expect(response.body).to.have.property("error"); if (typeof response.body.error === "object") { for (const key in response_data.body.error) { // Check if the error message is a Json deserialize error let apiResponseContent = response.body.error[key]; let expectedContent = response_data.body.error[key]; if (typeof apiResponseContent === "string" && apiResponseContent.includes("Json deserialize error")) { expect(apiResponseContent).to.include(expectedContent); } else { expect(apiResponseContent).to.equal(expectedContent); } } } }
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("connectorId")); function normalise(input) { const exceptions = { bankofamerica: "Bank of America", cybersource: "Cybersource", paybox: "Paybox", paypal: "Paypal", wellsfargo: "Wellsfargo", fiuu: "Fiuu", // Add more known exceptions here }; if (typeof input !== "string") { const specName = Cypress.spec.name; if (specName.includes("-")) { const parts = specName.split("-"); if (parts.length > 1 && parts[1].includes(".")) { return parts[1].split(".")[0]; } } // Fallback return `${specName}`; } const lowerCaseInput = input.toLowerCase(); return exceptions[lowerCaseInput] || input; } /* `getDefaultExchange` contains the default Request and Response to be considered if none provided. `getCustomExchange` takes in 2 optional fields named as Request and Response. with `getCustomExchange`, if 501 response is expected, there is no need to pass Response as it considers default values. */ // Const to get default PaymentExchange object const getDefaultExchange = () => ({ Request: { currency: "EUR", }, Response: { status: 501, body: { error: { type: "invalid_request", message: `Selected payment method through ${connectorName} is not implemented`, code: "IR_00", }, }, }, }); const getUnsupportedExchange = () => ({ Request: { currency: "EUR", }, Response: { status: 400, body: { error: { type: "invalid_request", message: `Payment method type not supported`, code: "IR_19", }, }, }, }); // Const to get PaymentExchange with overridden properties export const getCustomExchange = (overrides) => { const defaultExchange = getDefaultExchange(); return { ...defaultExchange, Request: { ...defaultExchange.Request, ...(overrides.Request || {}), }, Response: { ...defaultExchange.Response, ...(overrides.Response || {}), }, ...(overrides.ResponseCustom ? { ResponseCustom: overrides.ResponseCustom } : {}), }; }; // Function to update the default status code export const updateDefaultStatusCode = () => { return getUnsupportedExchange().Response; };
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(serviceDetails, serviceId); return data; }; function getValueByKey(jsonObject, key) { const data = typeof jsonObject === "string" ? JSON.parse(jsonObject) : jsonObject; if (data && typeof data === "object" && key in data) { return data[key]; } else { return null; } } export const should_continue_further = (res_data) => { if ( res_data.body.error !== undefined || res_data.body.error_code !== undefined || res_data.body.error_message !== undefined ) { return false; } else { return true; } };
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", merchant_connector_id: "", }, ], }, statements: [ { condition: [ { lhs: "payment_method", comparison: "equal", value: { type: "enum_variant", value: "card", }, metadata: {}, }, ], }, ], }, { name: "rule_2", connectorSelection: { type: "priority", data: [ { connector: "adyen", merchant_connector_id: "", }, ], }, statements: [ { condition: [ { lhs: "payment_method", comparison: "equal", value: { type: "enum_variant", value: "bank_redirect", }, metadata: {}, }, ], }, ], }, ]; export const configs = { name: "Rule Based routing", description: "Advanced configuration (Rule based routing) for core flows.", data: { defaultSelection: { type: "priority", data: data, }, rules: rules, metadata: {}, }, };
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 // automatically serving support files with the // 'supportFile' configuration option. // // You can read more here: // https://on.cypress.io/configuration // *********************************************************** // Import commands.js using ES2015 syntax: import "cypress-mochawesome-reporter/register"; import "./commands"; // Alternatively you can use CommonJS syntax: // require('./commands')
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 (redirection_type) { case "bank_redirect": bankRedirectRedirection( urls.redirection_url, urls.expected_url, connectorId, payment_method_type ); break; case "bank_transfer": bankTransferRedirection( urls.redirection_url, urls.expected_url, connectorId, payment_method_type, handler_metadata.next_action_type ); break; case "three_ds": threeDsRedirection(urls.redirection_url, urls.expected_url, connectorId); break; case "upi": upiRedirection( urls.redirection_url, urls.expected_url, connectorId, payment_method_type ); break; default: throw new Error(`Redirection known: ${redirection_type}`); } } function bankTransferRedirection( redirection_url, expected_url, connectorId, payment_method_type, next_action_type ) { switch (next_action_type) { case "qr_code_url": cy.request(redirection_url.href).then((response) => { switch (connectorId) { case "adyen": switch (payment_method_type) { case "pix": expect(response.status).to.eq(200); fetchAndParseQRCode(redirection_url.href).then((qrCodeData) => { expect(qrCodeData).to.eq("TestQRCodeEMVToken"); }); break; default: verifyReturnUrl(redirection_url, expected_url, true); // expected_redirection can be used here to handle other payment methods } break; default: verifyReturnUrl(redirection_url, expected_url, true); } }); break; case "image_data_url": switch (connectorId) { case "itaubank": switch (payment_method_type) { case "pix": fetchAndParseImageData(redirection_url).then((qrCodeData) => { expect(qrCodeData).to.contains("itau.com.br/pix/qr/v2"); // image data contains the following value }); break; default: verifyReturnUrl(redirection_url, expected_url, true); } break; default: verifyReturnUrl(redirection_url, expected_url, true); } break; default: verifyReturnUrl(redirection_url, expected_url, true); } } function bankRedirectRedirection( redirection_url, expected_url, connectorId, payment_method_type ) { let verifyUrl = false; cy.visit(redirection_url.href); switch (connectorId) { case "adyen": switch (payment_method_type) { case "eps": cy.get("h1").should("contain.text", "Acquirer Simulator"); cy.get('[value="authorised"]').click(); cy.url().should("include", "status=succeeded"); cy.wait(5000); break; case "ideal": cy.get(":nth-child(4) > td > p").should( "contain.text", "Your Payment was Authorised/Refused/Cancelled (It may take up to five minutes to show on the Payment List)" ); cy.get(".btnLink").click(); cy.url().should("include", "status=succeeded"); cy.wait(5000); break; case "giropay": cy.get( ".rds-cookies-overlay__allow-all-cookies-btn > .rds-button" ).click(); cy.wait(5000); cy.get(".normal-3").should( "contain.text", "Bank suchen ‑ mit giropay zahlen." ); cy.get("#bankSearch").type("giropay TestBank{enter}"); cy.get(".normal-2 > div").click(); cy.get('[data-testid="customerIban"]').type("DE48499999601234567890"); cy.get('[data-testid="customerIdentification"]').type("9123456789"); cy.get(":nth-child(3) > .rds-button").click(); cy.get('[data-testid="onlineBankingPin"]').type("1234"); cy.get(".rds-button--primary").click(); cy.get(":nth-child(5) > .rds-radio-input-group__label").click(); cy.get(".rds-button--primary").click(); cy.get('[data-testid="photoTan"]').type("123456"); cy.get(".rds-button--primary").click(); cy.wait(5000); cy.url().should("include", "status=succeeded"); cy.wait(5000); break; case "sofort": cy.get(".modal-overlay.modal-shown.in", { timeout: TIMEOUT }).then( ($modal) => { // If modal is found, handle it if ($modal.length > 0) { cy.get("button.cookie-modal-deny-all.button-tertiary") .should("be.visible") .should("contain", "Reject All") .click({ force: true, multiple: true }); cy.get("div#TopBanks.top-banks-multistep") .should("contain", "Demo Bank") .as("btn") .click(); cy.get("@btn").click(); } else { cy.get("input.phone").type("9123456789"); cy.get("#button.onContinue") .should("contain", "Continue") .click(); } } ); break; case "trustly": break; default: throw new Error( `Unsupported payment method type: ${payment_method_type}` ); } verifyUrl = true; break; case "paypal": switch (payment_method_type) { case "eps": cy.get('button[name="Successful"][value="SUCCEEDED"]').click(); break; case "ideal": cy.get('button[name="Successful"][value="SUCCEEDED"]').click(); break; case "giropay": cy.get('button[name="Successful"][value="SUCCEEDED"]').click(); break; default: throw new Error( `Unsupported payment method type: ${payment_method_type}` ); } verifyUrl = true; break; case "stripe": switch (payment_method_type) { case "eps": cy.get('a[name="success"]').click(); break; case "ideal": cy.get('a[name="success"]').click(); break; case "giropay": cy.get('a[name="success"]').click(); break; case "sofort": cy.get('a[name="success"]').click(); break; case "przelewy24": cy.get('a[name="success"]').click(); break; default: throw new Error( `Unsupported payment method type: ${payment_method_type}` ); } verifyUrl = true; break; case "trustpay": switch (payment_method_type) { case "eps": cy.get("._transactionId__header__iXVd_").should( "contain.text", "Bank suchen ‑ mit eps zahlen." ); cy.get(".BankSearch_searchInput__uX_9l").type( "Allgemeine Sparkasse Oberösterreich Bank AG{enter}" ); cy.get(".BankSearch_searchResultItem__lbcKm").click(); cy.get("._transactionId__primaryButton__nCa0r").click(); cy.get("#loginTitle").should( "contain.text", "eps Online-Überweisung Login" ); cy.get("#user") .should("be.visible") .should("be.enabled") .focus() .type("Verfügernummer"); cy.get("input#submitButton.btn.btn-primary").click(); break; case "ideal": cy.contains("button", "Select your bank").click(); cy.get( 'button[data-testid="bank-item"][id="bank-item-INGBNL2A"]' ).click(); break; case "giropay": cy.get("._transactionId__header__iXVd_").should( "contain.text", "Bank suchen ‑ mit giropay zahlen." ); cy.get(".BankSearch_searchInput__uX_9l").type( "Volksbank Hildesheim{enter}" ); cy.get(".BankSearch_searchIcon__EcVO7").click(); cy.get(".BankSearch_bankWrapper__R5fUK").click(); cy.get("._transactionId__primaryButton__nCa0r").click(); cy.get(".normal-3").should("contain.text", "Kontoauswahl"); break; case "sofort": break; case "trustly": break; default: throw new Error( `Unsupported payment method type: ${payment_method_type}` ); } verifyUrl = false; break; default: throw new Error(`Unsupported connector: ${connectorId}`); } cy.then(() => { verifyReturnUrl(redirection_url, expected_url, verifyUrl); }); } function threeDsRedirection(redirection_url, expected_url, connectorId) { cy.visit(redirection_url.href); if (connectorId === "adyen") { cy.get("iframe") .its("0.contentDocument.body") .within((body) => { cy.get('input[type="password"]').click(); cy.get('input[type="password"]').type("password"); cy.get("#buttonSubmit").click(); }); } else if ( connectorId === "bankofamerica" || connectorId === "cybersource" || connectorId === "wellsfargo" ) { cy.get("iframe", { timeout: TIMEOUT }) .its("0.contentDocument.body") .within((body) => { cy.get('input[type="text"]').click().type("1234"); cy.get('input[value="SUBMIT"]').click(); }); } else if (connectorId === "nmi" || connectorId === "noon") { cy.get("iframe", { timeout: TIMEOUT }) .its("0.contentDocument.body") .within((body) => { cy.get("iframe", { timeout: TIMEOUT }) .its("0.contentDocument.body") .within((body) => { cy.get('form[name="cardholderInput"]', { timeout: TIMEOUT }) .should("exist") .then((form) => { cy.get('input[name="challengeDataEntry"]').click().type("1234"); cy.get('input[value="SUBMIT"]').click(); }); }); }); } else if (connectorId === "stripe") { cy.get("iframe", { timeout: TIMEOUT }) .its("0.contentDocument.body") .within((body) => { cy.get("iframe") .its("0.contentDocument.body") .within((body) => { cy.get("#test-source-authorize-3ds").click(); }); }); } else if (connectorId === "trustpay") { cy.get('form[name="challengeForm"]', { timeout: WAIT_TIME }) .should("exist") .then((form) => { cy.get("#outcomeSelect").select("Approve").should("have.value", "Y"); cy.get('button[type="submit"]').click(); }); } else { // If connectorId is neither of adyen, trustpay, nmi, stripe, bankofamerica or cybersource, wait for 10 seconds cy.wait(WAIT_TIME); } cy.then(() => { verifyReturnUrl(redirection_url, expected_url, true); }); } function upiRedirection( redirection_url, expected_url, connectorId, payment_method_type ) { let verifyUrl = false; if (connectorId === "iatapay") { switch (payment_method_type) { case "upi_collect": cy.visit(redirection_url.href); cy.wait(WAIT_TIME_IATAPAY).then(() => { verifyUrl = true; }); break; case "upi_intent": cy.request(redirection_url.href).then((response) => { expect(response.status).to.eq(200); expect(response.body).to.have.property("iataPaymentId"); expect(response.body).to.have.property("status", "INITIATED"); expect(response.body.qrInfoData).to.be.an("object"); expect(response.body.qrInfoData).to.have.property("qr"); expect(response.body.qrInfoData).to.have.property("qrLink"); }); verifyUrl = false; break; default: throw new Error( `Unsupported payment method type: ${payment_method_type}` ); } } else { // If connectorId is not iatapay, wait for 10 seconds cy.wait(WAIT_TIME); } cy.then(() => { verifyReturnUrl(redirection_url, expected_url, verifyUrl); }); } function verifyReturnUrl(redirection_url, expected_url, forward_flow) { if (forward_flow) { // Handling redirection if (redirection_url.host.endsWith(expected_url.host)) { // No CORS workaround needed cy.window().its("location.origin").should("eq", expected_url.origin); } else { // Workaround for CORS to allow cross-origin iframe cy.origin( expected_url.origin, { args: { expected_url: expected_url.origin } }, ({ expected_url }) => { cy.window().its("location.origin").should("eq", expected_url); } ); } } } async function fetchAndParseQRCode(url) { const response = await fetch(url, { encoding: "binary" }); if (!response.ok) { throw new Error(`Failed to fetch QR code image: ${response.statusText}`); } const blob = await response.blob(); const reader = new FileReader(); return await new Promise((resolve, reject) => { reader.onload = () => { const base64Image = reader.result.split(",")[1]; // Remove data URI prefix const image = new Image(); image.src = base64Image; image.onload = () => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); canvas.width = image.width; canvas.height = image.height; ctx.drawImage(image, 0, 0); const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); const qrCodeData = jsQR( imageData.data, imageData.width, imageData.height ); if (qrCodeData) { resolve(qrCodeData.data); } else { reject(new Error("Failed to decode QR code")); } }; image.onerror = reject; // Handle image loading errors }; reader.readAsDataURL(blob); }); } async function fetchAndParseImageData(url) { return await new Promise((resolve, reject) => { const image = new Image(); image.src = url; image.onload = () => { const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d"); canvas.width = image.width; canvas.height = image.height; ctx.drawImage(image, 0, 0); const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); const qrCodeData = jsQR( imageData.data, imageData.width, imageData.height ); if (qrCodeData) { resolve(qrCodeData.data); } else { reject(new Error("Failed to decode QR code")); } }; image.onerror = reject; // Handle image loading errors }); }
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 // *********************************************** // // // -- This is a parent command -- // Cypress.Commands.add('login', (email, password) => { ... }) // // // -- This is a child command -- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) // // // -- This is a dual command -- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) // // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) // cy.task can only be used in support files (spec files or commands file) import { nanoid } from "nanoid"; import { getValueByKey } from "../e2e/configs/Payment/Utils.js"; import { isoTimeTomorrow, validateEnv } from "../utils/RequestBodyUtils.js"; function logRequestId(xRequestId) { if (xRequestId) { cy.task("cli_log", "x-request-id: " + xRequestId); } else { cy.task("cli_log", "x-request-id is unavailable in the response headers"); } } // Organization API calls Cypress.Commands.add( "organizationCreateCall", (organizationCreateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const url = `${base_url}/v2/organization`; // Update request body organizationCreateBody.organization_name += " " + nanoid(); cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, }, body: organizationCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include("org_") .and.to.be.a("string").and.not.be.empty; globalState.set("organizationId", response.body.id); cy.task("setGlobalState", globalState.data); expect(response.body).to.have.property("metadata").and.to.equal(null); } else { // to be updated throw new Error( `Organization create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("organizationRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const organization_id = globalState.get("organizationId"); const url = `${base_url}/v2/organization/${organization_id}`; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include("org_") .and.to.be.a("string").and.not.be.empty; expect(response.body.organization_name) .to.have.include("Hyperswitch") .and.to.be.a("string").and.not.be.empty; if (organization_id === undefined || organization_id === null) { globalState.set("organizationId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Organization retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add( "organizationUpdateCall", (organizationUpdateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const organization_id = globalState.get("organizationId"); const url = `${base_url}/v2/organization/${organization_id}`; // Update request body organizationUpdateBody.organization_name += " " + nanoid(); cy.request({ method: "PUT", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, }, body: organizationUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include("org_") .and.to.be.a("string").and.not.be.empty; expect(response.body).to.have.property("metadata").and.to.be.a("object") .and.not.be.empty; if (organization_id === undefined || organization_id === null) { globalState.set("organizationId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Organization update call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); // Merchant account API calls Cypress.Commands.add( "merchantAccountCreateCall", (merchantAccountCreateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "publishable_key"; const key_id = validateEnv(base_url, key_id_type); const organization_id = globalState.get("organizationId"); const url = `${base_url}/v2/merchant-accounts`; const merchant_name = merchantAccountCreateBody.merchant_name .replaceAll(" ", "") .toLowerCase(); cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, "X-Organization-Id": organization_id, }, body: merchantAccountCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include(`${merchant_name}_`) .and.to.be.a("string").and.not.be.empty; expect(response.body) .to.have.property(key_id_type) .and.to.include(key_id).and.to.not.be.empty; globalState.set("merchantId", response.body.id); globalState.set("publishableKey", response.body.publishable_key); cy.task("setGlobalState", globalState.data); } else { // to be updated throw new Error( `Merchant create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("merchantAccountRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "publishable_key"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/merchant-accounts/${merchant_id}`; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.have.property("id").and.to.be.a("string").and.not .be.empty; expect(response.body).to.have.property(key_id_type).and.to.include(key_id) .and.to.not.be.empty; if (merchant_id === undefined || merchant_id === null) { globalState.set("merchantId", response.body.id); globalState.set("publishableKey", response.body.publishable_key); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Merchant account retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add( "merchantAccountUpdateCall", (merchantAccountUpdateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "publishable_key"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/merchant-accounts/${merchant_id}`; const merchant_name = merchantAccountUpdateBody.merchant_name; cy.request({ method: "PUT", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, }, body: merchantAccountUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.id).to.equal(merchant_id); expect(response.body) .to.have.property(key_id_type) .and.to.include(key_id).and.to.not.be.empty; expect(response.body.merchant_name).to.equal(merchant_name); if (merchant_id === undefined || merchant_id === null) { globalState.set("merchantId", response.body.id); globalState.set("publishableKey", response.body.publishable_key); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Merchant account update call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); // Business profile API calls Cypress.Commands.add( "businessProfileCreateCall", (businessProfileCreateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/profiles`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: businessProfileCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.id).to.include("pro_").and.to.not.be.empty; expect(response.body.profile_name).to.equal( businessProfileCreateBody.profile_name ); globalState.set("profileId", response.body.id); cy.task("setGlobalState", globalState.data); } else { // to be updated throw new Error( `Business profile create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("businessProfileRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/profiles/${profile_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.id).to.include("pro_").and.to.not.be.empty; if (profile_id === undefined || profile_id === null) { globalState.set("profileId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Business profile retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add( "businessProfileUpdateCall", (businessProfileUpdateBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/profiles/${profile_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "PUT", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: businessProfileUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.id).to.include("pro_").and.to.not.be.empty; expect(response.body.profile_name).to.equal( businessProfileUpdateBody.profile_name ); if (profile_id === undefined || profile_id === null) { globalState.set("profileId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Business profile update call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); // Merchant Connector Account API calls // Payments API calls Cypress.Commands.add( "mcaCreateCall", ( connectorLabel, connectorName, connectorType, globalState, mcaCreateBody, paymentMethodsEnabled ) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/connector-accounts`; const customHeaders = { "x-merchant-id": merchant_id, }; // Update request body mcaCreateBody.profile_id = profile_id; mcaCreateBody.connector_label = connectorLabel; mcaCreateBody.connector_name = connectorName; mcaCreateBody.connector_type = connectorType; mcaCreateBody.payment_methods_enabled = paymentMethodsEnabled; if (connectorName === undefined) { throw new Error( `Connector name is a mandatory field to create merchant connector account but is undefined.` ); } // readFile is used to read the contents of the file and it always returns a promise ([Object Object]) due to its asynchronous nature // it is best to use then() to handle the response within the same block of code cy.readFile(globalState.get("connectorAuthFilePath")).then( (jsonContent) => { const jsonString = JSON.stringify(jsonContent); const key = connectorType === "payment_processor" ? connectorName : `${connectorName}_payout`; const authDetails = getValueByKey(jsonString, key); mcaCreateBody.connector_account_details = authDetails.connector_account_details; if (authDetails && authDetails.metadata) { mcaCreateBody.metadata = { ...mcaCreateBody.metadata, // Preserve existing metadata fields ...authDetails.metadata, // Merge with authDetails.metadata }; } cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: mcaCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.connector_name).to.equal(connectorName); expect(response.body.id).to.include("mca_").and.to.not.be.empty; expect(response.body.status).to.equal("active"); expect(response.body.profile_id).to.equal(profile_id); globalState.set("merchantConnectorId", response.body.id); cy.task("setGlobalState", globalState.data); } else { // to be updated throw new Error( `Merchant connector account create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); } ); Cypress.Commands.add("mcaRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const connector_name = globalState.get("connectorId"); const merchant_connector_id = globalState.get("merchantConnectorId"); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/connector-accounts/${merchant_connector_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.connector_name).to.equal(connector_name); expect(response.body.id).to.include("mca_").and.to.not.be.empty; expect(response.body.status).to.equal("active"); if ( merchant_connector_id === undefined || merchant_connector_id === null ) { globalState.set("merchantConnectorId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Merchant connector account retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add( "mcaUpdateCall", ( connectorLabel, connectorName, connectorType, globalState, mcaUpdateBody, paymentMethodsEnabled ) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const merchant_connector_id = globalState.get("merchantConnectorId"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/connector-accounts/${merchant_connector_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; // Update request body mcaUpdateBody.merchant_id = merchant_id; mcaUpdateBody.connector_label = connectorLabel; mcaUpdateBody.connector_type = connectorType; mcaUpdateBody.payment_methods_enabled = paymentMethodsEnabled; cy.request({ method: "PUT", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: mcaUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.connector_name).to.equal(connectorName); expect(response.body.id).to.include("mca_").and.to.not.be.empty; expect(response.body.status).to.equal("active"); expect(response.body.profile_id).to.equal(profile_id); expect( response.body.connector_webhook_details.merchant_secret ).to.equal(mcaUpdateBody.connector_webhook_details.merchant_secret); if ( merchant_connector_id === undefined || merchant_connector_id === null ) { globalState.set("merchantConnectorId", response.body.id); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `Merchant connector account update call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); // API Key API calls Cypress.Commands.add("apiKeyCreateCall", (apiKeyCreateBody, globalState) => { // Define the necessary variables and constant const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); // We do not want to keep API Key forever, // so we set the expiry to tomorrow as new merchant accounts are created with every run const expiry = isoTimeTomorrow(); const key_id_type = "key_id"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/api-keys`; const customHeaders = { "x-merchant-id": merchant_id, }; // Update request body apiKeyCreateBody.expiration = expiry; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: apiKeyCreateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.description).to.equal(apiKeyCreateBody.description); // API Key assertions are intentionally excluded to avoid being exposed in the logs expect(response.body).to.have.property(key_id_type).and.to.include(key_id) .and.to.not.be.empty; globalState.set("apiKeyId", response.body.key_id); globalState.set("apiKey", response.body.api_key); cy.task("setGlobalState", globalState.data); } else { // to be updated throw new Error( `API Key create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("apiKeyRetrieveCall", (globalState) => { // Define the necessary variables and constant const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "key_id"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const api_key_id = globalState.get("apiKeyId"); const url = `${base_url}/v2/api-keys/${api_key_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); // API Key assertions are intentionally excluded to avoid being exposed in the logs expect(response.body).to.have.property(key_id_type).and.to.include(key_id) .and.to.not.be.empty; if (api_key === undefined || api_key === null) { globalState.set("apiKey", response.body.api_key); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `API Key retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("apiKeyUpdateCall", (apiKeyUpdateBody, globalState) => { // Define the necessary variables and constant const api_key = globalState.get("adminApiKey"); const api_key_id = globalState.get("apiKeyId"); const base_url = globalState.get("baseUrl"); // We do not want to keep API Key forever, // so we set the expiry to tomorrow as new merchant accounts are created with every run const expiry = isoTimeTomorrow(); const key_id_type = "key_id"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/api-keys/${api_key_id}`; const customHeaders = { "x-merchant-id": merchant_id, }; // Update request body apiKeyUpdateBody.expiration = expiry; cy.request({ method: "PUT", url: url, headers: { "Content-Type": "application/json", "api-key": api_key, ...customHeaders, }, body: apiKeyUpdateBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body.merchant_id).to.equal(merchant_id); expect(response.body.description).to.equal(apiKeyUpdateBody.description); // API Key assertions are intentionally excluded to avoid being exposed in the logs expect(response.body).to.have.property(key_id_type).and.to.include(key_id) .and.to.not.be.empty; if (api_key === undefined || api_key === null) { globalState.set("apiKey", response.body.api_key); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `API Key update call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); // Routing API calls Cypress.Commands.add( "routingSetupCall", (routingSetupBody, type, payload, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/routing-algorithm`; // Update request body routingSetupBody.algorithm.data = payload.data; routingSetupBody.algorithm.type = type; routingSetupBody.description = payload.description; routingSetupBody.name = payload.name; routingSetupBody.profile_id = profile_id; cy.request({ method: "POST", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, body: routingSetupBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.have.property("id").and.to.include("routing_"); expect(response.body).to.have.property("kind").and.to.equal(type); expect(response.body) .to.have.property("profile_id") .and.to.equal(profile_id); globalState.set("routingAlgorithmId", response.body.id); } else { // to be updated throw new Error( `Routing algorithm setup call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add( "routingActivateCall", (routingActivationBody, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const routing_algorithm_id = globalState.get("routingAlgorithmId"); const url = `${base_url}/v2/profiles/${profile_id}/activate-routing-algorithm`; // Update request body routingActivationBody.routing_algorithm_id = routing_algorithm_id; cy.request({ method: "PATCH", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, body: routingActivationBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.have.property("id").and.to.include("routing_"); expect(response.body) .to.have.property("profile_id") .and.to.equal(profile_id); } else { // to be updated throw new Error( `Routing algorithm activation call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("routingActivationRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const query_params = "limit=10"; const routing_algorithm_id = globalState.get("routingAlgorithmId"); const url = `${base_url}/v2/profiles/${profile_id}/routing-algorithm?${query_params}`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.be.an("array").and.to.not.be.empty; for (const key in response.body) { expect(response.body[key]) .to.have.property("id") .and.to.include("routing_"); expect(response.body[key]) .to.have.property("profile_id") .and.to.equal(profile_id); } } else { // to be updated throw new Error( `Routing algorithm activation retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("routingDeactivateCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const routing_algorithm_id = globalState.get("routingAlgorithmId"); const url = `${base_url}/v2/profiles/${profile_id}/deactivate-routing-algorithm`; cy.request({ method: "PATCH", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include("routing_") .and.to.equal(routing_algorithm_id); expect(response.body) .to.have.property("profile_id") .and.to.equal(profile_id); } else { // to be updated throw new Error( `Routing algorithm deactivation call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("routingRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const routing_algorithm_id = globalState.get("routingAlgorithmId"); const url = `${base_url}/v2/routing-algorithm/${routing_algorithm_id}`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body) .to.have.property("id") .and.to.include("routing_") .and.to.equal(routing_algorithm_id); expect(response.body) .to.have.property("profile_id") .and.to.equal(profile_id); expect(response.body).to.have.property("algorithm").and.to.be.a("object") .and.not.be.empty; } else { // to be updated throw new Error( `Routing algorithm activation retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add( "routingDefaultFallbackCall", (routingDefaultFallbackBody, payload, globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const routing_algorithm_id = globalState.get("routingAlgorithmId"); const url = `${base_url}/v2/profiles/${profile_id}/fallback-routing`; // Update request body routingDefaultFallbackBody = payload; cy.request({ method: "PATCH", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, body: routingDefaultFallbackBody, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.deep.equal(routingDefaultFallbackBody); } else { // to be updated throw new Error( `Routing algorithm activation retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("routingFallbackRetrieveCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("userInfoToken"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/profiles/${profile_id}/fallback-routing`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.be.an("array").and.to.not.be.empty; } else { // to be updated throw new Error( `Routing algorithm activation retrieve call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); // User API calls // Below 3 commands should be called in sequence to login a user Cypress.Commands.add("userLogin", (globalState) => { // Define the necessary variables and constant const base_url = globalState.get("baseUrl"); const query_params = `token_only=true`; const signin_body = { email: `${globalState.get("email")}`, password: `${globalState.get("password")}`, }; const url = `${base_url}/user/v2/signin?${query_params}`; cy.request({ method: "POST", url: url, headers: { "Content-Type": "application/json", }, body: signin_body, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { if (response.body.token_type === "totp") { expect(response.body).to.have.property("token").and.to.not.be.empty; globalState.set("totpToken", response.body.token); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `User login call failed to get totp token with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("terminate2Fa", (globalState) => { // Define the necessary variables and constant const base_url = globalState.get("baseUrl"); const query_params = `skip_two_factor_auth=true`; const api_key = globalState.get("totpToken"); const url = `${base_url}/user/2fa/terminate?${query_params}`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { if (response.body.token_type === "user_info") { expect(response.body).to.have.property("token").and.to.not.be.empty; globalState.set("userInfoToken", response.body.token); cy.task("setGlobalState", globalState.data); } } else { // to be updated throw new Error( `2FA terminate call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("userInfo", (globalState) => { // Define the necessary variables and constant const base_url = globalState.get("baseUrl"); const api_key = globalState.get("userInfoToken"); const url = `${base_url}/user`; cy.request({ method: "GET", url: url, headers: { Authorization: `Bearer ${api_key}`, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.have.property("merchant_id").and.to.not.be.empty; expect(response.body).to.have.property("org_id").and.to.not.be.empty; expect(response.body).to.have.property("profile_id").and.to.not.be.empty; globalState.set("merchantId", response.body.merchant_id); globalState.set("organizationId", response.body.org_id); globalState.set("profileId", response.body.profile_id); } else { // to be updated throw new Error( `User login call failed to fetch user info with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); // List API calls Cypress.Commands.add("merchantAccountsListCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "publishable_key"; const key_id = validateEnv(base_url, key_id_type); const organization_id = globalState.get("organizationId"); const url = `${base_url}/v2/organization/${organization_id}/merchant-accounts`; cy.request({ method: "GET", url: url, headers: { "api-key": api_key, "Content-Type": "application/json", }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.be.an("array").and.to.not.be.empty; for (const key in response.body) { expect(response.body[key]).to.have.property("id").and.to.not.be.empty; expect(response.body[key]) .to.have.property("organization_id") .and.to.equal(organization_id); expect(response.body[key]) .to.have.property(key_id_type) .and.include(key_id).and.to.not.be.empty; expect(response.body[key]).to.have.property("id").and.to.not.be.empty; } } else { // to be updated throw new Error( `Merchant accounts list call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("businessProfilesListCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/merchant-accounts/${merchant_id}/profiles`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "api-key": api_key, "Content-Type": "application/json", ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { expect(response.body).to.be.an("array").and.to.not.be.empty; for (const key in response.body) { expect(response.body[key]).to.have.property("id").and.to.not.be.empty; expect(response.body[key]) .to.have.property("merchant_id") .and.to.equal(merchant_id); expect(response.body[key]).to.have.property("payment_response_hash_key") .and.to.not.be.empty; } } else { // to be updated throw new Error( `Business profiles list call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("mcaListCall", (globalState, service_type) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const merchant_id = globalState.get("merchantId"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/profiles/${profile_id}/connector-accounts`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "api-key": api_key, "Content-Type": "application/json", ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { // TODO: Update List MCA such that it should handle cases for both routing as well normal calls // TODO: Present implementation looks a bit hacky if (service_type === "routing") { if (response.body[0].connector_name === "stripe") globalState.set("stripeMerchantConnectorId", response.body[0].id); if (response.body[1].connector_name === "adyen") globalState.set("adyenMerchantConnectorId", response.body[1].id); if (response.body[2].connector_name === "bluesnap") globalState.set("bluesnapMerchantConnectorId", response.body[2].id); } else { expect(response.body).to.be.an("array").and.to.not.be.empty; for (const key in response.body) { expect(response.body[key]).to.have.property("connector_name").and.to .not.be.empty; expect(response.body[key]).to.have.property("connector_label").and.to .not.be.empty; expect(response.body[key]).to.have.property("id").and.to.not.be.empty; expect(response.body[key]) .to.have.property("payment_methods_enabled") .and.to.be.an("array").and.to.not.be.empty; expect(response.body[key]) .to.have.property("profile_id") .and.to.equal(profile_id); expect(response.body[key]) .to.have.property("status") .and.to.equal("active"); } } } else { // to be updated throw new Error( `Merchant connector account list call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); Cypress.Commands.add("apiKeysListCall", (globalState) => { // Define the necessary variables and constants const api_key = globalState.get("adminApiKey"); const base_url = globalState.get("baseUrl"); const key_id_type = "key_id"; const key_id = validateEnv(base_url, key_id_type); const merchant_id = globalState.get("merchantId"); const url = `${base_url}/v2/api-keys/list`; const customHeaders = { "x-merchant-id": merchant_id, }; cy.request({ method: "GET", url: url, headers: { "api-key": api_key, "Content-Type": "application/json", ...customHeaders, }, failOnStatusCode: false, }).then((response) => { logRequestId(response.headers["x-request-id"]); if (response.status === 200) { // This end point does not work expect(response.body).to.be.an("array").and.to.not.be.empty; for (const key in response.body) { expect(response.body[key]) .to.have.property(key_id_type) .and.to.include(key_id).and.to.not.be.empty; expect(response.body[key]) .to.have.property("merchant_id") .and.to.equal(merchant_id).and.to.not.be.empty; } } else { // to be updated throw new Error( `API Keys list call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); }); // Payment API calls // Update the below commands while following the conventions // Below is an example of how the payment intent create call should look like (update the below command as per the need) Cypress.Commands.add( "paymentIntentCreateCall", ( globalState, paymentRequestBody, paymentResponseBody /* Add more variables based on the need*/ ) => { // Define the necessary variables and constants at the top // Also construct the URL here const api_key = globalState.get("apiKey"); const base_url = globalState.get("baseUrl"); const profile_id = globalState.get("profileId"); const url = `${base_url}/v2/payments/create-intent`; // Update request body if needed paymentRequestBody = {}; // Pass Custom Headers const customHeaders = { "x-profile-id": profile_id, }; cy.request({ method: "POST", url: url, headers: { "api-key": api_key, "Content-Type": "application/json", ...customHeaders, }, body: paymentRequestBody, failOnStatusCode: false, }).then((response) => { // Logging x-request-id is mandatory logRequestId(response.headers["x-request-id"]); if (response.status === 200) { // Update the assertions based on the need expect(response.body).to.deep.equal(paymentResponseBody); } else if (response.status === 400) { // Add 4xx validations here expect(response.body).to.deep.equal(paymentResponseBody); } else if (response.status === 500) { // Add 5xx validations here expect(response.body).to.deep.equal(paymentResponseBody); } else { // If status code is other than the ones mentioned above, default should be thrown throw new Error( `Payment intent create call failed with status ${response.status} and message: "${response.body.error.message}"` ); } }); } ); Cypress.Commands.add("paymentIntentConfirmCall", (globalState) => {}); Cypress.Commands.add("paymentIntentRetrieveCall", (globalState) => {}); // templates for future use Cypress.Commands.add("", () => { cy.request({}).then((response) => {}); });
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 from "./routing.json"; export { api_key_body, business_profile_body, merchant_account_body, merchant_connector_account_body, organization_body, routing_body, };
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": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "collect_shipping_details_from_wallet_connector_if_required": false, "collect_billing_details_from_wallet_connector_if_required": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": null, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true } }, "bp_update": { "profile_name": "Hyperswitch", "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": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "collect_shipping_details_from_wallet_connector_if_required": false, "collect_billing_details_from_wallet_connector_if_required": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": null, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true } } }
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", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "profile_id": "" }, "mca_update": { "connector_type": "payment_processor", "connector_webhook_details": { "merchant_secret": "m3rch4n7_se(rE7" }, "merchant_id": "" } }
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"] = Cypress.env("HS_PASSWORD"); this.data["connectorAuthFilePath"] = Cypress.env( "CONNECTOR_AUTH_FILE_PATH" ); } set(key, val) { this.data[key] = val; } get(key) { return this.data[key]; } } export default State;
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 date object for tomorrow const tomorrow = new Date(now); tomorrow.setDate(now.getDate() + 1); // Convert to ISO string format const isoStringTomorrow = tomorrow.toISOString(); return isoStringTomorrow; } export function validateEnv(baseUrl, keyIdType) { if (!baseUrl) { throw new Error("Please provide a baseUrl"); } const environment = Object.keys(keyPrefixes).find((env) => baseUrl.includes(env) ); if (!environment) { throw new Error("Unsupported baseUrl"); } const prefix = keyPrefixes[environment][keyIdType]; if (!prefix) { throw new Error(`Unsupported keyIdType: ${keyIdType}`); } return prefix; }
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_request_types::ResponseId, router_response_types::{PaymentsResponseData, RefundsResponseData}, types::{PaymentsAuthorizeRouterData, RefundsRouterData}, }; use hyperswitch_interfaces::errors; use crate::{ types::{RefundsResponseRouterData, ResponseRouterData}, utils::PaymentsAuthorizeRequestData, }; //TODO: Fill the struct with respective fields pub struct {{project-name | downcase | pascal_case}}RouterData<T> { pub amount: StringMinorUnit, // The type of amount that a connector accepts, for example, String, i64, f64, etc. pub router_data: T, } impl<T> From<( StringMinorUnit, T, )> for {{project-name | downcase | pascal_case}}RouterData<T> { fn from( (amount, item): ( StringMinorUnit, T, ), ) -> Self { //Todo : use utils to convert the amount to the type of amount that a connector accepts Self { amount, router_data: item, } } } //TODO: Fill the struct with respective fields #[derive(Default, Debug, Serialize, PartialEq)] pub struct {{project-name | downcase | pascal_case}}PaymentsRequest { amount: StringMinorUnit, card: {{project-name | downcase | pascal_case}}Card } #[derive(Default, Debug, Serialize, Eq, PartialEq)] pub struct {{project-name | downcase | pascal_case}}Card { number: cards::CardNumber, expiry_month: Secret<String>, expiry_year: Secret<String>, cvc: Secret<String>, complete: bool, } impl TryFrom<&{{project-name | downcase | pascal_case}}RouterData<&PaymentsAuthorizeRouterData>> for {{project-name | downcase | pascal_case}}PaymentsRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(item: &{{project-name | downcase | pascal_case}}RouterData<&PaymentsAuthorizeRouterData>) -> Result<Self,Self::Error> { match item.router_data.request.payment_method_data.clone() { PaymentMethodData::Card(req_card) => { let card = {{project-name | downcase | pascal_case}}Card { number: req_card.card_number, expiry_month: req_card.card_exp_month, expiry_year: req_card.card_exp_year, cvc: req_card.card_cvc, complete: item.router_data.request.is_auto_capture()?, }; Ok(Self { amount: item.amount.clone(), card, }) } _ => Err(errors::ConnectorError::NotImplemented("Payment method".to_string()).into()), } } } //TODO: Fill the struct with respective fields // Auth Struct pub struct {{project-name | downcase | pascal_case}}AuthType { pub(super) api_key: Secret<String> } impl TryFrom<&ConnectorAuthType> for {{project-name | downcase | pascal_case}}AuthType { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(auth_type: &ConnectorAuthType) -> Result<Self, Self::Error> { match auth_type { ConnectorAuthType::HeaderKey { api_key } => Ok(Self { api_key: api_key.to_owned(), }), _ => Err(errors::ConnectorError::FailedToObtainAuthType.into()), } } } // PaymentsResponse //TODO: Append the remaining status flags #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "lowercase")] pub enum {{project-name | downcase | pascal_case}}PaymentStatus { Succeeded, Failed, #[default] Processing, } impl From<{{project-name | downcase | pascal_case}}PaymentStatus> for common_enums::AttemptStatus { fn from(item: {{project-name | downcase | pascal_case}}PaymentStatus) -> Self { match item { {{project-name | downcase | pascal_case}}PaymentStatus::Succeeded => Self::Charged, {{project-name | downcase | pascal_case}}PaymentStatus::Failed => Self::Failure, {{project-name | downcase | pascal_case}}PaymentStatus::Processing => Self::Authorizing, } } } //TODO: Fill the struct with respective fields #[derive(Default, Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct {{project-name | downcase | pascal_case}}PaymentsResponse { status: {{project-name | downcase | pascal_case}}PaymentStatus, id: String, } impl<F,T> TryFrom<ResponseRouterData<F, {{project-name | downcase | pascal_case}}PaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(item: ResponseRouterData<F, {{project-name | downcase | pascal_case}}PaymentsResponse, T, PaymentsResponseData>) -> Result<Self,Self::Error> { Ok(Self { status: common_enums::AttemptStatus::from(item.response.status), response: Ok(PaymentsResponseData::TransactionResponse { resource_id: ResponseId::ConnectorTransactionId(item.response.id), redirection_data: Box::new(None), mandate_reference: Box::new(None), connector_metadata: None, network_txn_id: None, connector_response_reference_id: None, incremental_authorization_allowed: None, charges: None, }), ..item.data }) } } //TODO: Fill the struct with respective fields // REFUND : // Type definition for RefundRequest #[derive(Default, Debug, Serialize)] pub struct {{project-name | downcase | pascal_case}}RefundRequest { pub amount: StringMinorUnit } impl<F> TryFrom<&{{project-name | downcase | pascal_case}}RouterData<&RefundsRouterData<F>>> for {{project-name | downcase | pascal_case}}RefundRequest { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(item: &{{project-name | downcase | pascal_case}}RouterData<&RefundsRouterData<F>>) -> Result<Self,Self::Error> { Ok(Self { amount: item.amount.to_owned(), }) } } // Type definition for Refund Response #[allow(dead_code)] #[derive(Debug, Serialize, Default, Deserialize, Clone)] pub enum RefundStatus { Succeeded, Failed, #[default] Processing, } impl From<RefundStatus> for enums::RefundStatus { fn from(item: RefundStatus) -> Self { match item { RefundStatus::Succeeded => Self::Success, RefundStatus::Failed => Self::Failure, RefundStatus::Processing => Self::Pending, //TODO: Review mapping } } } //TODO: Fill the struct with respective fields #[derive(Default, Debug, Clone, Serialize, Deserialize)] pub struct RefundResponse { id: String, status: RefundStatus } impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> { type Error = error_stack::Report<errors::ConnectorError>; fn try_from( item: RefundsResponseRouterData<Execute, RefundResponse>, ) -> Result<Self, Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.id.to_string(), refund_status: enums::RefundStatus::from(item.response.status), }), ..item.data }) } } impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> { type Error = error_stack::Report<errors::ConnectorError>; fn try_from(item: RefundsResponseRouterData<RSync, RefundResponse>) -> Result<Self,Self::Error> { Ok(Self { response: Ok(RefundsResponseData { connector_refund_id: item.response.id.to_string(), refund_status: enums::RefundStatus::from(item.response.status), }), ..item.data }) } } //TODO: Fill the struct with respective fields #[derive(Default, Debug, Serialize, Deserialize, PartialEq)] pub struct {{project-name | downcase | pascal_case}}ErrorResponse { pub status_code: u16, pub code: String, pub message: String, pub reason: Option<String>, }
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 hyperswitch_domain_models::{ router_data::{AccessToken, ConnectorAuthType, ErrorResponse, RouterData}, router_flow_types::{ access_token_auth::AccessTokenAuth, payments::{ Authorize, Capture, PSync, PaymentMethodToken, Session, SetupMandate, Void, }, refunds::{Execute, RSync}, }, router_request_types::{ AccessTokenRequestData, PaymentMethodTokenizationData, PaymentsAuthorizeData, PaymentsCancelData, PaymentsCaptureData, PaymentsSessionData, PaymentsSyncData, RefundsData, SetupMandateRequestData, }, router_response_types::{PaymentsResponseData, RefundsResponseData}, types::{ PaymentsAuthorizeRouterData, PaymentsCaptureRouterData, PaymentsSyncRouterData, RefundSyncRouterData, RefundsRouterData, }, }; use hyperswitch_interfaces::{ api::{self, ConnectorCommon, ConnectorCommonExt, ConnectorIntegration, ConnectorValidation, ConnectorSpecifications}, configs::Connectors, errors, events::connector_api_logs::ConnectorEvent, types::{self, Response}, webhooks, }; use crate::{ constants::headers, types::ResponseRouterData, utils, }; use transformers as {{project-name | downcase}}; #[derive(Clone)] pub struct {{project-name | downcase | pascal_case}} { amount_converter: &'static (dyn AmountConvertor<Output = StringMinorUnit> + Sync) } impl {{project-name | downcase | pascal_case}} { pub fn new() -> &'static Self { &Self { amount_converter: &StringMinorUnitForConnector } } } impl api::Payment for {{project-name | downcase | pascal_case}} {} impl api::PaymentSession for {{project-name | downcase | pascal_case}} {} impl api::ConnectorAccessToken for {{project-name | downcase | pascal_case}} {} impl api::MandateSetup for {{project-name | downcase | pascal_case}} {} impl api::PaymentAuthorize for {{project-name | downcase | pascal_case}} {} impl api::PaymentSync for {{project-name | downcase | pascal_case}} {} impl api::PaymentCapture for {{project-name | downcase | pascal_case}} {} impl api::PaymentVoid for {{project-name | downcase | pascal_case}} {} impl api::Refund for {{project-name | downcase | pascal_case}} {} impl api::RefundExecute for {{project-name | downcase | pascal_case}} {} impl api::RefundSync for {{project-name | downcase | pascal_case}} {} impl api::PaymentToken for {{project-name | downcase | pascal_case}} {} impl ConnectorIntegration< PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} { // Not Implemented (R) } impl<Flow, Request, Response> ConnectorCommonExt<Flow, Request, Response> for {{project-name | downcase | pascal_case}} where Self: ConnectorIntegration<Flow, Request, Response>,{ fn build_headers( &self, req: &RouterData<Flow, Request, Response>, _connectors: &Connectors, ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> { let mut header = vec![( headers::CONTENT_TYPE.to_string(), self.get_content_type().to_string().into(), )]; let mut api_key = self.get_auth_header(&req.connector_auth_type)?; header.append(&mut api_key); Ok(header) } } impl ConnectorCommon for {{project-name | downcase | pascal_case}} { fn id(&self) -> &'static str { "{{project-name | downcase}}" } fn get_currency_unit(&self) -> api::CurrencyUnit { todo!() // TODO! Check connector documentation, on which unit they are processing the currency. // If the connector accepts amount in lower unit ( i.e cents for USD) then return api::CurrencyUnit::Minor, // if connector accepts amount in base unit (i.e dollars for USD) then return api::CurrencyUnit::Base } fn common_get_content_type(&self) -> &'static str { "application/json" } fn base_url<'a>(&self, connectors: &'a Connectors) -> &'a str { connectors.{{project-name}}.base_url.as_ref() } fn get_auth_header(&self, auth_type:&ConnectorAuthType)-> CustomResult<Vec<(String,masking::Maskable<String>)>,errors::ConnectorError> { let auth = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}AuthType::try_from(auth_type) .change_context(errors::ConnectorError::FailedToObtainAuthType)?; Ok(vec![(headers::AUTHORIZATION.to_string(), auth.api_key.expose().into_masked())]) } fn build_error_response( &self, res: Response, event_builder: Option<&mut ConnectorEvent>, ) -> CustomResult<ErrorResponse, errors::ConnectorError> { let response: {{project-name | downcase}}::{{project-name | downcase | pascal_case}}ErrorResponse = res .response .parse_struct("{{project-name | downcase | pascal_case}}ErrorResponse") .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); Ok(ErrorResponse { status_code: res.status_code, code: response.code, message: response.message, reason: response.reason, attempt_status: None, connector_transaction_id: None, }) } } impl ConnectorValidation for {{project-name | downcase | pascal_case}} { //TODO: implement functions when support enabled } impl ConnectorIntegration< Session, PaymentsSessionData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} { //TODO: implement sessions flow } impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for {{project-name | downcase | pascal_case}} { } impl ConnectorIntegration< SetupMandate, SetupMandateRequestData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} { } impl ConnectorIntegration< Authorize, PaymentsAuthorizeData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} { fn get_headers(&self, req: &PaymentsAuthorizeRouterData, connectors: &Connectors,) -> CustomResult<Vec<(String, masking::Maskable<String>)>,errors::ConnectorError> { self.build_headers(req, connectors) } fn get_content_type(&self) -> &'static str { self.common_get_content_type() } fn get_url(&self, _req: &PaymentsAuthorizeRouterData, _connectors: &Connectors,) -> CustomResult<String,errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } fn get_request_body(&self, req: &PaymentsAuthorizeRouterData, _connectors: &Connectors,) -> CustomResult<RequestContent, errors::ConnectorError> { let amount = utils::convert_amount( self.amount_converter, req.request.minor_amount, req.request.currency, )?; let connector_router_data = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}RouterData::from(( amount, req, )); let connector_req = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}PaymentsRequest::try_from(&connector_router_data)?; Ok(RequestContent::Json(Box::new(connector_req))) } fn build_request( &self, req: &PaymentsAuthorizeRouterData, connectors: &Connectors, ) -> CustomResult<Option<Request>, errors::ConnectorError> { Ok(Some( RequestBuilder::new() .method(Method::Post) .url(&types::PaymentsAuthorizeType::get_url( self, req, connectors, )?) .attach_default_headers() .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) .set_body(types::PaymentsAuthorizeType::get_request_body(self, req, connectors)?) .build(), )) } fn handle_response( &self, data: &PaymentsAuthorizeRouterData, event_builder: Option<&mut ConnectorEvent>, res: Response, ) -> CustomResult<PaymentsAuthorizeRouterData,errors::ConnectorError> { let response: {{project-name | downcase}}::{{project-name | downcase | pascal_case}}PaymentsResponse = res.response.parse_struct("{{project-name | downcase | pascal_case}} PaymentsAuthorizeResponse").change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); RouterData::try_from(ResponseRouterData { response, data: data.clone(), http_code: res.status_code, }) } fn get_error_response(&self, res: Response, event_builder: Option<&mut ConnectorEvent>) -> CustomResult<ErrorResponse,errors::ConnectorError> { self.build_error_response(res, event_builder) } } impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for {{project-name | downcase | pascal_case}} { fn get_headers( &self, req: &PaymentsSyncRouterData, connectors: &Connectors, ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> { self.build_headers(req, connectors) } fn get_content_type(&self) -> &'static str { self.common_get_content_type() } fn get_url( &self, _req: &PaymentsSyncRouterData, _connectors: &Connectors, ) -> CustomResult<String, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } fn build_request( &self, req: &PaymentsSyncRouterData, connectors: &Connectors, ) -> CustomResult<Option<Request>, errors::ConnectorError> { Ok(Some( RequestBuilder::new() .method(Method::Get) .url(&types::PaymentsSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?) .build(), )) } fn handle_response( &self, data: &PaymentsSyncRouterData, event_builder: Option<&mut ConnectorEvent>, res: Response, ) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> { let response: {{project-name | downcase}}:: {{project-name | downcase | pascal_case}}PaymentsResponse = res .response .parse_struct("{{project-name | downcase}} PaymentsSyncResponse") .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); RouterData::try_from(ResponseRouterData { response, data: data.clone(), http_code: res.status_code, }) } fn get_error_response( &self, res: Response, event_builder: Option<&mut ConnectorEvent> ) -> CustomResult<ErrorResponse, errors::ConnectorError> { self.build_error_response(res, event_builder) } } impl ConnectorIntegration< Capture, PaymentsCaptureData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} { fn get_headers( &self, req: &PaymentsCaptureRouterData, connectors: &Connectors, ) -> CustomResult<Vec<(String, masking::Maskable<String>)>, errors::ConnectorError> { self.build_headers(req, connectors) } fn get_content_type(&self) -> &'static str { self.common_get_content_type() } fn get_url( &self, _req: &PaymentsCaptureRouterData, _connectors: &Connectors, ) -> CustomResult<String, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } fn get_request_body( &self, _req: &PaymentsCaptureRouterData, _connectors: &Connectors, ) -> CustomResult<RequestContent, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } fn build_request( &self, req: &PaymentsCaptureRouterData, connectors: &Connectors, ) -> CustomResult<Option<Request>, errors::ConnectorError> { Ok(Some( RequestBuilder::new() .method(Method::Post) .url(&types::PaymentsCaptureType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsCaptureType::get_headers( self, req, connectors, )?) .set_body(types::PaymentsCaptureType::get_request_body(self, req, connectors)?) .build(), )) } fn handle_response( &self, data: &PaymentsCaptureRouterData, event_builder: Option<&mut ConnectorEvent>, res: Response, ) -> CustomResult<PaymentsCaptureRouterData, errors::ConnectorError> { let response: {{project-name | downcase }}::{{project-name | downcase | pascal_case}}PaymentsResponse = res .response .parse_struct("{{project-name | downcase | pascal_case}} PaymentsCaptureResponse") .change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); RouterData::try_from(ResponseRouterData { response, data: data.clone(), http_code: res.status_code, }) } fn get_error_response( &self, res: Response, event_builder: Option<&mut ConnectorEvent> ) -> CustomResult<ErrorResponse, errors::ConnectorError> { self.build_error_response(res, event_builder) } } impl ConnectorIntegration< Void, PaymentsCancelData, PaymentsResponseData, > for {{project-name | downcase | pascal_case}} {} impl ConnectorIntegration< Execute, RefundsData, RefundsResponseData, > for {{project-name | downcase | pascal_case}} { fn get_headers(&self, req: &RefundsRouterData<Execute>, connectors: &Connectors,) -> CustomResult<Vec<(String,masking::Maskable<String>)>,errors::ConnectorError> { self.build_headers(req, connectors) } fn get_content_type(&self) -> &'static str { self.common_get_content_type() } fn get_url(&self, _req: &RefundsRouterData<Execute>, _connectors: &Connectors,) -> CustomResult<String,errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } fn get_request_body(&self, req: &RefundsRouterData<Execute>, _connectors: &Connectors,) -> CustomResult<RequestContent, errors::ConnectorError> { let refund_amount = utils::convert_amount( self.amount_converter, req.request.minor_refund_amount, req.request.currency, )?; let connector_router_data = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}RouterData::from(( refund_amount, req, )); let connector_req = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}RefundRequest::try_from(&connector_router_data)?; Ok(RequestContent::Json(Box::new(connector_req))) } fn build_request(&self, req: &RefundsRouterData<Execute>, connectors: &Connectors,) -> CustomResult<Option<Request>,errors::ConnectorError> { let request = RequestBuilder::new() .method(Method::Post) .url(&types::RefundExecuteType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::RefundExecuteType::get_headers(self, req, connectors)?) .set_body(types::RefundExecuteType::get_request_body(self, req, connectors)?) .build(); Ok(Some(request)) } fn handle_response( &self, data: &RefundsRouterData<Execute>, event_builder: Option<&mut ConnectorEvent>, res: Response, ) -> CustomResult<RefundsRouterData<Execute>,errors::ConnectorError> { let response: {{project-name| downcase}}::RefundResponse = res.response.parse_struct("{{project-name | downcase}} RefundResponse").change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); RouterData::try_from(ResponseRouterData { response, data: data.clone(), http_code: res.status_code, }) } fn get_error_response(&self, res: Response, event_builder: Option<&mut ConnectorEvent>) -> CustomResult<ErrorResponse,errors::ConnectorError> { self.build_error_response(res, event_builder) } } impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for {{project-name | downcase | pascal_case}} { fn get_headers(&self, req: &RefundSyncRouterData,connectors: &Connectors,) -> CustomResult<Vec<(String, masking::Maskable<String>)>,errors::ConnectorError> { self.build_headers(req, connectors) } fn get_content_type(&self) -> &'static str { self.common_get_content_type() } fn get_url(&self, _req: &RefundSyncRouterData,_connectors: &Connectors,) -> CustomResult<String,errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } fn build_request( &self, req: &RefundSyncRouterData, connectors: &Connectors, ) -> CustomResult<Option<Request>, errors::ConnectorError> { Ok(Some( RequestBuilder::new() .method(Method::Get) .url(&types::RefundSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::RefundSyncType::get_headers(self, req, connectors)?) .set_body(types::RefundSyncType::get_request_body(self, req, connectors)?) .build(), )) } fn handle_response( &self, data: &RefundSyncRouterData, event_builder: Option<&mut ConnectorEvent>, res: Response, ) -> CustomResult<RefundSyncRouterData,errors::ConnectorError,> { let response: {{project-name | downcase}}::RefundResponse = res.response.parse_struct("{{project-name | downcase}} RefundSyncResponse").change_context(errors::ConnectorError::ResponseDeserializationFailed)?; event_builder.map(|i| i.set_response_body(&response)); router_env::logger::info!(connector_response=?response); RouterData::try_from(ResponseRouterData { response, data: data.clone(), http_code: res.status_code, }) } fn get_error_response(&self, res: Response, event_builder: Option<&mut ConnectorEvent>) -> CustomResult<ErrorResponse,errors::ConnectorError> { self.build_error_response(res, event_builder) } } #[async_trait::async_trait] impl webhooks::IncomingWebhook for {{project-name | downcase | pascal_case}} { fn get_webhook_object_reference_id( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, ) -> CustomResult<api_models::webhooks::ObjectReferenceId, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplemented)) } fn get_webhook_event_type( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, ) -> CustomResult<api_models::webhooks::IncomingWebhookEvent, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplemented)) } fn get_webhook_resource_object( &self, _request: &webhooks::IncomingWebhookRequestDetails<'_>, ) -> CustomResult<Box<dyn masking::ErasedMaskSerialize>, errors::ConnectorError> { Err(report!(errors::ConnectorError::WebhooksNotImplemented)) } } impl ConnectorSpecifications for {{project-name | downcase | pascal_case}} {}
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::Connector for {{project-name | downcase | pascal_case}}Test { fn get_data(&self) -> api::ConnectorData { use router::connector::{{project-name | downcase | pascal_case}}; api::ConnectorData { connector: Box::new({{project-name | downcase | pascal_case}}::new()), connector_name: types::Connector::{{project-name | downcase | pascal_case}}, get_token: types::api::GetToken::Connector, merchant_connector_id: None, } } fn get_auth_token(&self) -> types::ConnectorAuthType { utils::to_connector_auth_type( connector_auth::ConnectorAuthentication::new() .{{project-name | downcase}} .expect("Missing connector authentication configuration").into(), ) } fn get_name(&self) -> String { "{{project-name | downcase}}".to_string() } } static CONNECTOR: {{project-name | downcase | pascal_case}}Test = {{project-name | downcase | pascal_case}}Test {}; fn get_default_payment_info() -> Option<utils::PaymentInfo> { None } fn payment_method_details() -> Option<types::PaymentsAuthorizeData> { None } // Cards Positive Tests // Creates a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_only_authorize_payment() { let response = CONNECTOR .authorize_payment(payment_method_details(), get_default_payment_info()) .await .expect("Authorize payment response"); assert_eq!(response.status, enums::AttemptStatus::Authorized); } // Captures a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_capture_authorized_payment() { let response = CONNECTOR .authorize_and_capture_payment(payment_method_details(), None, get_default_payment_info()) .await .expect("Capture payment response"); assert_eq!(response.status, enums::AttemptStatus::Charged); } // Partially captures a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_partially_capture_authorized_payment() { let response = CONNECTOR .authorize_and_capture_payment( payment_method_details(), Some(types::PaymentsCaptureData { amount_to_capture: 50, ..utils::PaymentCaptureType::default().0 }), get_default_payment_info(), ) .await .expect("Capture payment response"); assert_eq!(response.status, enums::AttemptStatus::Charged); } // Synchronizes a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_sync_authorized_payment() { let authorize_response = CONNECTOR .authorize_payment(payment_method_details(), get_default_payment_info()) .await .expect("Authorize payment response"); let txn_id = utils::get_connector_transaction_id(authorize_response.response); let response = CONNECTOR .psync_retry_till_status_matches( enums::AttemptStatus::Authorized, Some(types::PaymentsSyncData { connector_transaction_id: types::ResponseId::ConnectorTransactionId( txn_id.unwrap(), ), ..Default::default() }), get_default_payment_info(), ) .await .expect("PSync response"); assert_eq!(response.status, enums::AttemptStatus::Authorized,); } // Voids a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_void_authorized_payment() { let response = CONNECTOR .authorize_and_void_payment( payment_method_details(), Some(types::PaymentsCancelData { connector_transaction_id: String::from(""), cancellation_reason: Some("requested_by_customer".to_string()), ..Default::default() }), get_default_payment_info(), ) .await .expect("Void payment response"); assert_eq!(response.status, enums::AttemptStatus::Voided); } // Refunds a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_refund_manually_captured_payment() { let response = CONNECTOR .capture_payment_and_refund(payment_method_details(), None, None, get_default_payment_info()) .await .unwrap(); assert_eq!( response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Partially refunds a payment using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_partially_refund_manually_captured_payment() { let response = CONNECTOR .capture_payment_and_refund( payment_method_details(), None, Some(types::RefundsData { refund_amount: 50, ..utils::PaymentRefundType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Synchronizes a refund using the manual capture flow (Non 3DS). #[actix_web::test] async fn should_sync_manually_captured_refund() { let refund_response = CONNECTOR .capture_payment_and_refund(payment_method_details(), None, None, get_default_payment_info()) .await .unwrap(); let response = CONNECTOR .rsync_retry_till_status_matches( enums::RefundStatus::Success, refund_response.response.unwrap().connector_refund_id, None, get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Creates a payment using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_make_payment() { let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap(); assert_eq!(authorize_response.status, enums::AttemptStatus::Charged); } // Synchronizes a payment using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_sync_auto_captured_payment() { let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap(); assert_eq!(authorize_response.status, enums::AttemptStatus::Charged); let txn_id = utils::get_connector_transaction_id(authorize_response.response); assert_ne!(txn_id, None, "Empty connector transaction id"); let response = CONNECTOR .psync_retry_till_status_matches( enums::AttemptStatus::Charged, Some(types::PaymentsSyncData { connector_transaction_id: types::ResponseId::ConnectorTransactionId( txn_id.unwrap(), ), capture_method: Some(enums::CaptureMethod::Automatic), ..Default::default() }), get_default_payment_info(), ) .await .unwrap(); assert_eq!(response.status, enums::AttemptStatus::Charged,); } // Refunds a payment using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_refund_auto_captured_payment() { let response = CONNECTOR .make_payment_and_refund(payment_method_details(), None, get_default_payment_info()) .await .unwrap(); assert_eq!( response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Partially refunds a payment using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_partially_refund_succeeded_payment() { let refund_response = CONNECTOR .make_payment_and_refund( payment_method_details(), Some(types::RefundsData { refund_amount: 50, ..utils::PaymentRefundType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( refund_response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Creates multiple refunds against a payment using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_refund_succeeded_payment_multiple_times() { CONNECTOR .make_payment_and_multiple_refund( payment_method_details(), Some(types::RefundsData { refund_amount: 50, ..utils::PaymentRefundType::default().0 }), get_default_payment_info(), ) .await; } // Synchronizes a refund using the automatic capture flow (Non 3DS). #[actix_web::test] async fn should_sync_refund() { let refund_response = CONNECTOR .make_payment_and_refund(payment_method_details(), None, get_default_payment_info()) .await .unwrap(); let response = CONNECTOR .rsync_retry_till_status_matches( enums::RefundStatus::Success, refund_response.response.unwrap().connector_refund_id, None, get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap().refund_status, enums::RefundStatus::Success, ); } // Cards Negative scenarios // Creates a payment with incorrect CVC. #[actix_web::test] async fn should_fail_payment_for_incorrect_cvc() { let response = CONNECTOR .make_payment( Some(types::PaymentsAuthorizeData { payment_method_data: types::api::PaymentMethodData::Card(api::Card { card_cvc: Secret::new("12345".to_string()), ..utils::CCardType::default().0 }), ..utils::PaymentAuthorizeType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap_err().message, "Your card's security code is invalid.".to_string(), ); } // Creates a payment with incorrect expiry month. #[actix_web::test] async fn should_fail_payment_for_invalid_exp_month() { let response = CONNECTOR .make_payment( Some(types::PaymentsAuthorizeData { payment_method_data: api::PaymentMethodData::Card(api::Card { card_exp_month: Secret::new("20".to_string()), ..utils::CCardType::default().0 }), ..utils::PaymentAuthorizeType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap_err().message, "Your card's expiration month is invalid.".to_string(), ); } // Creates a payment with incorrect expiry year. #[actix_web::test] async fn should_fail_payment_for_incorrect_expiry_year() { let response = CONNECTOR .make_payment( Some(types::PaymentsAuthorizeData { payment_method_data: api::PaymentMethodData::Card(api::Card { card_exp_year: Secret::new("2000".to_string()), ..utils::CCardType::default().0 }), ..utils::PaymentAuthorizeType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap_err().message, "Your card's expiration year is invalid.".to_string(), ); } // Voids a payment using automatic capture flow (Non 3DS). #[actix_web::test] async fn should_fail_void_payment_for_auto_capture() { let authorize_response = CONNECTOR.make_payment(payment_method_details(), get_default_payment_info()).await.unwrap(); assert_eq!(authorize_response.status, enums::AttemptStatus::Charged); let txn_id = utils::get_connector_transaction_id(authorize_response.response); assert_ne!(txn_id, None, "Empty connector transaction id"); let void_response = CONNECTOR .void_payment(txn_id.unwrap(), None, get_default_payment_info()) .await .unwrap(); assert_eq!( void_response.response.unwrap_err().message, "You cannot cancel this PaymentIntent because it has a status of succeeded." ); } // Captures a payment using invalid connector payment id. #[actix_web::test] async fn should_fail_capture_for_invalid_payment() { let capture_response = CONNECTOR .capture_payment("123456789".to_string(), None, get_default_payment_info()) .await .unwrap(); assert_eq!( capture_response.response.unwrap_err().message, String::from("No such payment_intent: '123456789'") ); } // Refunds a payment with refund amount higher than payment amount. #[actix_web::test] async fn should_fail_for_refund_amount_higher_than_payment_amount() { let response = CONNECTOR .make_payment_and_refund( payment_method_details(), Some(types::RefundsData { refund_amount: 150, ..utils::PaymentRefundType::default().0 }), get_default_payment_info(), ) .await .unwrap(); assert_eq!( response.response.unwrap_err().message, "Refund amount (₹1.50) is greater than charge amount (₹1.00)", ); } // Connector dependent test cases goes here // [#478]: add unit tests for non 3DS, wallets & webhooks in connector tests
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 application [master_database] username = "db_user" password = "db_pass" host = "localhost" port = 5432 dbname = "hyperswitch_db" pool_size = 5 connection_timeout = 10 min_idle = 2 [replica_database] username = "db_user" password = "db_pass" host = "localhost" port = 5432 dbname = "hyperswitch_db" pool_size = 5 connection_timeout = 10 [redis] host = "127.0.0.1" port = 6379 pool_size = 5 reconnect_max_attempts = 5 reconnect_delay = 5 default_ttl = 300 default_hash_ttl = 900 use_legacy_version = false stream_read_count = 1 auto_pipeline = true disable_auto_backpressure = false max_in_flight_commands = 5000 default_command_timeout = 30 unresponsive_timeout = 10 max_feed_count = 200 [server] # HTTP Request body limit. Defaults to 32kB request_body_limit = 32768 [secrets] admin_api_key = "test_admin" master_enc_key = "73ad7bbbbc640c845a150f67d058b279849370cd2c1f3c67c4dd6c869213e13a" jwt_secret = "secret" [applepay_merchant_configs] merchant_cert_key = "MERCHANT CERTIFICATE KEY" merchant_cert = "MERCHANT CERTIFICATE" common_merchant_identifier = "COMMON MERCHANT IDENTIFIER" applepay_endpoint = "DOMAIN SPECIFIC ENDPOINT" [locker] host = "http://127.0.0.1:3000" host_rs = "http://127.0.0.1:3000" mock_locker = true basilisk_host = "" locker_enabled = true ttl_for_storage_in_secs = 220752000 [forex_api] api_key = "" fallback_api_key = "" data_expiration_delay_in_seconds = 21600 redis_lock_timeout_in_seconds = 100 redis_ttl_in_seconds = 172800 [jwekey] vault_encryption_key = """ -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwa6siKaSYqD1o4J3AbHq Km8oVTvep7GoN/C45qY60C7DO72H1O7Ujt6ZsSiK83EyI0CaUg3ORPS3ayobFNmu zR366ckK8GIf3BG7sVI6u/9751z4OvBHZMM9JFWa7Bx/RCPQ8aeM+iJoqf9auuQm 3NCTlfaZJif45pShswR+xuZTR/bqnsOSP/MFROI9ch0NE7KRogy0tvrZe21lP24i Ro2LJJG+bYshxBddhxQf2ryJ85+/Trxdu16PunodGzCl6EMT3bvb4ZC41i15omqU aXXV1Z1wYUhlsO0jyd1bVvjyuE/KE1TbBS0gfR/RkacODmmE2zEdZ0EyyiXwqkmc oQIDAQAB -----END PUBLIC KEY----- """ rust_locker_encryption_key = """ -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwa6siKaSYqD1o4J3AbHq Km8oVTvep7GoN/C45qY60C7DO72H1O7Ujt6ZsSiK83EyI0CaUg3ORPS3ayobFNmu zR366ckK8GIf3BG7sVI6u/9751z4OvBHZMM9JFWa7Bx/RCPQ8aeM+iJoqf9auuQm 3NCTlfaZJif45pShswR+xuZTR/bqnsOSP/MFROI9ch0NE7KRogy0tvrZe21lP24i Ro2LJJG+bYshxBddhxQf2ryJ85+/Trxdu16PunodGzCl6EMT3bvb4ZC41i15omqU aXXV1Z1wYUhlsO0jyd1bVvjyuE/KE1TbBS0gfR/RkacODmmE2zEdZ0EyyiXwqkmc oQIDAQAB -----END PUBLIC KEY----- """ vault_private_key = """ -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEA5Z/K0JWds8iHhWCa+rj0rhOQX1nVs/ArQ1D0vh3UlSPR2vZU TrkdP7i3amv4d2XDC+3+5/YWExTkpxqnfl1T9J37leN2guAARed6oYoTDEP/OoKt nUrKK2xk/+V5DNOWcRiSpcCrJOOIEoACOlPIrXQSg16KDZQb0QTMntnsiPIJDbsO GcdKytRAcNaokiKLnia1v13N3bk6dSplrj1YzawslZfgqD0eov4FjzBMoA19yNtl VLLf6kOkLcFQjTKXJLP1tLflLUBPTg8fm9wgAPK2BjMQ2AMkUxx0ubbtw/9CeJ+b FWrqGnEhlvfDMlyAV77sAiIdQ4mXs3TLcLb/AQIDAQABAoIBAGNekD1N0e5AZG1S zh6cNb6zVrH8xV9WGtLJ0PAJJrrXwnQYT4m10DOIM0+Jo/+/ePXLq5kkRI9DZmPu Q/eKWc+tInfN9LZUS6n0r3wCrZWMQ4JFlO5RtEWwZdDbtFPZqOwObz/treKL2JHw 9YXaRijR50UUf3e61YLRqd9AfX0RNuuG8H+WgU3Gwuh5TwRnljM3JGaDPHsf7HLS tNkqJuByp26FEbOLTokZDbHN0sy7/6hufxnIS9AK4vp8y9mZAjghG26Rbg/H71mp Z+Q6P1y7xdgAKbhq7usG3/o4Y1e9wnghHvFS7DPwGekHQH2+LsYNEYOir1iRjXxH GUXOhfUCgYEA+cR9jONQFco8Zp6z0wdGlBeYoUHVMjThQWEblWL2j4RG/qQd/y0j uhVeU0/PmkYK2mgcjrh/pgDTtPymc+QuxBi+lexs89ppuJIAgMvLUiJT67SBHguP l4+oL9U78KGh7PfJpMKH+Pk5yc1xucAevk0wWmr5Tz2vKRDavFTPV+MCgYEA61qg Y7yN0cDtxtqlZdMC8BJPFCQ1+s3uB0wetAY3BEKjfYc2O/4sMbixXzt5PkZqZy96 QBUBxhcM/rIolpM3nrgN7h1nmJdk9ljCTjWoTJ6fDk8BUh8+0GrVhTbe7xZ+bFUN UioIqvfapr/q/k7Ah2mCBE04wTZFry9fndrH2ssCgYEAh1T2Cj6oiAX6UEgxe2h3 z4oxgz6efAO3AavSPFFQ81Zi+VqHflpA/3TQlSerfxXwj4LV5mcFkzbjfy9eKXE7 /bjCm41tQ3vWyNEjQKYr1qcO/aniRBtThHWsVa6eObX6fOGN+p4E+txfeX693j3A 6q/8QSGxUERGAmRFgMIbTq0CgYAmuTeQkXKII4U75be3BDwEgg6u0rJq/L0ASF74 4djlg41g1wFuZ4if+bJ9Z8ywGWfiaGZl6s7q59oEgg25kKljHQd1uTLVYXuEKOB3 e86gJK0o7ojaGTf9lMZi779IeVv9uRTDAxWAA93e987TXuPAo/R3frkq2SIoC9Rg paGidwKBgBqYd/iOJWsUZ8cWEhSE1Huu5rDEpjra8JPXHqQdILirxt1iCA5aEQou BdDGaDr8sepJbGtjwTyiG8gEaX1DD+KsF2+dQRQdQfcYC40n8fKkvpFwrKjDj1ac VuY3OeNxi+dC2r7HppP3O/MJ4gX/RJJfSrcaGP8/Ke1W5+jE97Qy -----END RSA PRIVATE KEY----- """ tunnel_private_key = "" [connectors.supported] wallets = ["klarna", "mifinity", "braintree", "applepay", "adyen"] rewards = ["cashtocode", "zen"] cards = [ "aci", "adyen", "adyenplatform", "airwallex", "amazonpay", "authorizedotnet", "bambora", "bamboraapac", "bankofamerica", "billwerk", "bitpay", "bluesnap", "boku", "braintree", "checkout", "coinbase", "coingate", "cryptopay", "cybersource", "datatrans", "deutschebank", "digitalvirgo", "dlocal", "dummyconnector", "ebanx", "elavon", "facilitapay", "fiserv", "fiservemea", "fiuu", "forte", "getnet", "globalpay", "globepay", "gocardless", "gpayments", "helcim", "hipay", "iatapay", "inespay", "itaubank", "jpmorgan", "juspaythreedsserver", "mollie", "moneris", "multisafepay", "netcetera", "nexinets", "nexixpay", "nmi", "nomupay", "noon", "novalnet", "nuvei", "opayo", "opennode", "paybox", "payeezy", "payme", "payone", "paypal", "paystack", "payu", "placetopay", "plaid", "powertranz", "prophetpay", "redsys", "shift4", "square", "stax", "stripe", "stripebilling", "taxjar", "threedsecureio", "thunes", "trustpay", "tsys", "unified_authentication_service", "volt", "wellsfargo", "wellsfargopayout", "wise", "worldline", "worldpay", "xendit", "zen", "zsl", ] [refund] max_attempts = 10 max_age = 365 [webhooks] outgoing_enabled = true [eph_key] validity = 1 [api_keys] hash_key = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" checksum_auth_context = "TEST" checksum_auth_key = "54455354" [connectors] aci.base_url = "https://eu-test.oppwa.com/" adyen.base_url = "https://checkout-test.adyen.com/" adyenplatform.base_url = "https://balanceplatform-api-test.adyen.com/" adyen.payout_base_url = "https://pal-test.adyen.com/" adyen.dispute_base_url = "https://ca-test.adyen.com/" airwallex.base_url = "https://api-demo.airwallex.com/" amazonpay.base_url = "https://pay-api.amazon.com/v2" applepay.base_url = "https://apple-pay-gateway.apple.com/" authorizedotnet.base_url = "https://apitest.authorize.net/xml/v1/request.api" bambora.base_url = "https://api.na.bambora.com" bamboraapac.base_url = "https://demo.ippayments.com.au/interface/api" bankofamerica.base_url = "https://apitest.merchant-services.bankofamerica.com/" billwerk.base_url = "https://api.reepay.com/" billwerk.secondary_base_url = "https://card.reepay.com/" bitpay.base_url = "https://test.bitpay.com" bluesnap.base_url = "https://sandbox.bluesnap.com/" bluesnap.secondary_base_url = "https://sandpay.bluesnap.com/" boku.base_url = "https://$-api4-stage.boku.com" braintree.base_url = "https://payments.sandbox.braintree-api.com/graphql" cashtocode.base_url = "https://cluster05.api-test.cashtocode.com" chargebee.base_url = "https://$.chargebee.com/api/" checkout.base_url = "https://api.sandbox.checkout.com/" coinbase.base_url = "https://api.commerce.coinbase.com" coingate.base_url = "https://api-sandbox.coingate.com" cryptopay.base_url = "https://business-sandbox.cryptopay.me" cybersource.base_url = "https://apitest.cybersource.com/" datatrans.base_url = "https://api.sandbox.datatrans.com/" datatrans.secondary_base_url = "https://pay.sandbox.datatrans.com/" deutschebank.base_url = "https://testmerch.directpos.de/rest-api" digitalvirgo.base_url = "https://dcb-integration-service-sandbox-external.staging.digitalvirgo.pl" dlocal.base_url = "https://sandbox.dlocal.com/" dummyconnector.base_url = "http://localhost:8080/dummy-connector" ebanx.base_url = "https://sandbox.ebanxpay.com/" elavon.base_url = "https://api.demo.convergepay.com/VirtualMerchantDemo/" facilitapay.base_url = "https://sandbox-api.facilitapay.com/api/v1" fiserv.base_url = "https://cert.api.fiservapps.com/" fiservemea.base_url = "https://prod.emea.api.fiservapps.com/sandbox" fiuu.base_url = "https://sandbox.merchant.razer.com/" fiuu.secondary_base_url = "https://sandbox.merchant.razer.com/" fiuu.third_base_url = "https://api.merchant.razer.com/" forte.base_url = "https://sandbox.forte.net/api/v3" getnet.base_url = "https://api-test.getneteurope.com/engine/rest" globalpay.base_url = "https://apis.sandbox.globalpay.com/ucp/" globepay.base_url = "https://pay.globepay.co/" gocardless.base_url = "https://api-sandbox.gocardless.com" gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net" helcim.base_url = "https://api.helcim.com/" hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/" hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/" hipay.third_base_url = "https://stage-api-gateway.hipay.com/" iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1" inespay.base_url = "https://apiflow.inespay.com/san/v21" itaubank.base_url = "https://sandbox.devportal.itau.com.br/" jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2" juspaythreedsserver.base_url = "http://localhost:8000" jpmorgan.secondary_base_url = "https://id.payments.jpmorgan.com" klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/" mifinity.base_url = "https://demo.mifinity.com/" mollie.base_url = "https://api.mollie.com/v2/" moneris.base_url = "https://api.sb.moneris.io" mollie.secondary_base_url = "https://api.cc.mollie.com/v1/" multisafepay.base_url = "https://testapi.multisafepay.com/" netcetera.base_url = "https://{{merchant_endpoint_prefix}}.3ds-server.prev.netcetera-cloud-payment.ch" nexinets.base_url = "https://apitest.payengine.de/v1" nexixpay.base_url = "https://xpaysandbox.nexigroup.com/api/phoenix-0.0/psp/api/v1" nmi.base_url = "https://secure.nmi.com/" nomupay.base_url = "https://payout-api.sandbox.nomupay.com" noon.base_url = "https://api-test.noonpayments.com/" novalnet.base_url = "https://payport.novalnet.de/v2" noon.key_mode = "Test" nuvei.base_url = "https://ppp-test.nuvei.com/" opayo.base_url = "https://pi-test.sagepay.com/" opennode.base_url = "https://dev-api.opennode.com" paybox.base_url = "https://preprod-ppps.paybox.com/PPPS.php" paybox.secondary_base_url = "https://preprod-tpeweb.paybox.com/" payeezy.base_url = "https://api-cert.payeezy.com/" payme.base_url = "https://sandbox.payme.io/" payone.base_url = "https://payment.preprod.payone.com/" paypal.base_url = "https://api-m.sandbox.paypal.com/" paystack.base_url = "https://api.paystack.co" payu.base_url = "https://secure.snd.payu.com/" placetopay.base_url = "https://test.placetopay.com/rest/gateway" plaid.base_url = "https://sandbox.plaid.com" powertranz.base_url = "https://staging.ptranz.com/api/" prophetpay.base_url = "https://ccm-thirdparty.cps.golf/" rapyd.base_url = "https://sandboxapi.rapyd.net" razorpay.base_url = "https://sandbox.juspay.in/" recurly.base_url = "https://v3.recurly.com" redsys.base_url = "https://sis-t.redsys.es:25443" riskified.base_url = "https://sandbox.riskified.com/api" shift4.base_url = "https://api.shift4.com/" signifyd.base_url = "https://api.signifyd.com/" square.base_url = "https://connect.squareupsandbox.com/" square.secondary_base_url = "https://pci-connect.squareupsandbox.com/" stax.base_url = "https://apiprod.fattlabs.com/" stripe.base_url = "https://api.stripe.com/" stripebilling.base_url = "https://api.stripe.com/" taxjar.base_url = "https://api.sandbox.taxjar.com/v2/" threedsecureio.base_url = "https://service.sandbox.3dsecure.io" thunes.base_url = "https://api.limonetikqualif.com/" stripe.base_url_file_upload = "https://files.stripe.com/" wise.base_url = "https://api.sandbox.transferwise.tech/" worldline.base_url = "https://eu.sandbox.api-ingenico.com/" worldpay.base_url = "https://try.access.worldpay.com/" xendit.base_url = "https://api.xendit.co" trustpay.base_url = "https://test-tpgw.trustpay.eu/" tsys.base_url = "https://stagegw.transnox.com/" unified_authentication_service.base_url = "http://localhost:8080/" volt.base_url = "https://api.sandbox.volt.io/" wellsfargo.base_url = "https://apitest.cybersource.com/" wellsfargopayout.base_url = "https://api-sandbox.wellsfargo.com/" trustpay.base_url_bank_redirects = "https://aapi.trustpay.eu/" zen.base_url = "https://api.zen-test.com/" zen.secondary_base_url = "https://secure.zen-test.com/" zsl.base_url = "https://api.sitoffalb.net/" [scheduler] stream = "SCHEDULER_STREAM" [scheduler.consumer] disabled = false consumer_group = "SCHEDULER_GROUP" [scheduler.server] port = 3000 host = "127.0.0.1" workers = 1 [cors] max_age = 30 # origins = "http://localhost:8080,http://localhost:9000" allowed_methods = "GET,POST,PUT,DELETE" wildcard_origin = true [email] sender_email = "example@example.com" aws_region = "" allowed_unverified_days = 1 active_email_client = "NO_EMAIL_CLIENT" recon_recipient_email = "recon@example.com" prod_intent_recipient_email = "business@example.com" [email.aws_ses] email_role_arn = "" sts_role_session_name = "" [user] password_validity_in_days = 90 two_factor_auth_expiry_in_secs = 300 totp_issuer_name = "Hyperswitch Dev" base_url = "http://localhost:8080" force_two_factor_auth = false force_cookies = true [bank_config.eps] stripe = { banks = "arzte_und_apotheker_bank,austrian_anadi_bank_ag,bank_austria,bankhaus_carl_spangler,bankhaus_schelhammer_und_schattera_ag,bawag_psk_ag,bks_bank_ag,brull_kallmus_bank_ag,btv_vier_lander_bank,capital_bank_grawe_gruppe_ag,dolomitenbank,easybank_ag,erste_bank_und_sparkassen,hypo_alpeadriabank_international_ag,hypo_noe_lb_fur_niederosterreich_u_wien,hypo_oberosterreich_salzburg_steiermark,hypo_tirol_bank_ag,hypo_vorarlberg_bank_ag,hypo_bank_burgenland_aktiengesellschaft,marchfelder_bank,oberbank_ag,raiffeisen_bankengruppe_osterreich,schoellerbank_ag,sparda_bank_wien,volksbank_gruppe,volkskreditbank_ag,vr_bank_braunau" } adyen = { banks = "bank_austria,bawag_psk_ag,dolomitenbank,easybank_ag,erste_bank_und_sparkassen,hypo_tirol_bank_ag,posojilnica_bank_e_gen,raiffeisen_bankengruppe_osterreich,schoellerbank_ag,sparda_bank_wien,volksbank_gruppe,volkskreditbank_ag" } [bank_config.ideal] stripe = { banks = "abn_amro,asn_bank,bunq,handelsbanken,ing,knab,moneyou,rabobank,regiobank,revolut,sns_bank,triodos_bank,van_lanschot" } adyen = { banks = "abn_amro,asn_bank,bunq,ing,knab,n26,nationale_nederlanden,rabobank,regiobank,revolut,sns_bank,triodos_bank,van_lanschot, yoursafe" } multisafepay = { banks = "abn_amro, asn_bank, bunq, handelsbanken, nationale_nederlanden, n26, ing, knab, rabobank, regiobank, revolut, sns_bank,triodos_bank, van_lanschot, yoursafe" } [bank_config.online_banking_czech_republic] adyen = { banks = "ceska_sporitelna,komercni_banka,platnosc_online_karta_platnicza" } [bank_config.online_banking_slovakia] adyen = { banks = "e_platby_vub,postova_banka,sporo_pay,tatra_pay,viamo" } [bank_config.online_banking_poland] adyen = { banks = "blik_psp,place_zipko,m_bank,pay_with_ing,santander_przelew24,bank_pekaosa,bank_millennium,pay_with_alior_bank,banki_spoldzielcze,pay_with_inteligo,bnp_paribas_poland,bank_nowy_sa,credit_agricole,pay_with_bos,pay_with_citi_handlowy,pay_with_plus_bank,toyota_bank,velo_bank,e_transfer_pocztowy24" } [bank_config.przelewy24] stripe = { banks = "alior_bank,bank_millennium,bank_nowy_bfg_sa,bank_pekao_sa,banki_spbdzielcze,blik,bnp_paribas,boz,citi,credit_agricole,e_transfer_pocztowy24,getin_bank,idea_bank,inteligo,mbank_mtransfer,nest_przelew,noble_pay,pbac_z_ipko,plus_bank,santander_przelew24,toyota_bank,volkswagen_bank" } [bank_config.open_banking_uk] adyen = { banks = "aib,bank_of_scotland,danske_bank,first_direct,first_trust,halifax,lloyds,monzo,nat_west,nationwide_bank,royal_bank_of_scotland,starling,tsb_bank,tesco_bank,ulster_bank,barclays,hsbc_bank,revolut,santander_przelew24,open_bank_success,open_bank_failure,open_bank_cancelled" } [bank_config.online_banking_fpx] adyen.banks = "affin_bank,agro_bank,alliance_bank,am_bank,bank_islam,bank_muamalat,bank_rakyat,bank_simpanan_nasional,cimb_bank,hong_leong_bank,hsbc_bank,kuwait_finance_house,maybank,ocbc_bank,public_bank,rhb_bank,standard_chartered_bank,uob_bank" fiuu.banks = "affin_bank,agro_bank,alliance_bank,am_bank,bank_of_china,bank_islam,bank_muamalat,bank_rakyat,bank_simpanan_nasional,cimb_bank,hong_leong_bank,hsbc_bank,kuwait_finance_house,maybank,ocbc_bank,public_bank,rhb_bank,standard_chartered_bank,uob_bank" [bank_config.online_banking_thailand] adyen.banks = "bangkok_bank,krungsri_bank,krung_thai_bank,the_siam_commercial_bank,kasikorn_bank" [pm_filters.default] google_pay = { country = "AL,DZ,AS,AO,AG,AR,AU,AT,AZ,BH,BY,BE,BR,BG,CA,CL,CO,HR,CZ,DK,DO,EG,EE,FI,FR,DE,GR,HK,HU,IN,ID,IE,IL,IT,JP,JO,KZ,KE,KW,LV,LB,LT,LU,MY,MX,NL,NZ,NO,OM,PK,PA,PE,PH,PL,PT,QA,RO,RU,SA,SG,SK,ZA,ES,LK,SE,CH,TW,TH,TR,UA,AE,GB,US,UY,VN" } apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HU,IS,IE,IM,IT,KZ,JE,LV,LI,LT,LU,MT,MD,MC,ME,NL,NO,PL,PT,RO,SM,RS,SK,SI,ES,SE,CH,UA,GB,AR,CO,CR,BR,MX,PE,BH,IL,JO,KW,PS,QA,SA,AE,CA,UM,US,KR,VN,MA,ZA,VA,CL,SV,GT,HN,PA", currency = "AED,AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD" } paypal = { currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD" } klarna = { country = "AT,BE,DK,FI,FR,DE,IE,IT,NL,NO,ES,SE,GB,US,CA", currency = "USD,GBP,EUR,CHF,DKK,SEK,NOK,AUD,PLN,CAD" } affirm = { country = "US", currency = "USD" } afterpay_clearpay = { country = "US,CA,GB,AU,NZ", currency = "GBP,AUD,NZD,CAD,USD" } giropay = { country = "DE", currency = "EUR" } eps = { country = "AT", currency = "EUR" } sofort = { country = "ES,GB,SE,AT,NL,DE,CH,BE,FR,FI,IT,PL", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } [pm_filters.stripe] google_pay = { country = "AL,DZ,AS,AO,AG,AR,AU,AT,AZ,BH,BY,BE,BR,BG,CA,CL,CO,HR,CZ,DK,DO,EG,EE,FI,FR,DE,GR,HK,HU,IN,ID,IE,IL,IT,JP,JO,KZ,KE,KW,LV,LB,LT,LU,MY,MX,NL,NZ,NO,OM,PK,PA,PE,PH,PL,PT,QA,RO,RU,SA,SG,SK,ZA,ES,LK,SE,CH,TW,TH,TR,UA,AE,GB,US,UY,VN" } apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HU,IS,IE,IM,IT,KZ,JE,LV,LI,LT,LU,MT,MD,MC,ME,NL,NO,PL,PT,RO,SM,RS,SK,SI,ES,SE,CH,UA,GB,AR,CO,CR,BR,MX,PE,BH,IL,JO,KW,PS,QA,SA,AE,CA,UM,US,KR,VN,MA,ZA,VA,CL,SV,GT,HN,PA" } klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "AUD,CAD,CHF,CZK,DKK,EUR,GBP,NOK,NZD,PLN,SEK,USD" } affirm = { country = "US", currency = "USD" } afterpay_clearpay = { country = "US,CA,GB,AU,NZ,FR,ES", currency = "USD,CAD,GBP,AUD,NZD" } giropay = { country = "DE", currency = "EUR" } eps = { country = "AT", currency = "EUR" } sofort = { country = "AT,BE,DE,IT,NL,ES", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } cashapp = { country = "US", currency = "USD" } [pm_filters.volt] open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" } [pm_filters.razorpay] upi_collect = { country = "IN", currency = "INR" } [pm_filters.plaid] open_banking_pis = { currency = "EUR,GBP" } [pm_filters.adyen] google_pay = { country = "AU,NZ,JP,HK,SG,MY,TH,VN,BH,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,RO,HR,LI,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,TR,IS,CA,US", currency = "AED,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HTG,HUF,IDR,ILS,INR,IQD,JMD,JOD,JPY,KES,KGS,KHR,KMF,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LYD,MAD,MDL,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLE,SOS,SRD,STN,SVC,SZL,THB,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW" } apple_pay = { country = "AU,NZ,CN,JP,HK,SG,MY,BH,AE,KW,BR,ES,GB,SE,NO,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,LI,UA,MT,SI,GR,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,CHF,CAD,EUR,GBP,HKD,SGD,USD,MYR" } paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD" } mobile_pay = { country = "DK,FI", currency = "DKK,SEK,NOK,EUR" } ali_pay = { country = "AU,JP,HK,SG,MY,TH,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,FI,RO,MT,SI,GR,PT,IE,IT,CA,US", currency = "USD,EUR,GBP,JPY,AUD,SGD,CHF,SEK,NOK,NZD,THB,HKD,CAD" } we_chat_pay = { country = "AU,NZ,CN,JP,HK,SG,ES,GB,SE,NO,AT,NL,DE,CY,CH,BE,FR,DK,LI,MT,SI,GR,PT,IT,CA,US", currency = "AUD,CAD,CNY,EUR,GBP,HKD,JPY,NZD,SGD,USD" } mb_way = { country = "PT", currency = "EUR" } klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NO,PL,PT,RO,ES,SE,CH,NL,GB,US", currency = "AUD,EUR,CAD,CZK,DKK,NOK,PLN,RON,SEK,CHF,GBP,USD" } affirm = { country = "US", currency = "USD" } afterpay_clearpay = { country = "AU,NZ,ES,GB,FR,IT,CA,US", currency = "GBP" } pay_bright = { country = "CA", currency = "CAD" } walley = { country = "SE,NO,DK,FI", currency = "DKK,EUR,NOK,SEK" } giropay = { country = "DE", currency = "EUR" } eps = { country = "AT", currency = "EUR" } sofort = { not_available_flows = { capture_method = "manual" }, country = "AT,BE,DE,ES,CH,NL", currency = "CHF,EUR" } ideal = { not_available_flows = { capture_method = "manual" }, country = "NL", currency = "EUR" } blik = { country = "PL", currency = "PLN" } trustly = { country = "ES,GB,SE,NO,AT,NL,DE,DK,FI,EE,LT,LV", currency = "CZK,DKK,EUR,GBP,NOK,SEK" } online_banking_czech_republic = { country = "CZ", currency = "EUR,CZK" } online_banking_finland = { country = "FI", currency = "EUR" } online_banking_poland = { country = "PL", currency = "PLN" } online_banking_slovakia = { country = "SK", currency = "EUR,CZK" } bancontact_card = { country = "BE", currency = "EUR" } ach = { country = "US", currency = "USD" } bacs = { country = "GB", currency = "GBP" } sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT", currency = "EUR" } ali_pay_hk = { country = "HK", currency = "HKD" } bizum = { country = "ES", currency = "EUR" } go_pay = { country = "ID", currency = "IDR" } kakao_pay = { country = "KR", currency = "KRW" } momo = { country = "VN", currency = "VND" } gcash = { country = "PH", currency = "PHP" } online_banking_fpx = { country = "MY", currency = "MYR" } online_banking_thailand = { country = "TH", currency = "THB" } touch_n_go = { country = "MY", currency = "MYR" } atome = { country = "MY,SG", currency = "MYR,SGD" } swish = { country = "SE", currency = "SEK" } permata_bank_transfer = { country = "ID", currency = "IDR" } bca_bank_transfer = { country = "ID", currency = "IDR" } bni_va = { country = "ID", currency = "IDR" } bri_va = { country = "ID", currency = "IDR" } cimb_va = { country = "ID", currency = "IDR" } danamon_va = { country = "ID", currency = "IDR" } mandiri_va = { country = "ID", currency = "IDR" } alfamart = { country = "ID", currency = "IDR" } indomaret = { country = "ID", currency = "IDR" } open_banking_uk = { country = "GB", currency = "GBP" } oxxo = { country = "MX", currency = "MXN" } pay_safe_card = { country = "AT,AU,BE,BR,BE,CA,HR,CY,CZ,DK,FI,FR,GE,DE,GI,HU,IS,IE,KW,LV,IE,LI,LT,LU,MT,MX,MD,ME,NL,NZ,NO,PY,PE,PL,PT,RO,SA,RS,SK,SI,ES,SE,CH,TR,AE,GB,US,UY", currency = "EUR,AUD,BRL,CAD,CZK,DKK,GEL,GIP,HUF,KWD,CHF,MXN,MDL,NZD,NOK,PYG,PEN,PLN,RON,SAR,RSD,SEK,TRY,AED,GBP,USD,UYU" } seven_eleven = { country = "JP", currency = "JPY" } lawson = { country = "JP", currency = "JPY" } mini_stop = { country = "JP", currency = "JPY" } family_mart = { country = "JP", currency = "JPY" } seicomart = { country = "JP", currency = "JPY" } pay_easy = { country = "JP", currency = "JPY" } pix = { country = "BR", currency = "BRL" } boleto = { country = "BR", currency = "BRL" } [pm_filters.airwallex] credit = { country = "AU,HK,SG,NZ,US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } debit = { country = "AU,HK,SG,NZ,US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } google_pay = { country = "AU,HK,SG,NZ,US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } [pm_filters.elavon] credit = { country = "US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } debit = { country = "US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } [pm_filters.xendit] credit = { country = "ID,PH", currency = "IDR,PHP,USD,SGD,MYR" } debit = { country = "ID,PH", currency = "IDR,PHP,USD,SGD,MYR" } [pm_filters.tsys] credit = { country = "NA", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL, BYN, KPW, STN, MRU, VES" } debit = { country = "NA", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL, BYN, KPW, STN, MRU, VES" } [pm_filters.billwerk] credit = { country = "DE, DK, FR, SE", currency = "DKK, NOK" } debit = { country = "DE, DK, FR, SE", currency = "DKK, NOK" } [pm_filters.fiservemea] credit = { country = "DE, FR, IT, NL, PL, ES, ZA, GB, AE", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } debit = { country = "DE, FR, IT, NL, PL, ES, ZA, GB, AE", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,STN,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } [pm_filters.bambora] credit = { country = "US,CA", currency = "USD" } debit = { country = "US,CA", currency = "USD" } [pm_filters.bankofamerica] credit = { currency = "USD" } debit = { currency = "USD" } apple_pay = { currency = "USD" } google_pay = { currency = "USD" } samsung_pay = { currency = "USD" } [pm_filters.cybersource] credit = { currency = "USD,GBP,EUR,PLN" } debit = { currency = "USD,GBP,EUR,PLN" } apple_pay = { currency = "USD,GBP,EUR,PLN" } google_pay = { currency = "USD,GBP,EUR,PLN" } samsung_pay = { currency = "USD,GBP,EUR" } paze = { currency = "USD" } [pm_filters.nexixpay] credit = { country = "AT,BE,CY,EE,FI,FR,DE,GR,IE,IT,LV,LT,LU,MT,NL,PT,SK,SI,ES,BG,HR,DK,GB,NO,PL,CZ,RO,SE,CH,HU,AU,BR,US", currency = "ARS,AUD,BHD,CAD,CLP,CNY,COP,HRK,CZK,DKK,HKD,HUF,INR,JPY,KZT,JOD,KRW,KWD,MYR,MXN,NGN,NOK,PHP,QAR,RUB,SAR,SGD,VND,ZAR,SEK,CHF,THB,AED,EGP,GBP,USD,TWD,BYN,RSD,AZN,RON,TRY,AOA,BGN,EUR,UAH,PLN,BRL" } debit = { country = "AT,BE,CY,EE,FI,FR,DE,GR,IE,IT,LV,LT,LU,MT,NL,PT,SK,SI,ES,BG,HR,DK,GB,NO,PL,CZ,RO,SE,CH,HU,AU,BR,US", currency = "ARS,AUD,BHD,CAD,CLP,CNY,COP,HRK,CZK,DKK,HKD,HUF,INR,JPY,KZT,JOD,KRW,KWD,MYR,MXN,NGN,NOK,PHP,QAR,RUB,SAR,SGD,VND,ZAR,SEK,CHF,THB,AED,EGP,GBP,USD,TWD,BYN,RSD,AZN,RON,TRY,AOA,BGN,EUR,UAH,PLN,BRL" } [pm_filters.square] credit = { country = "AU,CA,FR,IE,JP,ES,GB,US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW" } debit = { country = "AU,CA,FR,IE,JP,ES,GB,US", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLE,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW" } [pm_filters.iatapay] upi_collect = { country = "IN", currency = "INR" } upi_intent = { country = "IN", currency = "INR" } ideal = { country = "NL", currency = "EUR" } local_bank_redirect = { country = "AT,BE,EE,FI,FR,DE,IE,IT,LV,LT,LU,NL,PT,ES,GB,IN,HK,SG,TH,BR,MX,GH,VN,MY,PH,JO,AU,CO", currency = "EUR,GBP,INR,HKD,SGD,THB,BRL,MXN,GHS,VND,MYR,PHP,JOD,AUD,COP" } duit_now = { country = "MY", currency = "MYR" } fps = { country = "GB", currency = "GBP" } prompt_pay = { country = "TH", currency = "THB" } viet_qr = { country = "VN", currency = "VND" } [pm_filters.coinbase] crypto_currency = { country = "ZA,US,BR,CA,TR,SG,VN,GB,DE,FR,ES,PT,IT,NL,AU" } [pm_filters.novalnet] credit = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,BS,BW,BY,BZ,CA,CD,CH,CL,CN,CO,CR,CU,CY,CZ,DE,DJ,DK,DO,DZ,EE,EG,ET,ES,FI,FJ,FR,GB,GE,GH,GI,GM,GR,GT,GY,HK,HN,HR,HU,ID,IE,IL,IN,IS,IT,JM,JO,JP,KE,KH,KR,KW,KY,KZ,LB,LK,LT,LV,LY,MA,MC,MD,ME,MG,MK,MN,MO,MT,MV,MW,MX,MY,NG,NI,NO,NP,NL,NZ,OM,PA,PE,PG,PH,PK,PL,PT,PY,QA,RO,RS,RU,RW,SA,SB,SC,SE,SG,SH,SI,SK,SL,SO,SM,SR,ST,SV,SY,TH,TJ,TN,TO,TR,TW,TZ,UA,UG,US,UY,UZ,VE,VA,VN,VU,WS,CF,AG,DM,GD,KN,LC,VC,YE,ZA,ZM", currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,GBP,GEL,GHS,GIP,GMD,GTQ,GYD,HKD,HNL,HRK,HUF,IDR,ILS,INR,ISK,JMD,JOD,JPY,KES,KHR,KRW,KWD,KYD,KZT,LBP,LKR,LYD,MAD,MDL,MGA,MKD,MNT,MOP,MVR,MWK,MXN,MYR,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLL,SOS,SRD,STN,SVC,SYP,THB,TJS,TND,TOP,TRY,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,YER,ZAR,ZMW" } debit = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,BS,BW,BY,BZ,CA,CD,CH,CL,CN,CO,CR,CU,CY,CZ,DE,DJ,DK,DO,DZ,EE,EG,ET,ES,FI,FJ,FR,GB,GE,GH,GI,GM,GR,GT,GY,HK,HN,HR,HU,ID,IE,IL,IN,IS,IT,JM,JO,JP,KE,KH,KR,KW,KY,KZ,LB,LK,LT,LV,LY,MA,MC,MD,ME,MG,MK,MN,MO,MT,MV,MW,MX,MY,NG,NI,NO,NP,NL,NZ,OM,PA,PE,PG,PH,PK,PL,PT,PY,QA,RO,RS,RU,RW,SA,SB,SC,SE,SG,SH,SI,SK,SL,SO,SM,SR,ST,SV,SY,TH,TJ,TN,TO,TR,TW,TZ,UA,UG,US,UY,UZ,VE,VA,VN,VU,WS,CF,AG,DM,GD,KN,LC,VC,YE,ZA,ZM", currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,GBP,GEL,GHS,GIP,GMD,GTQ,GYD,HKD,HNL,HRK,HUF,IDR,ILS,INR,ISK,JMD,JOD,JPY,KES,KHR,KRW,KWD,KYD,KZT,LBP,LKR,LYD,MAD,MDL,MGA,MKD,MNT,MOP,MVR,MWK,MXN,MYR,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLL,SOS,SRD,STN,SVC,SYP,THB,TJS,TND,TOP,TRY,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,YER,ZAR,ZMW" } apple_pay = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,BS,BW,BY,BZ,CA,CD,CH,CL,CN,CO,CR,CU,CY,CZ,DE,DJ,DK,DO,DZ,EE,EG,ET,ES,FI,FJ,FR,GB,GE,GH,GI,GM,GR,GT,GY,HK,HN,HR,HU,ID,IE,IL,IN,IS,IT,JM,JO,JP,KE,KH,KR,KW,KY,KZ,LB,LK,LT,LV,LY,MA,MC,MD,ME,MG,MK,MN,MO,MT,MV,MW,MX,MY,NG,NI,NO,NP,NL,NZ,OM,PA,PE,PG,PH,PK,PL,PT,PY,QA,RO,RS,RU,RW,SA,SB,SC,SE,SG,SH,SI,SK,SL,SO,SM,SR,ST,SV,SY,TH,TJ,TN,TO,TR,TW,TZ,UA,UG,US,UY,UZ,VE,VA,VN,VU,WS,CF,AG,DM,GD,KN,LC,VC,YE,ZA,ZM", currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,GBP,GEL,GHS,GIP,GMD,GTQ,GYD,HKD,HNL,HRK,HUF,IDR,ILS,INR,ISK,JMD,JOD,JPY,KES,KHR,KRW,KWD,KYD,KZT,LBP,LKR,LYD,MAD,MDL,MGA,MKD,MNT,MOP,MVR,MWK,MXN,MYR,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLL,SOS,SRD,STN,SVC,SYP,THB,TJS,TND,TOP,TRY,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,YER,ZAR,ZMW" } google_pay = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,BS,BW,BY,BZ,CA,CD,CH,CL,CN,CO,CR,CU,CY,CZ,DE,DJ,DK,DO,DZ,EE,EG,ET,ES,FI,FJ,FR,GB,GE,GH,GI,GM,GR,GT,GY,HK,HN,HR,HU,ID,IE,IL,IN,IS,IT,JM,JO,JP,KE,KH,KR,KW,KY,KZ,LB,LK,LT,LV,LY,MA,MC,MD,ME,MG,MK,MN,MO,MT,MV,MW,MX,MY,NG,NI,NO,NP,NL,NZ,OM,PA,PE,PG,PH,PK,PL,PT,PY,QA,RO,RS,RU,RW,SA,SB,SC,SE,SG,SH,SI,SK,SL,SO,SM,SR,ST,SV,SY,TH,TJ,TN,TO,TR,TW,TZ,UA,UG,US,UY,UZ,VE,VA,VN,VU,WS,CF,AG,DM,GD,KN,LC,VC,YE,ZA,ZM", currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,GBP,GEL,GHS,GIP,GMD,GTQ,GYD,HKD,HNL,HRK,HUF,IDR,ILS,INR,ISK,JMD,JOD,JPY,KES,KHR,KRW,KWD,KYD,KZT,LBP,LKR,LYD,MAD,MDL,MGA,MKD,MNT,MOP,MVR,MWK,MXN,MYR,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLL,SOS,SRD,STN,SVC,SYP,THB,TJS,TND,TOP,TRY,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,YER,ZAR,ZMW" } paypal = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,BS,BW,BY,BZ,CA,CD,CH,CL,CN,CO,CR,CU,CY,CZ,DE,DJ,DK,DO,DZ,EE,EG,ET,ES,FI,FJ,FR,GB,GE,GH,GI,GM,GR,GT,GY,HK,HN,HR,HU,ID,IE,IL,IN,IS,IT,JM,JO,JP,KE,KH,KR,KW,KY,KZ,LB,LK,LT,LV,LY,MA,MC,MD,ME,MG,MK,MN,MO,MT,MV,MW,MX,MY,NG,NI,NO,NP,NL,NZ,OM,PA,PE,PG,PH,PK,PL,PT,PY,QA,RO,RS,RU,RW,SA,SB,SC,SE,SG,SH,SI,SK,SL,SO,SM,SR,ST,SV,SY,TH,TJ,TN,TO,TR,TW,TZ,UA,UG,US,UY,UZ,VE,VA,VN,VU,WS,CF,AG,DM,GD,KN,LC,VC,YE,ZA,ZM", currency = "AED,ALL,AMD,ARS,AUD,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CZK,DJF,DKK,DOP,DZD,EGP,ETB,EUR,FJD,GBP,GEL,GHS,GIP,GMD,GTQ,GYD,HKD,HNL,HRK,HUF,IDR,ILS,INR,ISK,JMD,JOD,JPY,KES,KHR,KRW,KWD,KYD,KZT,LBP,LKR,LYD,MAD,MDL,MGA,MKD,MNT,MOP,MVR,MWK,MXN,MYR,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SEK,SGD,SHP,SLL,SOS,SRD,STN,SVC,SYP,THB,TJS,TND,TOP,TRY,TWD,TZS,UAH,UGX,USD,UYU,UZS,VES,VND,VUV,WST,XAF,XCD,YER,ZAR,ZMW" } [pm_filters.braintree] paypal = { currency = "AUD,BRL,CAD,CNY,CZK,DKK,EUR,HKD,HUF,ILS,JPY,MYR,MXN,TWD,NZD,NOK,PHP,PLN,GBP,RUB,SGD,SEK,CHF,THB,USD" } [pm_filters.helcim] credit = { country = "US, CA", currency = "USD, CAD" } debit = { country = "US, CA", currency = "USD, CAD" } [pm_filters.globalpay] credit = { country = "AF,AX,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BQ,BA,BW,BV,BR,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CD,CK,CR,CI,HR,CU,CW,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,SZ,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GH,GI,GR,GL,GD,GP,GU,GT,GG,GN,GW,GY,HT,HM,VA,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IM,IL,IT,JM,JP,JE,JO,KZ,KE,KI,KP,KR,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,MX,FM,MD,MC,MN,ME,MS,MA,MZ,MM,NA,NR,NP,NL,NC,NZ,NI,NE,NG,NU,NF,MP,NO,OM,PK,PW,PS,PA,PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,BL,SH,KN,LC,MF,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SG,SX,SK,SI,SB,SO,ZA,GS,SS,ES,LK,SD,SR,SJ,SE,CH,SY,TW,TJ,TZ,TH,TL,TG,TK,TO,TT,TN,TR,TM,TC,TV,UG,UA,AE,GB,US,UM,UY,UZ,VU,VE,VN,VG,VI,WF,EH,YE,ZM,ZW", currency = "AFN,DZD,ARS,AMD,AWG,AUD,AZN,BSD,BHD,THB,PAB,BBD,BYN,BZD,BMD,BOB,BRL,BND,BGN,BIF,CVE,CAD,CLP,COP,KMF,CDF,NIO,CRC,CUP,CZK,GMD,DKK,MKD,DJF,DOP,VND,XCD,EGP,SVC,ETB,EUR,FKP,FJD,HUF,GHS,GIP,HTG,PYG,GNF,GYD,HKD,UAH,ISK,INR,IRR,IQD,JMD,JOD,KES,PGK,HRK,KWD,AOA,MMK,LAK,GEL,LBP,ALL,HNL,SLL,LRD,LYD,SZL,LSL,MGA,MWK,MYR,MUR,MXN,MDL,MAD,MZN,NGN,ERN,NAD,NPR,ANG,ILS,TWD,NZD,BTN,KPW,NOK,TOP,PKR,MOP,UYU,PHP,GBP,BWP,QAR,GTQ,ZAR,OMR,KHR,RON,MVR,IDR,RUB,RWF,SHP,SAR,RSD,SCR,SGD,PEN,SBD,KGS,SOS,TJS,SSP,LKR,SDG,SRD,SEK,CHF,SYP,BDT,WST,TZS,KZT,TTD,MNT,TND,TRY,TMT,AED,UGX,USD,UZS,VUV,KRW,YER,JPY,CNY,ZMW,ZWL,PLN,CLF,STD,CUC" } debit = { country = "AF,AX,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BQ,BA,BW,BV,BR,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CL,CN,CX,CC,CO,KM,CG,CD,CK,CR,CI,HR,CU,CW,CY,CZ,DK,DJ,DM,DO,EC,EG,SV,GQ,ER,EE,SZ,ET,FK,FO,FJ,FI,FR,GF,PF,TF,GA,GM,GE,DE,GH,GI,GR,GL,GD,GP,GU,GT,GG,GN,GW,GY,HT,HM,VA,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IM,IL,IT,JM,JP,JE,JO,KZ,KE,KI,KP,KR,KW,KG,LA,LV,LB,LS,LR,LY,LI,LT,LU,MO,MK,MG,MW,MY,MV,ML,MT,MH,MQ,MR,MU,YT,MX,FM,MD,MC,MN,ME,MS,MA,MZ,MM,NA,NR,NP,NL,NC,NZ,NI,NE,NG,NU,NF,MP,NO,OM,PK,PW,PS,PA,PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,BL,SH,KN,LC,MF,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SG,SX,SK,SI,SB,SO,ZA,GS,SS,ES,LK,SD,SR,SJ,SE,CH,SY,TW,TJ,TZ,TH,TL,TG,TK,TO,TT,TN,TR,TM,TC,TV,UG,UA,AE,GB,US,UM,UY,UZ,VU,VE,VN,VG,VI,WF,EH,YE,ZM,ZW", currency = "AFN,DZD,ARS,AMD,AWG,AUD,AZN,BSD,BHD,THB,PAB,BBD,BYN,BZD,BMD,BOB,BRL,BND,BGN,BIF,CVE,CAD,CLP,COP,KMF,CDF,NIO,CRC,CUP,CZK,GMD,DKK,MKD,DJF,DOP,VND,XCD,EGP,SVC,ETB,EUR,FKP,FJD,HUF,GHS,GIP,HTG,PYG,GNF,GYD,HKD,UAH,ISK,INR,IRR,IQD,JMD,JOD,KES,PGK,HRK,KWD,AOA,MMK,LAK,GEL,LBP,ALL,HNL,SLL,LRD,LYD,SZL,LSL,MGA,MWK,MYR,MUR,MXN,MDL,MAD,MZN,NGN,ERN,NAD,NPR,ANG,ILS,TWD,NZD,BTN,KPW,NOK,TOP,PKR,MOP,UYU,PHP,GBP,BWP,QAR,GTQ,ZAR,OMR,KHR,RON,MVR,IDR,RUB,RWF,SHP,SAR,RSD,SCR,SGD,PEN,SBD,KGS,SOS,TJS,SSP,LKR,SDG,SRD,SEK,CHF,SYP,BDT,WST,TZS,KZT,TTD,MNT,TND,TRY,TMT,AED,UGX,USD,UZS,VUV,KRW,YER,JPY,CNY,ZMW,ZWL,PLN,CLF,STD,CUC" } eps = { country = "AT", currency = "EUR" } giropay = { country = "DE", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } sofort = { country = "AT,BE,DE,ES,IT,NL", currency = "EUR" } [pm_filters.jpmorgan] debit = { country = "CA, GB, US, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE", currency = "USD, EUR, GBP, AUD, NZD, SGD, CAD, JPY, HKD, KRW, TWD, MXN, BRL, DKK, NOK, ZAR, SEK, CHF, CZK, PLN, TRY, AFN, ALL, DZD, AOA, ARS, AMD, AWG, AZN, BSD, BDT, BBD, BYN, BZD, BMD, BOB, BAM, BWP, BND, BGN, BIF, BTN, XOF, XAF, XPF, KHR, CVE, KYD, CLP, CNY, COP, KMF, CDF, CRC, HRK, DJF, DOP, XCD, EGP, ETB, FKP, FJD, GMD, GEL, GHS, GIP, GTQ, GYD, HTG, HNL, HUF, ISK, INR, IDR, ILS, JMD, KZT, KES, LAK, LBP, LSL, LRD, MOP, MKD, MGA, MWK, MYR, MVR, MRU, MUR, MDL, MNT, MAD, MZN, MMK, NAD, NPR, ANG, PGK, NIO, NGN, PKR, PAB, PYG, PEN, PHP, QAR, RON, RWF, SHP, WST, STN, SAR, RSD, SCR, SLL, SBD, SOS, LKR, SRD, SZL, TJS, TZS, THB, TOP, TTD, UGX, UAH, AED, UYU, UZS, VUV, VND, YER, ZMW" } credit = { country = "CA, GB, US, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE", currency = "USD, EUR, GBP, AUD, NZD, SGD, CAD, JPY, HKD, KRW, TWD, MXN, BRL, DKK, NOK, ZAR, SEK, CHF, CZK, PLN, TRY, AFN, ALL, DZD, AOA, ARS, AMD, AWG, AZN, BSD, BDT, BBD, BYN, BZD, BMD, BOB, BAM, BWP, BND, BGN, BIF, BTN, XOF, XAF, XPF, KHR, CVE, KYD, CLP, CNY, COP, KMF, CDF, CRC, HRK, DJF, DOP, XCD, EGP, ETB, FKP, FJD, GMD, GEL, GHS, GIP, GTQ, GYD, HTG, HNL, HUF, ISK, INR, IDR, ILS, JMD, KZT, KES, LAK, LBP, LSL, LRD, MOP, MKD, MGA, MWK, MYR, MVR, MRU, MUR, MDL, MNT, MAD, MZN, MMK, NAD, NPR, ANG, PGK, NIO, NGN, PKR, PAB, PYG, PEN, PHP, QAR, RON, RWF, SHP, WST, STN, SAR, RSD, SCR, SLL, SBD, SOS, LKR, SRD, SZL, TJS, TZS, THB, TOP, TTD, UGX, UAH, AED, UYU, UZS, VUV, VND, YER, ZMW" } [pm_filters.bitpay] crypto_currency = { country = "US, CA, GB, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE", currency = "USD, AUD, CAD, GBP, MXN, NZD, CHF, EUR"} [pm_filters.paybox] debit = { country = "FR", currency = "CAD, AUD, EUR, USD" } credit = { country = "FR", currency = "CAD, AUD, EUR, USD" } [pm_filters.digitalvirgo] direct_carrier_billing = {country = "MA, CM, ZA, EG, SN, DZ, TN, ML, GN, GH, LY, GA, CG, MG, BW, SD, NG, ID, SG, AZ, TR, FR, ES, PL, GB, PT, DE, IT, BE, IE, SK, GR, NL, CH, BR, MX, AR, CL, AE, IQ, KW, BH, SA, QA, PS, JO, OM, RU" , currency = "MAD, XOF, XAF, ZAR, EGP, DZD, TND, GNF, GHS, LYD, XAF, CDF, MGA, BWP, SDG, NGN, IDR, SGD, RUB, AZN, TRY, EUR, PLN, GBP, CHF, BRL, MXN, ARS, CLP, AED, IQD, KWD, BHD, SAR, QAR, ILS, JOD, OMR" } [pm_filters.payu] debit = { country = "AE, AF, AL, AM, CW, AO, AR, AU, AW, AZ, BA, BB, BG, BH, BI, BM, BN, BO, BR, BS, BW, BY, BZ, CA, CD, LI, CL, CN, CO, CR, CV, CZ, DJ, DK, DO, DZ, EG, ET, AD, FJ, FK, GG, GE, GH, GI, GM, GN, GT, GY, HK, HN, HR, HT, HU, ID, IL, IQ, IS, JM, JO, JP, KG, KH, KM, KR, KW, KY, KZ, LA, LB, LR, LS, MA, MD, MG, MK, MN, MO, MR, MV, MW, MX, MY, MZ, NA, NG, NI, BV, CK, OM, PA, PE, PG, PL, PY, QA, RO, RS, RW, SA, SB, SC, SE, SG, SH, SO, SR, SV, SZ, TH, TJ, TM, TN, TO, TR, TT, TW, TZ, UG, AS, UY, UZ, VE, VN, VU, WS, CM, AI, BJ, PF, YE, ZA, ZM, ZW", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IQD, ISK, JMD, JOD, JPY, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LRD, LSL, MAD, MDL, MGA, MKD, MNT, MOP, MRU, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NZD, OMR, PAB, PEN, PGK, PLN, PYG, QAR, RON, RSD, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SOS, SRD, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL" } credit = { country = "AE, AF, AL, AM, CW, AO, AR, AU, AW, AZ, BA, BB, BG, BH, BI, BM, BN, BO, BR, BS, BW, BY, BZ, CA, CD, LI, CL, CN, CO, CR, CV, CZ, DJ, DK, DO, DZ, EG, ET, AD, FJ, FK, GG, GE, GH, GI, GM, GN, GT, GY, HK, HN, HR, HT, HU, ID, IL, IQ, IS, JM, JO, JP, KG, KH, KM, KR, KW, KY, KZ, LA, LB, LR, LS, MA, MD, MG, MK, MN, MO, MR, MV, MW, MX, MY, MZ, NA, NG, NI, BV, CK, OM, PA, PE, PG, PL, PY, QA, RO, RS, RW, SA, SB, SC, SE, SG, SH, SO, SR, SV, SZ, TH, TJ, TM, TN, TO, TR, TT, TW, TZ, UG, AS, UY, UZ, VE, VN, VU, WS, CM, AI, BJ, PF, YE, ZA, ZM, ZW", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IQD, ISK, JMD, JOD, JPY, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LRD, LSL, MAD, MDL, MGA, MKD, MNT, MOP, MRU, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NZD, OMR, PAB, PEN, PGK, PLN, PYG, QAR, RON, RSD, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SOS, SRD, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL" } google_pay = { country = "AE, AF, AL, AM, CW, AO, AR, AU, AW, AZ, BA, BB, BG, BH, BI, BM, BN, BO, BR, BS, BW, BY, BZ, CA, CD, LI, CL, CN, CO, CR, CV, CZ, DJ, DK, DO, DZ, EG, ET, AD, FJ, FK, GG, GE, GH, GI, GM, GN, GT, GY, HK, HN, HR, HT, HU, ID, IL, IQ, IS, JM, JO, JP, KG, KH, KM, KR, KW, KY, KZ, LA, LB, LR, LS, MA, MD, MG, MK, MN, MO, MR, MV, MW, MX, MY, MZ, NA, NG, NI, BV, CK, OM, PA, PE, PG, PL, PY, QA, RO, RS, RW, SA, SB, SC, SE, SG, SH, SO, SR, SV, SZ, TH, TJ, TM, TN, TO, TR, TT, TW, TZ, UG, AS, UY, UZ, VE, VN, VU, WS, CM, AI, BJ, PF, YE, ZA, ZM, ZW", currency = "AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BWP, BYN, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IQD, ISK, JMD, JOD, JPY, KGS, KHR, KMF, KRW, KWD, KYD, KZT, LAK, LBP, LRD, LSL, MAD, MDL, MGA, MKD, MNT, MOP, MRU, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NZD, OMR, PAB, PEN, PGK, PLN, PYG, QAR, RON, RSD, RWF, SAR, SBD, SCR, SEK, SGD, SHP, SOS, SRD, SVC, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL" } [pm_filters.klarna] klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "AUD,EUR,EUR,CAD,CZK,DKK,EUR,EUR,EUR,EUR,EUR,EUR,EUR,NZD,NOK,PLN,EUR,EUR,SEK,CHF,GBP,USD" } [pm_filters.mifinity] mifinity = { country = "BR,CN,SG,MY,DE,CH,DK,GB,ES,AD,GI,FI,FR,GR,HR,IT,JP,MX,AR,CO,CL,PE,VE,UY,PY,BO,EC,GT,HN,SV,NI,CR,PA,DO,CU,PR,NL,NO,PL,PT,SE,RU,TR,TW,HK,MO,AX,AL,DZ,AS,AO,AI,AG,AM,AW,AU,AT,AZ,BS,BH,BD,BB,BE,BZ,BJ,BM,BT,BQ,BA,BW,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,CX,CC,KM,CG,CK,CI,CW,CY,CZ,DJ,DM,EG,GQ,ER,EE,ET,FK,FO,FJ,GF,PF,TF,GA,GM,GE,GH,GL,GD,GP,GU,GG,GN,GW,GY,HT,HM,VA,IS,IN,ID,IE,IM,IL,JE,JO,KZ,KE,KI,KW,KG,LA,LV,LB,LS,LI,LT,LU,MK,MG,MW,MV,ML,MT,MH,MQ,MR,MU,YT,FM,MD,MC,MN,ME,MS,MA,MZ,NA,NR,NP,NC,NZ,NE,NG,NU,NF,MP,OM,PK,PW,PS,PG,PH,PN,QA,RE,RO,RW,BL,SH,KN,LC,MF,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SX,SK,SI,SB,SO,ZA,GS,KR,LK,SR,SJ,SZ,TH,TL,TG,TK,TO,TT,TN,TM,TC,TV,UG,UA,AE,UZ,VU,VN,VG,VI,WF,EH,ZM", currency = "AUD,CAD,CHF,CNY,CZK,DKK,EUR,GBP,INR,JPY,NOK,NZD,PLN,RUB,SEK,ZAR,USD,EGP,UYU,UZS" } [pm_filters.zen] credit = { not_available_flows = { capture_method = "manual" } } debit = { not_available_flows = { capture_method = "manual" } } boleto = { country = "BR", currency = "BRL" } efecty = { country = "CO", currency = "COP" } multibanco = { country = "PT", currency = "EUR" } pago_efectivo = { country = "PE", currency = "PEN" } pse = { country = "CO", currency = "COP" } pix = { country = "BR", currency = "BRL" } red_compra = { country = "CL", currency = "CLP" } red_pagos = { country = "UY", currency = "UYU" } [pm_filters.zsl] local_bank_transfer = { country = "CN", currency = "CNY" } [pm_filters.aci] credit = { not_available_flows = { capture_method = "manual" } } debit = { not_available_flows = { capture_method = "manual" } } [pm_filters.mollie] credit = { not_available_flows = { capture_method = "manual" } } debit = { not_available_flows = { capture_method = "manual" } } eps = { country = "AT", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } przelewy24 = { country = "PL", currency = "PLN,EUR" } [pm_filters.multisafepay] credit = { not_available_flows = { capture_method = "manual" } } debit = { not_available_flows = { capture_method = "manual" } } [pm_filters.redsys] credit = { currency = "AUD,BGN,CAD,CHF,COP,CZK,DKK,EUR,GBP,HRK,HUF,ILS,INR,JPY,MYR,NOK,NZD,PEN,PLN,RUB,SAR,SEK,SGD,THB,USD,ZAR", country="ES" } debit = { currency = "AUD,BGN,CAD,CHF,COP,CZK,DKK,EUR,GBP,HRK,HUF,ILS,INR,JPY,MYR,NOK,NZD,PEN,PLN,RUB,SAR,SEK,SGD,THB,USD,ZAR", country="ES" } [pm_filters.stax] credit = { currency = "USD" } debit = { currency = "USD" } ach = { currency = "USD" } [pm_filters.prophetpay] card_redirect = { currency = "USD" } [pm_filters.trustpay] credit = { not_available_flows = { capture_method = "manual" } } debit = { not_available_flows = { capture_method = "manual" } } instant_bank_transfer = { country = "CZ,SK,GB,AT,DE,IT", currency = "CZK, EUR, GBP" } sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,GB", currency = "EUR" } [pm_filters.authorizedotnet] google_pay = { currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" } paypal = { currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" } [pm_filters.worldpay] debit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" } credit = { country = "AF,DZ,AW,AU,AZ,BS,BH,BD,BB,BZ,BM,BT,BO,BA,BW,BR,BN,BG,BI,KH,CA,CV,KY,CL,CO,KM,CD,CR,CZ,DK,DJ,ST,DO,EC,EG,SV,ER,ET,FK,FJ,GM,GE,GH,GI,GT,GN,GY,HT,HN,HK,HU,IS,IN,ID,IR,IQ,IE,IL,IT,JM,JP,JO,KZ,KE,KW,LA,LB,LS,LR,LY,LT,MO,MK,MG,MW,MY,MV,MR,MU,MX,MD,MN,MA,MZ,MM,NA,NZ,NI,NG,KP,NO,AR,PK,PG,PY,PE,UY,PH,PL,GB,QA,OM,RO,RU,RW,WS,SG,ST,ZA,KR,LK,SH,SD,SR,SZ,SE,CH,SY,TW,TJ,TZ,TH,TT,TN,TR,UG,UA,US,UZ,VU,VE,VN,ZM,ZW", currency = "AFN,DZD,ANG,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BZD,BMD,BTN,BOB,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XOF,XAF,XPF,CLP,COP,KMF,CDF,CRC,EUR,CZK,DKK,DJF,DOP,XCD,EGP,SVC,ERN,ETB,EUR,FKP,FJD,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,NZD,NIO,NGN,KPW,NOK,ARS,PKR,PAB,PGK,PYG,PEN,UYU,PHP,PLN,GBP,QAR,OMR,RON,RUB,RWF,WST,SAR,RSD,SCR,SLL,SGD,STN,SBD,SOS,ZAR,KRW,LKR,SHP,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,AED,UGX,UAH,USD,UZS,VUV,VND,YER,CNY,ZMW,ZWL" } google_pay = { country = "AL,DZ,AS,AO,AG,AR,AU,AT,AZ,BH,BY,BE,BR,BG,CA,CL,CO,HR,CZ,DK,DO,EG,EE,FI,FR,DE,GR,HK,HU,IN,ID,IE,IL,IT,JP,JO,KZ,KE,KW,LV,LB,LT,LU,MY,MX,NL,NZ,NO,OM,PK,PA,PE,PH,PL,PT,QA,RO,RU,SA,SG,SK,ZA,ES,LK,SE,CH,TW,TH,TR,UA,AE,GB,US,UY,VN" } apple_pay = { country = "AU,CN,HK,JP,MO,MY,NZ,SG,TW,AM,AT,AZ,BY,BE,BG,HR,CY,CZ,DK,EE,FO,FI,FR,GE,DE,GR,GL,GG,HU,IS,IE,IM,IT,KZ,JE,LV,LI,LT,LU,MT,MD,MC,ME,NL,NO,PL,PT,RO,SM,RS,SK,SI,ES,SE,CH,UA,GB,AR,CO,CR,BR,MX,PE,BH,IL,JO,KW,PS,QA,SA,AE,CA,UM,US" } [file_upload_config] bucket_name = "" region = "" [pm_filters.forte] credit = { currency = "USD" } debit = { currency = "USD" } [pm_filters.fiuu] duit_now = { country = "MY", currency = "MYR" } apple_pay = { country = "MY", currency = "MYR" } google_pay = { country = "MY", currency = "MYR" } [pm_filters.dlocal] credit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"} debit = {country = "AR,BD,BO,BR,CM,CL,CN,CO,CR,DO,EC,SV,EG,GH,GT,HN,IN,ID,CI,JP,KE,MY,MX,MA,NI,NG,PK,PA,PY,PE,PH,RW,SA,SN,ZA,TZ,TH,TR,UG,UY,VN,ZM", currency = "ARS,BDT,BOB,BRL,XAF,CLP,CNY,COP,CRC,DOP,USD,EGP,GHS,GTQ,HNL,INR,IDR,XOF,JPY,KES,MYR,MXN,MAD,NIO,NGN,PKR,PYG,PEN,PHP,RWF,SAR,XOF,ZAR,TZS,THB,TRY,UGX,UYU,VND,ZMW"} [pm_filters.inespay] sepa = { currency = "EUR" } [pm_filters.rapyd] apple_pay = { country = "AL,AS,AD,AR,AM,AU,AT,AZ,BH,BE,BM,BA,BR,BG,CA,KH,KY,CL,CO,CR,HR,CY,CZ,DK,DO,EC,SV,EE,FO,FI,FR,GE,DE,GI,GR,GL,GU,GT,GG,HN,HK,HU,IS,IE,IM,IL,IT,JP,KZ,KG,KW,LV,LI,LT,LU,MO,MY,MT,MX,MD,MC,ME,MA,NL,NZ,NI,MK,MP,NO,PA,PY,PR,PE,PL,PT,QA,RO,SM,RS,SG,SK,SI,ZA,ES,SE,CH,TW,TJ,TH,UA,AE,GB,US,UY,VI,VN", currency = "EUR,GBP,ISK,USD" } google_pay = { country = "AM,AT,AU,AZ,BA,BE,BG,BY,CA,CH,CL,CN,CO,CR,CY,CZ,DE,DK,DO,EC,EE,EG,ES,FI,FR,GB,GE,GL,GR,GT,HK,HN,HR,HU,IE,IL,IM,IS,IT,JE,JP,JO,KZ,KW,LA,LI,LT,LU,LV,MA,MC,MD,ME,MO,MN,MT,MX,MY,NC,NL,NO,NZ,OM,PA,PE,PL,PR,PT,QA,RO,RS,SA,SE,SG,SI,SK,SM,SV,TH,TW,UA,US,UY,VA,VN,ZA", currency = "EUR,GBP,ISK,USD" } credit = { country = "AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AUD,BDT,BGN,BND,BOB,BRL,BWP,CAD,CHF,CNY,COP,CZK,DKK,EGP,EUR,FJD,GBP,GEL,GHS,HKD,HRK,HUF,IDR,ILS,INR,IQD,IRR,ISK,JPY,KES,KRW,KWD,KZT,LAK,LKR,MAD,MDL,MMK,MOP,MXN,MYR,MZN,NAD,NGN,NOK,NPR,NZD,PEN,PHP,PKR,PLN,QAR,RON,RSD,RUB,RWF,SAR,SCR,SEK,SGD,SLL,THB,TRY,TWD,TZS,UAH,UGX,USD,UYU,VND,XAF,XOF,ZAR,ZMW,MWK" } debit = { country = "AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AUD,BDT,BGN,BND,BOB,BRL,BWP,CAD,CHF,CNY,COP,CZK,DKK,EGP,EUR,FJD,GBP,GEL,GHS,HKD,HRK,HUF,IDR,ILS,INR,IQD,IRR,ISK,JPY,KES,KRW,KWD,KZT,LAK,LKR,MAD,MDL,MMK,MOP,MXN,MYR,MZN,NAD,NGN,NOK,NPR,NZD,PEN,PHP,PKR,PLN,QAR,RON,RSD,RUB,RWF,SAR,SCR,SEK,SGD,SLL,THB,TRY,TWD,TZS,UAH,UGX,USD,UYU,VND,XAF,XOF,ZAR,ZMW,MWK" } [pm_filters.bamboraapac] credit = { country = "AD,AE,AG,AL,AM,AO,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BJ,BN,BO,BR,BS,BT,BW,BY,BZ,CA,CD,CF,CG,CH,CI,CL,CM,CN,CO,CR,CV,CY,CZ,DE,DK,DJ,DM,DO,DZ,EC,EE,EG,ER,ES,ET,FI,FJ,FM,FR,GA,GB,GD,GE,GG,GH,GM,GN,GQ,GR,GT,GW,GY,HN,HR,HT,HU,ID,IE,IL,IN,IS,IT,JM,JP,JO,KE,KG,KH,KI,KM,KN,KR,KW,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,MA,MC,MD,ME,MG,MH,MK,ML,MM,MN,MR,MT,MU,MV,MW,MX,MY,MZ,NA,NE,NG,NI,NL,NO,NP,NR,NZ,OM,PA,PE,PG,PH,PK,PL,PS,PT,PW,PY,QA,RO,RS,RW,SA,SB,SC,SE,SG,SI,SK,SL,SM,SN,SO,SR,SS,ST,SV,SZ,TD,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TZ,UA,UG,US,UY,UZ,VA,VC,VE,VN,VU,WS,ZA,ZM,ZW", currency = "AED,AUD,BDT,BGN,BND,BOB,BRL,BWP,CAD,CHF,CNY,COP,CZK,DKK,EGP,EUR,FJD,GBP,GEL,GHS,HKD,HRK,HUF,IDR,ILS,INR,IQD,IRR,ISK,JPY,KES,KRW,KWD,KZT,LAK,LKR,MAD,MDL,MMK,MOP,MXN,MYR,MZN,NAD,NGN,NOK,NPR,NZD,PEN,PHP,PKR,PLN,QAR,RON,RSD,RUB,RWF,SAR,SCR,SEK,SGD,SLL,THB,TRY,TWD,TZS,UAH,UGX,USD,UYU,VND,XAF,XOF,ZAR,ZMW,MWK" } debit = { country = "AD,AE,AG,AL,AM,AO,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BJ,BN,BO,BR,BS,BT,BW,BY,BZ,CA,CD,CF,CG,CH,CI,CL,CM,CN,CO,CR,CV,CY,CZ,DE,DK,DJ,DM,DO,DZ,EC,EE,EG,ER,ES,ET,FI,FJ,FM,FR,GA,GB,GD,GE,GG,GH,GM,GN,GQ,GR,GT,GW,GY,HN,HR,HT,HU,ID,IE,IL,IN,IS,IT,JM,JP,JO,KE,KG,KH,KI,KM,KN,KR,KW,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,MA,MC,MD,ME,MG,MH,MK,ML,MM,MN,MR,MT,MU,MV,MW,MX,MY,MZ,NA,NE,NG,NI,NL,NO,NP,NR,NZ,OM,PA,PE,PG,PH,PK,PL,PS,PT,PW,PY,QA,RO,RS,RW,SA,SB,SC,SE,SG,SI,SK,SL,SM,SN,SO,SR,SS,ST,SV,SZ,TD,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TZ,UA,UG,US,UY,UZ,VA,VC,VE,VN,VU,WS,ZA,ZM,ZW", currency = "AED,AUD,BDT,BGN,BND,BOB,BRL,BWP,CAD,CHF,CNY,COP,CZK,DKK,EGP,EUR,FJD,GBP,GEL,GHS,HKD,HRK,HUF,IDR,ILS,INR,IQD,IRR,ISK,JPY,KES,KRW,KWD,KZT,LAK,LKR,MAD,MDL,MMK,MOP,MXN,MYR,MZN,NAD,NGN,NOK,NPR,NZD,PEN,PHP,PKR,PLN,QAR,RON,RSD,RUB,RWF,SAR,SCR,SEK,SGD,SLL,THB,TRY,TWD,TZS,UAH,UGX,USD,UYU,VND,XAF,XOF,ZAR,ZMW,MWK" } [pm_filters.gocardless] ach = { country = "US", currency = "USD" } becs = { country = "AU", currency = "AUD" } sepa = { country = "AU,AT,BE,BG,CA,HR,CY,CZ,DK,FI,FR,DE,HU,IT,LU,MT,NL,NZ,NO,PL,PT,IE,RO,SK,SI,ZA,ES,SE,CH,GB", currency = "GBP,EUR,SEK,DKK,AUD,NZD,CAD" } [pm_filters.powertranz] credit = { country = "AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "BBD,BMD,BSD,CRC,GTQ,HNL,JMD,KYD,TTD,USD" } debit = { country = "AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "BBD,BMD,BSD,CRC,GTQ,HNL,JMD,KYD,TTD,USD" } [pm_filters.worldline] giropay = { country = "DE", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } credit = { country = "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } debit = { country = "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } [pm_filters.shift4] eps = { country = "AT", currency = "EUR" } giropay = { country = "DE", currency = "EUR" } ideal = { country = "NL", currency = "EUR" } sofort = { country = "AT,BE,CH,DE,ES,FI,FR,GB,IT,NL,PL,SE", currency = "CHF,EUR" } credit = { country = "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } debit = { country = "AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BH,BI,BJ,BL,BM,BN,BO,BQ,BR,BS,BT,BV,BW,BY,BZ,CA,CC,CD,CF,CG,CH,CI,CK,CL,CM,CN,CO,CR,CU,CV,CW,CX,CY,CZ,DE,DJ,DK,DM,DO,DZ,EC,EE,EG,EH,ER,ES,ET,FI,FJ,FK,FM,FO,FR,GA,GB,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GR,GT,GU,GW,GY,HK,HM,HN,HR,HT,HU,ID,IE,IL,IM,IN,IO,IQ,IR,IS,IT,JE,JM,JO,JP,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LT,LU,LV,LY,MA,MC,MD,ME,MF,MG,MH,MK,ML,MM,MN,MO,MP,MQ,MR,MS,MT,MU,MV,MW,MX,MY,MZ,NA,NC,NE,NF,NG,NI,NL,NO,NP,NR,NU,NZ,OM,PA,PE,PF,PG,PH,PK,PL,PM,PN,PR,PS,PT,PW,PY,QA,RE,RO,RS,RU,RW,SA,SB,SC,SD,SE,SG,SH,SI,SJ,SK,SL,SM,SN,SO,SR,SS,ST,SV,SX,SY,SZ,TC,TD,TF,TG,TH,TJ,TL,TM,TN,TO,TR,TT,TV,TW,TZ,UA,UG,UM,US,UY,UZ,VA,VC,VE,VG,VI,VN,VU,WF,WS,YE,YT,ZA,ZM,ZW", currency = "AED,AFN,ALL,AMD,ANG,AOA,ARS,AUD,AWG,AZN,BAM,BBD,BDT,BGN,BHD,BIF,BMD,BND,BOB,BRL,BSD,BTN,BWP,BYN,BZD,CAD,CDF,CHF,CLP,CNY,COP,CRC,CUP,CVE,CZK,DJF,DKK,DOP,DZD,EGP,ERN,ETB,EUR,FJD,FKP,GBP,GEL,GHS,GIP,GMD,GNF,GTQ,GYD,HKD,HNL,HRK,HTG,HUF,IDR,ILS,INR,IQD,IRR,ISK,JMD,JOD,JPY,KES,KGS,KHR,KMF,KPW,KRW,KWD,KYD,KZT,LAK,LBP,LKR,LRD,LSL,LYD,MAD,MDL,MGA,MKD,MMK,MNT,MOP,MRU,MUR,MVR,MWK,MXN,MYR,MZN,NAD,NGN,NIO,NOK,NPR,NZD,OMR,PAB,PEN,PGK,PHP,PKR,PLN,PYG,QAR,RON,RSD,RUB,RWF,SAR,SBD,SCR,SDG,SEK,SGD,SHP,SLL,SOS,SRD,SSP,SVC,SYP,SZL,THB,TJS,TMT,TND,TOP,TRY,TTD,TWD,TZS,UAH,UGX,USD,UYU,UZS,VND,VUV,WST,XAF,XCD,XOF,XPF,YER,ZAR,ZMW,ZWL" } [tokenization] stripe = { long_lived_token = false, payment_method = "wallet", payment_method_type = { type = "disable_only", list = "google_pay" } } checkout = { long_lived_token = false, payment_method = "wallet", apple_pay_pre_decrypt_flow = "network_tokenization" } stax = { long_lived_token = true, payment_method = "card,bank_debit" } mollie = { long_lived_token = false, payment_method = "card" } square = { long_lived_token = false, payment_method = "card" } hipay = { long_lived_token = false, payment_method = "card" } braintree = { long_lived_token = false, payment_method = "card" } payme = { long_lived_token = false, payment_method = "card" } gocardless = { long_lived_token = true, payment_method = "bank_debit" } billwerk = { long_lived_token = false, payment_method = "card" } [temp_locker_enable_config] stripe = { payment_method = "bank_transfer" } nuvei = { payment_method = "card" } shift4 = { payment_method = "card" } bluesnap = { payment_method = "card" } bankofamerica = { payment_method = "card" } cybersource = { payment_method = "card" } nmi = { payment_method = "card" } payme = { payment_method = "card" } deutschebank = { payment_method = "bank_debit" } paybox = { payment_method = "card" } nexixpay = { payment_method = "card" } redsys = { payment_method = "card" } [connector_customer] connector_list = "gocardless,stax,stripe" payout_connector_list = "nomupay,stripe,wise" [dummy_connector] enabled = true payment_ttl = 172800 payment_duration = 1000 payment_tolerance = 100 payment_retrieve_duration = 500 payment_retrieve_tolerance = 100 payment_complete_duration = 500 payment_complete_tolerance = 100 refund_ttl = 172800 refund_duration = 1000 refund_tolerance = 100 refund_retrieve_duration = 500 refund_retrieve_tolerance = 100 authorize_ttl = 36000 assets_base_url = "https://app.hyperswitch.io/assets/TestProcessor/" default_return_url = "https://app.hyperswitch.io/" slack_invite_url = "https://join.slack.com/t/hyperswitch-io/shared_invite/zt-2awm23agh-p_G5xNpziv6yAiedTkkqLg" discord_invite_url = "https://discord.gg/wJZ7DVW8mm" [delayed_session_response] connectors_with_delayed_session_response = "trustpay,payme" [webhook_source_verification_call] connectors_with_webhook_source_verification_call = "paypal" [billing_connectors_payment_sync] billing_connectors_which_require_payment_sync = "stripebilling, recurly" [mandates.supported_payment_methods] bank_debit.ach = { connector_list = "gocardless,adyen,stripe" } bank_debit.becs = { connector_list = "gocardless,stripe,adyen" } bank_debit.bacs = { connector_list = "stripe,gocardless" } bank_debit.sepa = { connector_list = "gocardless,adyen,stripe,deutschebank" } card.credit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit" card.debit.connector_list = "stripe,adyen,authorizedotnet,cybersource,datatrans,globalpay,worldpay,multisafepay,nmi,nexinets,noon,bankofamerica,braintree,nuvei,payme,wellsfargo,bamboraapac,elavon,fiuu,nexixpay,novalnet,paybox,paypal,xendit" pay_later.klarna.connector_list = "adyen" wallet.apple_pay.connector_list = "stripe,adyen,cybersource,noon,bankofamerica,nexinets,novalnet,authorizedotnet" wallet.samsung_pay.connector_list = "cybersource" wallet.google_pay.connector_list = "stripe,adyen,cybersource,bankofamerica,noon,globalpay,multisafepay,novalnet,authorizedotnet" wallet.paypal.connector_list = "adyen,globalpay,nexinets,novalnet,paypal" wallet.momo.connector_list = "adyen" wallet.kakao_pay.connector_list = "adyen" wallet.go_pay.connector_list = "adyen" wallet.gcash.connector_list = "adyen" wallet.dana.connector_list = "adyen" wallet.twint.connector_list = "adyen" wallet.vipps.connector_list = "adyen" bank_redirect.ideal.connector_list = "stripe,adyen,globalpay,multisafepay,nexinets" bank_redirect.sofort.connector_list = "stripe,globalpay" bank_redirect.giropay.connector_list = "globalpay,multisafepay,nexinets" bank_redirect.bancontact_card.connector_list = "adyen,stripe" bank_redirect.trustly.connector_list = "adyen" bank_redirect.open_banking_uk.connector_list = "adyen" bank_redirect.eps.connector_list = "globalpay,nexinets" [mandates.update_mandate_supported] card.credit = { connector_list = "cybersource" } card.debit = { connector_list = "cybersource" } [network_transaction_id_supported_connectors] connector_list = "adyen,cybersource,novalnet,stripe,worldpay" [connector_request_reference_id_config] merchant_ids_send_payment_id_as_connector_request_id = [] [payouts] payout_eligibility = true [applepay_decrypt_keys] apple_pay_ppc = "APPLE_PAY_PAYMENT_PROCESSING_CERTIFICATE" apple_pay_ppc_key = "APPLE_PAY_PAYMENT_PROCESSING_CERTIFICATE_KEY" apple_pay_merchant_cert = "APPLE_PAY_MERCHNAT_CERTIFICATE" apple_pay_merchant_cert_key = "APPLE_PAY_MERCHNAT_CERTIFICATE_KEY" [paze_decrypt_keys] paze_private_key = "PAZE_PRIVATE_KEY" paze_private_key_passphrase = "PAZE_PRIVATE_KEY_PASSPHRASE" [google_pay_decrypt_keys] google_pay_root_signing_keys = "GOOGLE_PAY_ROOT_SIGNING_KEYS" # Base 64 Encoded Root Signing Keys provided by Google Pay (https://developers.google.com/pay/api/web/guides/resources/payment-data-cryptography) [generic_link] [generic_link.payment_method_collect] sdk_url = "http://localhost:9050/HyperLoader.js" expiry = 900 [generic_link.payment_method_collect.ui_config] theme = "#4285F4" logo = "https://app.hyperswitch.io/HyperswitchFavicon.png" merchant_name = "HyperSwitch" [generic_link.payment_method_collect.enabled_payment_methods] card = "credit,debit" bank_transfer = "ach,bacs,sepa" wallet = "paypal,pix,venmo" [generic_link.payout_link] sdk_url = "http://localhost:9050/HyperLoader.js" expiry = 900 [generic_link.payout_link.ui_config] theme = "#4285F4" logo = "https://app.hyperswitch.io/HyperswitchFavicon.png" merchant_name = "HyperSwitch" [generic_link.payout_link.enabled_payment_methods] card = "credit,debit" [payout_method_filters.adyenplatform] sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH", currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" } [payout_method_filters.stripe] ach = { country = "US", currency = "USD" } [payment_link] sdk_url = "http://localhost:9050/HyperLoader.js" [payment_method_auth] redis_expiry = 900 pm_auth_key = "Some_pm_auth_key" [lock_settings] redis_lock_expiry_seconds = 180 # 3 * 60 seconds delay_between_retries_in_milliseconds = 500 [kv_config] ttl = 900 # 15 * 60 seconds soft_kill = false [frm] enabled = true [events] source = "logs" [events.kafka] brokers = ["localhost:9092"] fraud_check_analytics_topic = "hyperswitch-fraud-check-events" intent_analytics_topic = "hyperswitch-payment-intent-events" attempt_analytics_topic = "hyperswitch-payment-attempt-events" refund_analytics_topic = "hyperswitch-refund-events" api_logs_topic = "hyperswitch-api-log-events" connector_logs_topic = "hyperswitch-connector-api-events" outgoing_webhook_logs_topic = "hyperswitch-outgoing-webhook-events" dispute_analytics_topic = "hyperswitch-dispute-events" audit_events_topic = "hyperswitch-audit-events" payout_analytics_topic = "hyperswitch-payout-events" consolidated_events_topic = "hyperswitch-consolidated-events" authentication_analytics_topic = "hyperswitch-authentication-events" [analytics] source = "sqlx" forex_enabled = false [analytics.clickhouse] username = "default" # password = "" host = "http://localhost:8123" database_name = "default" [analytics.sqlx] username = "db_user" password = "db_pass" host = "localhost" port = 5432 dbname = "hyperswitch_db" pool_size = 5 connection_timeout = 10 queue_strategy = "Fifo" [connector_onboarding.paypal] client_id = "" client_secret = "" partner_id = "" enabled = true [file_storage] file_storage_backend = "file_system" [unmasked_headers] keys = "accept-language,user-agent,x-profile-id" [opensearch] host = "https://localhost:9200" enabled = false [opensearch.auth] auth = "basic" username = "admin" password = "0penS3arc#" region = "eu-central-1" [opensearch.indexes] payment_attempts = "hyperswitch-payment-attempt-events" payment_intents = "hyperswitch-payment-intent-events" refunds = "hyperswitch-refund-events" disputes = "hyperswitch-dispute-events" sessionizer_payment_attempts = "sessionizer-payment-attempt-events" sessionizer_payment_intents = "sessionizer-payment-intent-events" sessionizer_refunds = "sessionizer-refund-events" sessionizer_disputes = "sessionizer-dispute-events" [saved_payment_methods] sdk_eligible_payment_methods = "card" [multitenancy] enabled = false global_tenant = { tenant_id = "global", schema = "public", redis_key_prefix = "global", clickhouse_database = "default" } [multitenancy.tenants.public] base_url = "http://localhost:8080" schema = "public" accounts_schema = "public" redis_key_prefix = "" clickhouse_database = "default" [multitenancy.tenants.public.user] control_center_url = "http://localhost:9000" [user_auth_methods] encryption_key = "A8EF32E029BC3342E54BF2E172A4D7AA43E8EF9D2C3A624A9F04E2EF79DC698F" [locker_based_open_banking_connectors] connector_list = "" [cell_information] id = "12345" [network_tokenization_supported_card_networks] card_networks = "Visa, AmericanExpress, Mastercard" [network_tokenization_supported_connectors] connector_list = "cybersource" [grpc_client.dynamic_routing_client] host = "localhost" port = 7000 service = "dynamo" [theme.storage] file_storage_backend = "file_system" # Theme storage backend to be used [theme.email_config] entity_name = "Hyperswitch" # Display name in emails entity_logo_url = "https://app.hyperswitch.io/email-assets/HyperswitchLogo.png" # Logo URL for emails foreground_color = "#111326" # Text color primary_color = "#006DF9" # Primary color background_color = "#FFFFFF" # Email background color [platform] enabled = true
37,507
8,807