Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(cypress): make amount configurable (#7219)

Pa1NarK055f62858e6d
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js b/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
index d5bdd190e9..b317366dbf 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Adyen.js
@@ -19,7 +19,7 @@ const successfulThreeDSTestCardDetails = {
const failedNo3DSCardDetails = {
card_number: "4242424242424242",
card_exp_month: "01",
- card_exp_year: "25",
+ card_exp_year: "35",
card_holder_name: "joseph Doe",
card_cvc: "123",
};
@@ -75,7 +75,7 @@ export const connectorDetails = {
},
PaymentIntentOffSession: {
Request: {
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
currency: "USD",
customer_acceptance: null,
@@ -98,7 +98,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -116,9 +116,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -212,32 +212,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: 0,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: 0,
},
},
@@ -259,7 +256,7 @@ export const connectorDetails = {
}),
Refund: {
Request: {
- currency: "USD",
+ amount: 6000,
},
Response: {
status: 200,
@@ -270,7 +267,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- currency: "USD",
+ amount: 2000,
},
Response: {
status: 200,
@@ -281,12 +278,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 400,
@@ -302,12 +294,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 400,
@@ -322,9 +309,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- currency: "USD",
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js b/cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js
index 0c8a880325..ef953956c5 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js
@@ -68,7 +68,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "USD",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
@@ -89,7 +89,7 @@ export const connectorDetails = {
status: 200,
body: {
status: "requires_payment_method",
- amount: 6500,
+ amount: 6000,
shipping_cost: 50,
},
},
@@ -108,9 +108,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -172,32 +172,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -212,12 +209,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -229,12 +221,7 @@ export const connectorDetails = {
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -245,12 +232,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -261,12 +243,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -276,14 +253,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js b/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
index f27b7ef76c..b80701468a 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
@@ -32,14 +32,14 @@ export const connectorDetails = {
PaymentIntentWithShippingCost: {
Request: {
currency: "USD",
- amount: 6500,
+ amount: 6000,
shipping_cost: 50,
},
Response: {
status: 200,
body: {
status: "requires_payment_method",
- amount: 6500,
+ amount: 6000,
shipping_cost: 50,
},
},
@@ -58,9 +58,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -140,32 +140,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -180,12 +177,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -196,12 +188,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -212,12 +199,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -228,12 +210,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -243,14 +220,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
index 9679b70866..742b9daf50 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
@@ -48,7 +48,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -66,7 +66,7 @@ export const connectorDetails = {
body: {
status: "processing",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -136,31 +136,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -175,11 +173,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -190,11 +184,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -205,11 +195,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -220,11 +206,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -234,13 +216,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
index f021a0a98f..0f551c97c6 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
@@ -567,7 +567,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
}),
@@ -649,16 +649,13 @@ export const connectorDetails = {
}),
Capture: getCustomExchange({
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
}),
PartialCapture: getCustomExchange({
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
}),
Void: getCustomExchange({
Request: {},
@@ -704,32 +701,12 @@ export const connectorDetails = {
}),
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",
- },
- },
+ amount: 6000,
},
}),
manualPaymentRefund: getCustomExchange({
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -740,12 +717,7 @@ export const connectorDetails = {
}),
manualPaymentPartialRefund: getCustomExchange({
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -756,24 +728,10 @@ export const connectorDetails = {
}),
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,
+ amount: 2000,
},
}),
+ SyncRefund: getCustomExchange({}),
MandateSingleUse3DSAutoCapture: getCustomExchange({
Request: {
payment_method: "card",
@@ -1336,14 +1294,7 @@ export const connectorDetails = {
},
CaptureGreaterAmount: {
Request: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
+ amount_to_capture: 6000000,
},
Response: {
status: 400,
@@ -1359,12 +1310,7 @@ export const connectorDetails = {
CaptureCapturedAmount: getCustomExchange({
Request: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
},
Response: {
@@ -1400,6 +1346,21 @@ export const connectorDetails = {
},
},
}),
+ RefundGreaterAmount: {
+ Request: {
+ amount: 6000000,
+ },
+ Response: {
+ status: 400,
+ body: {
+ error: {
+ type: "invalid_request",
+ message: "The refund amount exceeds the amount captured",
+ code: "IR_13",
+ },
+ },
+ },
+ },
MITAutoCapture: getCustomExchange({
Request: {},
Response: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js b/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
index 804f9aca0d..ae06e28332 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
@@ -136,7 +136,7 @@ export const connectorDetails = {
},
Request: {
currency: "USD",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
@@ -176,7 +176,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -194,9 +194,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -306,19 +306,14 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: null,
},
},
@@ -329,13 +324,15 @@ export const connectorDetails = {
value: "connector_1",
},
},
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: null,
},
},
@@ -361,12 +358,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -382,12 +374,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 400,
@@ -408,12 +395,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 400,
@@ -434,12 +416,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -454,14 +431,6 @@ export const connectorDetails = {
value: "connector_1",
},
},
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -471,14 +440,14 @@ export const connectorDetails = {
},
IncrementalAuth: {
Request: {
- amount: 7000,
+ amount: 6000,
},
Response: {
status: 200,
body: {
status: "requires_capture",
- amount: 7000,
- amount_capturable: 7000,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: null,
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
index 13bbf7e7d3..57e28b8622 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
@@ -57,32 +57,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -97,12 +94,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -113,12 +105,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -128,14 +115,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js b/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
index 591e6c8869..7e669ffb50 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
@@ -99,31 +99,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successful3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -132,11 +130,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successful3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -150,11 +144,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successful3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -168,11 +158,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successful3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -186,11 +172,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successful3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Elavon.js b/cypress-tests/cypress/e2e/configs/Payment/Elavon.js
index 6755dd16e7..d15d217456 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Elavon.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Elavon.js
@@ -120,12 +120,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -136,12 +131,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -424,43 +414,35 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -484,12 +466,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -499,14 +476,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js b/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
index 1460b47422..9ee05d419c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
@@ -57,32 +57,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -97,12 +94,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -113,12 +105,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -128,14 +115,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
index a707643248..74ffd40369 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
@@ -132,32 +132,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -172,12 +169,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -188,12 +180,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -203,14 +190,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -384,7 +363,7 @@ export const connectorDetails = {
},
PaymentIntentOffSession: {
Request: {
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
currency: "USD",
customer_acceptance: null,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Iatapay.js b/cypress-tests/cypress/e2e/configs/Payment/Iatapay.js
index 4777289695..bbd099edf8 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Iatapay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Iatapay.js
@@ -160,7 +160,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- amount: 6500,
+ amount: 6000,
},
Response: {
status: 200,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js b/cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js
index 36e53ffd99..9290367b8b 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js
@@ -100,31 +100,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -133,11 +131,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 501,
@@ -153,11 +147,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 501,
@@ -173,11 +163,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 501,
@@ -193,11 +179,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 501,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js b/cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js
index 3b77a0ad6e..b4b0bdb213 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js
@@ -75,7 +75,7 @@ export const connectorDetails = {
PaymentIntent: {
Request: {
currency: "EUR",
- amount: 6500,
+ amount: 6000,
customer_acceptance: null,
setup_future_usage: "on_session",
billing: billingAddress,
@@ -90,7 +90,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "EUR",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
@@ -180,18 +180,14 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: null,
},
},
@@ -200,14 +196,16 @@ export const connectorDetails = {
Configs: {
TRIGGER_SKIP: true,
},
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
- amount_received: 100,
+ amount: 6000,
+ amount_capturable: 6000,
+ amount_received: 2000,
},
},
},
@@ -225,11 +223,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -243,11 +237,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -257,13 +247,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -410,12 +393,7 @@ export const connectorDetails = {
TRIGGER_SKIP: true,
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -453,7 +431,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "EUR",
- amount: 6500,
+ amount: 6000,
mandate_data: null,
customer_acceptance: customerAcceptance,
},
@@ -474,7 +452,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "EUR",
- amount: 6500,
+ amount: 6000,
mandate_data: null,
customer_acceptance: customerAcceptance,
},
@@ -495,7 +473,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "EUR",
- amount: 6500,
+ amount: 6000,
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
@@ -517,7 +495,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "EUR",
- amount: 6500,
+ amount: 6000,
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Nmi.js b/cypress-tests/cypress/e2e/configs/Payment/Nmi.js
index e8cdd97e7a..d39b45172a 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Nmi.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Nmi.js
@@ -48,7 +48,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -66,7 +66,7 @@ export const connectorDetails = {
body: {
status: "processing",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -136,29 +136,27 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
},
},
},
@@ -187,11 +185,7 @@ export const connectorDetails = {
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -202,11 +196,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -217,11 +207,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -232,11 +218,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -246,13 +228,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Noon.js b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
index 63f6b63173..61733a1aa3 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Noon.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
@@ -101,7 +101,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "AED",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
@@ -125,7 +125,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -143,7 +143,7 @@ export const connectorDetails = {
body: {
status: "requires_customer_action",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -227,29 +227,27 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
},
},
@@ -265,12 +263,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "AED",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -281,12 +274,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "AED",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -298,11 +286,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -314,11 +298,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -328,13 +308,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Novalnet.js b/cypress-tests/cypress/e2e/configs/Payment/Novalnet.js
index 1025b47411..bafb45d034 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Novalnet.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Novalnet.js
@@ -151,31 +151,29 @@ export const connectorDetails = {
// },
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -190,11 +188,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -205,11 +199,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -219,13 +209,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -248,7 +231,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "EUR",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Paybox.js b/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
index 2b85b7e5cd..f70217059e 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
@@ -27,7 +27,7 @@ const singleUseMandateData = {
customer_acceptance: customerAcceptance,
mandate_type: {
single_use: {
- amount: 7000,
+ amount: 6000,
currency: "EUR",
},
},
@@ -37,7 +37,7 @@ const multiUseMandateData = {
customer_acceptance: customerAcceptance,
mandate_type: {
multi_use: {
- amount: 6500,
+ amount: 6000,
currency: "EUR",
},
},
@@ -69,7 +69,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "EUR",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
@@ -155,31 +155,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -199,11 +197,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -214,11 +208,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -228,13 +218,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -373,7 +356,7 @@ export const connectorDetails = {
MITAutoCapture: {
Request: {
currency: "EUR",
- amount: 6500,
+ amount: 6000,
},
Response: {
status: 200,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Paypal.js b/cypress-tests/cypress/e2e/configs/Payment/Paypal.js
index 787ad2afab..982f082631 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Paypal.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Paypal.js
@@ -70,7 +70,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -169,32 +169,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -209,12 +206,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -225,12 +217,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -241,12 +228,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -257,12 +239,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -272,14 +249,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
@@ -348,7 +317,7 @@ export const connectorDetails = {
PaymentIntentOffSession: {
Request: {
currency: "USD",
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
index b73bbf18dc..9e557065f4 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
@@ -151,7 +151,7 @@ export const connectorDetails = {
Request: {
currency: "USD",
customer_acceptance: null,
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
setup_future_usage: "off_session",
},
@@ -190,7 +190,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -208,9 +208,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -316,32 +316,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -356,12 +353,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -372,11 +364,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -387,12 +375,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -403,12 +386,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -418,14 +396,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
index cfd3332eab..8ef1d4a4a5 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
@@ -64,7 +64,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -82,9 +82,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
@@ -142,12 +142,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 400,
@@ -173,16 +168,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- paymentSuccessfulStatus: "succeeded",
- paymentSyncStatus: "succeeded",
- refundStatus: "succeeded",
- refundSyncStatus: "succeeded",
- customer_acceptance: null,
+ amount_to_capture: 2000,
},
Response: {
status: 400,
@@ -213,12 +199,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -235,12 +216,7 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -257,14 +233,6 @@ export const connectorDetails = {
TIMEOUT: 15000,
},
},
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/WellsFargo.js b/cypress-tests/cypress/e2e/configs/Payment/WellsFargo.js
index 38a5b63704..9c90568c3c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/WellsFargo.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/WellsFargo.js
@@ -144,32 +144,29 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
PartialCapture: {
- Request: {},
+ Request: {
+ amount_to_capture: 2000,
+ },
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000,
},
},
},
@@ -184,12 +181,7 @@ export const connectorDetails = {
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 6000,
},
Response: {
status: 200,
@@ -200,12 +192,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount: 2000,
},
Response: {
status: 200,
@@ -215,14 +202,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
index 3e13aeba75..06c5c79915 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
@@ -161,25 +161,20 @@ export const connectorDetails = {
},
Capture: {
Request: {
- payment_method: "card",
- payment_method_type: "debit",
- payment_method_data: {
- card: successfulNoThreeDsCardDetailsRequest,
- },
- currency: "USD",
- customer_acceptance: null,
+ amount_to_capture: 6000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
},
},
},
PartialCapture: {
Request: {
+ amount_to_capture: 2000,
payment_method: "card",
payment_method_type: "debit",
payment_method_data: {
@@ -192,7 +187,7 @@ export const connectorDetails = {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
},
},
@@ -397,7 +392,9 @@ export const connectorDetails = {
},
},
Refund: {
- Request: {},
+ Request: {
+ amount: 6000,
+ },
Response: {
body: {
status: "succeeded",
@@ -405,7 +402,9 @@ export const connectorDetails = {
},
},
PartialRefund: {
- Request: {},
+ Request: {
+ amount: 2000,
+ },
Response: {
body: {
status: "succeeded",
@@ -414,11 +413,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNoThreeDsCardDetailsRequest,
- },
- currency: "USD",
+ amount: 6000,
},
Response: {
body: {
@@ -428,11 +423,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNoThreeDsCardDetailsRequest,
- },
- currency: "USD",
+ amount: 2000,
},
Response: {
body: {
@@ -441,7 +432,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {},
Response: {
body: {
status: "succeeded",
@@ -514,7 +504,7 @@ export const connectorDetails = {
},
PaymentIntentOffSession: {
Request: {
- amount: 6500,
+ amount: 6000,
authentication_type: "no_three_ds",
currency: "USD",
customer_acceptance: null,
@@ -555,7 +545,7 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 50,
- amount: 6500,
+ amount: 6000,
},
},
},
@@ -573,9 +563,9 @@ export const connectorDetails = {
body: {
status: "succeeded",
shipping_cost: 50,
- amount_received: 6550,
- amount: 6500,
- net_amount: 6550,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
},
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Xendit.js b/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
index fcc303877b..985a69154c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
@@ -71,7 +71,7 @@ export const connectorDetails = {
currency: "IDR",
customer_acceptance: null,
setup_future_usage: "on_session",
- amount: 6500000,
+ amount: 6000000,
billing: billingDetails,
},
Response: {
@@ -91,13 +91,13 @@ export const connectorDetails = {
body: {
status: "requires_payment_method",
shipping_cost: 100,
- amount: 6500000,
+ amount: 6000000,
},
},
},
PaymentConfirmWithShippingCost: {
Request: {
- amount: 6500000,
+ amount: 6000000,
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
@@ -110,7 +110,7 @@ export const connectorDetails = {
body: {
status: "processing",
shipping_cost: 100,
- amount: 6500000,
+ amount: 6000000,
},
},
},
@@ -123,7 +123,7 @@ export const connectorDetails = {
},
Request: {
payment_method: "card",
- amount: 6500000,
+ amount: 6000000,
payment_method_data: {
card: successfulNo3DSCardDetails,
billing: billingDetails,
@@ -148,7 +148,7 @@ export const connectorDetails = {
},
Request: {
payment_method: "card",
- amount: 6500000,
+ amount: 6000000,
payment_method_data: {
card: successfulNo3DSCardDetails,
billing: billingDetails,
@@ -166,12 +166,7 @@ export const connectorDetails = {
},
manualPaymentPartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
+ amount: 2000000,
},
Response: {
status: 200,
@@ -182,12 +177,7 @@ export const connectorDetails = {
},
manualPaymentRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
+ amount: 6000000,
},
Response: {
status: 200,
@@ -406,7 +396,7 @@ export const connectorDetails = {
},
Request: {
payment_method: "card",
- amount: 6500000,
+ amount: 6000000,
payment_method_data: {
card: successfulNo3DSCardDetails,
billing: billingDetails,
@@ -423,7 +413,7 @@ export const connectorDetails = {
},
"3DSManualCapture": {
Request: {
- amount: 6500000,
+ amount: 6000000,
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
@@ -450,7 +440,7 @@ export const connectorDetails = {
},
Request: {
payment_method: "card",
- amount: 6500000,
+ amount: 6000000,
payment_method_data: {
card: successfulNo3DSCardDetails,
billing: billingDetails,
@@ -473,21 +463,15 @@ export const connectorDetails = {
},
},
Request: {
- payment_method: "card",
- amount: 6500000,
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
+ amount_to_capture: 6000000,
},
Response: {
status: 200,
body: {
status: "succeeded",
- amount: 6500000,
+ amount: 6000000,
amount_capturable: 0,
- amount_received: 6500000,
+ amount_received: 6000000,
},
},
},
@@ -499,26 +483,21 @@ export const connectorDetails = {
},
},
Request: {
- amount: 6500000,
+ amount_to_capture: 2000000,
},
Response: {
status: 200,
body: {
status: "partially_captured",
- amount: 6500000,
+ amount: 2000000,
amount_capturable: 0,
- amount_received: 100,
+ amount_received: 2000000,
},
},
},
Refund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
+ amount: 6000000,
},
Response: {
status: 200,
@@ -542,12 +521,7 @@ export const connectorDetails = {
},
PartialRefund: {
Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
+ amount: 2000000,
},
Response: {
status: 200,
@@ -557,14 +531,6 @@ export const connectorDetails = {
},
},
SyncRefund: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "IDR",
- customer_acceptance: null,
- },
Response: {
status: 200,
body: {
diff --git a/cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js b/cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js
index e782b32368..034598d72d 100644
--- a/cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js
@@ -133,7 +133,7 @@ export const createPaymentBodyWithCurrencyCountry = (
shippingCountry
) => ({
currency: currency,
- amount: 6500,
+ amount: 6000,
authentication_type: "three_ds",
description: "Joseph First Crypto",
@@ -184,7 +184,7 @@ export const createPaymentBodyWithCurrencyCountry = (
export const createPaymentBodyWithCurrency = (currency) => ({
currency: currency,
- amount: 6500,
+ amount: 6000,
authentication_type: "three_ds",
description: "Joseph First Crypto",
diff --git a/cypress-tests/cypress/e2e/configs/Routing/Adyen.js b/cypress-tests/cypress/e2e/configs/Routing/Adyen.js
index 976de0e216..3668bf2a3a 100644
--- a/cypress-tests/cypress/e2e/configs/Routing/Adyen.js
+++ b/cypress-tests/cypress/e2e/configs/Routing/Adyen.js
@@ -148,8 +148,8 @@ export const connectorDetails = {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: 0,
},
},
@@ -160,8 +160,8 @@ export const connectorDetails = {
status: 200,
body: {
status: "processing",
- amount: 6500,
- amount_capturable: 6500,
+ amount: 6000,
+ amount_capturable: 6000,
amount_received: 0,
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Routing/Stripe.js b/cypress-tests/cypress/e2e/configs/Routing/Stripe.js
index e00e3d6ccb..d55fee41a2 100644
--- a/cypress-tests/cypress/e2e/configs/Routing/Stripe.js
+++ b/cypress-tests/cypress/e2e/configs/Routing/Stripe.js
@@ -148,9 +148,9 @@ export const connectorDetails = {
status: 200,
body: {
status: "succeeded",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
- amount_received: 6500,
+ amount_received: 6000,
},
},
},
@@ -160,7 +160,7 @@ export const connectorDetails = {
status: 200,
body: {
status: "partially_captured",
- amount: 6500,
+ amount: 6000,
amount_capturable: 0,
amount_received: 100,
},
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js
index f82284b569..1a0f28981c 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js
@@ -70,7 +70,7 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -124,7 +124,7 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -197,7 +197,7 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -251,7 +251,7 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
index 1d7ac32f0b..cf3268e8a5 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
@@ -67,7 +67,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -135,7 +135,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 1200, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -145,7 +145,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 1200, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -202,7 +202,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -262,7 +262,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -273,7 +273,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -344,7 +344,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -362,7 +362,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["manualPaymentRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -430,7 +430,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -448,7 +448,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -457,7 +457,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -528,7 +528,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -544,9 +544,9 @@ describe("Card - Refund flow - No 3DS", () => {
it("refund-call-test", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
- ]["manualPaymentRefund"];
+ ]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 100, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -614,7 +614,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -632,7 +632,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 100, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -667,7 +667,7 @@ describe("Card - Refund flow - No 3DS", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -686,7 +686,7 @@ describe("Card - Refund flow - No 3DS", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -701,7 +701,7 @@ describe("Card - Refund flow - No 3DS", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -713,7 +713,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 7000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -801,7 +801,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -874,7 +874,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 1200, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -884,7 +884,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 1200, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -943,7 +943,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1005,7 +1005,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -1016,7 +1016,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 3000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -1092,7 +1092,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1110,7 +1110,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["manualPaymentRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1183,7 +1183,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1201,7 +1201,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 5000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1210,7 +1210,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 1500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1283,7 +1283,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1299,9 +1299,9 @@ describe("Card - Refund flow - 3DS", () => {
it("refund-call-test", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
- ]["manualPaymentRefund"];
+ ]["manualPaymentPartialRefund"];
- cy.refundCallTest(fixtures.refundBody, data, 100, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1374,7 +1374,7 @@ describe("Card - Refund flow - 3DS", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -1390,9 +1390,14 @@ describe("Card - Refund flow - 3DS", () => {
it("refund-call-test", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
- ]["manualPaymentRefund"];
+ ]["manualPaymentPartialRefund"];
+
+ const newData = {
+ ...data,
+ Request: { amount: data.Request.amount / 2 },
+ };
- cy.refundCallTest(fixtures.refundBody, data, 50, globalState);
+ cy.refundCallTest(fixtures.refundBody, newData, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js
index db63105d83..1d1581de5c 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js
@@ -66,7 +66,7 @@ describe("Card - Sync Refund flow test", () => {
"Refund"
];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js
index 6fa01f9199..d6b174ba63 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js
@@ -34,7 +34,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -53,7 +53,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -81,7 +81,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -97,7 +97,7 @@ describe("Card - SingleUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -111,7 +111,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -123,7 +123,7 @@ describe("Card - SingleUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -154,7 +154,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -170,7 +170,7 @@ describe("Card - SingleUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -184,7 +184,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js
index 2af0b801d2..b82207117c 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js
@@ -34,7 +34,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -53,7 +53,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -67,7 +67,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -95,7 +95,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -111,7 +111,7 @@ describe("Card - MultiUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -125,7 +125,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -137,7 +137,7 @@ describe("Card - MultiUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -151,7 +151,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -163,7 +163,7 @@ describe("Card - MultiUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -190,7 +190,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -206,7 +206,7 @@ describe("Card - MultiUse Mandates flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -220,7 +220,7 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 6500,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js
index f3704b84f9..dba24208b5 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js
@@ -34,7 +34,7 @@ describe("Card - List and revoke Mandates flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -53,7 +53,7 @@ describe("Card - List and revoke Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -112,7 +112,7 @@ describe("Card - List and revoke Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
index 26c250a323..29ef0b64a5 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
@@ -178,7 +178,7 @@ describe("Card - SaveCard payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -271,7 +271,7 @@ describe("Card - SaveCard payment flow test", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -399,7 +399,7 @@ describe("Card - SaveCard payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -450,7 +450,7 @@ describe("Card - SaveCard payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
index ba522b3cd7..bb71e1023f 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
@@ -53,7 +53,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -99,7 +99,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -113,7 +113,7 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js
index 89d82f7fb9..41d33f5c25 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js
@@ -75,7 +75,7 @@ describe("Card - ThreeDS Manual payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -135,7 +135,7 @@ describe("Card - ThreeDS Manual payment flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -213,7 +213,7 @@ describe("Card - ThreeDS Manual payment flow test", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -273,7 +273,7 @@ describe("Card - ThreeDS Manual payment flow test", () => {
"card_pm"
]["PartialCapture"];
- cy.captureCallTest(fixtures.captureBody, data, 100, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
index ec8ddc6c70..ceefef888f 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
@@ -51,7 +51,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -70,7 +70,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -115,7 +115,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -131,7 +131,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -145,7 +145,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -173,7 +173,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -192,7 +192,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -206,7 +206,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -234,7 +234,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -250,7 +250,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -264,7 +264,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -276,7 +276,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -290,7 +290,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -302,7 +302,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -329,7 +329,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
"new_mandate",
@@ -353,7 +353,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -367,7 +367,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -395,7 +395,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -416,7 +416,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -430,7 +430,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
cy.mitUsingPMId(
fixtures.pmIdConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js
index 67697cac6c..6377323bbf 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js
@@ -48,7 +48,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -68,7 +68,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"manual",
globalState
@@ -88,7 +88,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -102,7 +102,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -124,7 +124,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -136,7 +136,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -150,7 +150,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
globalState
@@ -162,7 +162,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -181,7 +181,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -195,7 +195,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
@@ -215,7 +215,7 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {
cy.mitUsingNTID(
fixtures.ntidConfirmBody,
data,
- 7000,
+ 6000,
true,
"automatic",
globalState
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00021-UPI.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00021-UPI.cy.js
index d6b1c99407..b021f28bec 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00021-UPI.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00021-UPI.cy.js
@@ -78,7 +78,7 @@ describe("UPI Payments - Hyperswitch", () => {
"upi_pm"
]["Refund"];
- cy.refundCallTest(fixtures.refundBody, data, 6500, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js
index 5a1f765cf6..f3a99df1ba 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js
@@ -27,9 +27,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid card number", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidCardNumber"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidCardNumber"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -41,9 +41,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid expiry month", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidExpiryMonth"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidExpiryMonth"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -55,9 +55,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid expiry year", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidExpiryYear"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidExpiryYear"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -69,9 +69,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid card CVV", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidCardCvv"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidCardCvv"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -83,9 +83,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid currency", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidCurrency"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidCurrency"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -97,9 +97,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid capture method", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidCaptureMethod"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidCaptureMethod"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -111,9 +111,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid payment method", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidPaymentMethod"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidPaymentMethod"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -125,9 +125,9 @@ describe("Corner cases", () => {
});
it("[Payment] Invalid `amount_to_capture`", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "InvalidAmountToCapture"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["InvalidAmountToCapture"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -139,9 +139,9 @@ describe("Corner cases", () => {
});
it("[Payment] Missing required params", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "MissingRequiredParam"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["MissingRequiredParam"];
cy.createConfirmPaymentTest(
paymentIntentBody,
@@ -165,9 +165,9 @@ describe("Corner cases", () => {
});
it("Create payment intent", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "PaymentIntent"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentIntent"];
cy.createPaymentIntentTest(
paymentIntentBody,
@@ -179,9 +179,9 @@ describe("Corner cases", () => {
});
it("Confirm payment intent", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "PaymentIntentErrored"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentIntentErrored"];
cy.confirmCallTest(fixtures.confirmBody, data, true, globalState);
});
@@ -231,11 +231,11 @@ describe("Corner cases", () => {
});
it("Capture call", () => {
- const data = getConnectorDetails(globalState.get("commons"))["card_pm"][
- "CaptureGreaterAmount"
- ];
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["CaptureGreaterAmount"];
- cy.captureCallTest(fixtures.captureBody, data, 65000, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -289,7 +289,7 @@ describe("Corner cases", () => {
"card_pm"
]["CaptureCapturedAmount"];
- cy.captureCallTest(fixtures.captureBody, data, 65000, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -476,7 +476,7 @@ describe("Corner cases", () => {
"CaptureGreaterAmount"
];
- cy.captureCallTest(fixtures.captureBody, data, 65000, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -528,21 +528,9 @@ describe("Corner cases", () => {
it("Refund call", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
- ]["Refund"];
- const commonData = getConnectorDetails(globalState.get("commons"))[
- "card_pm"
- ]["Refund"];
+ ]["RefundGreaterAmount"];
- const newData = {
- ...data,
- Response: utils.getConnectorFlowDetails(
- data,
- commonData,
- "ResponseCustom"
- ),
- };
-
- cy.refundCallTest(fixtures.refundBody, newData, 65000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
});
@@ -593,21 +581,9 @@ describe("Corner cases", () => {
it("Refund call", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
- ]["Refund"];
- const commonData = getConnectorDetails(globalState.get("commons"))[
- "card_pm"
- ]["Refund"];
-
- const newData = {
- ...data,
- Response: utils.getConnectorFlowDetails(
- data,
- commonData,
- "ResponseCustom"
- ),
- };
+ ]["RefundGreaterAmount"];
- cy.refundCallTest(fixtures.refundBody, newData, 65000, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -640,7 +616,7 @@ describe("Corner cases", () => {
cy.citForMandatesCallTest(
fixtures.citConfirmBody,
data,
- 6500,
+ 6000,
true,
"manual",
"new_mandate",
@@ -654,7 +630,7 @@ describe("Corner cases", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -674,13 +650,14 @@ describe("Corner cases", () => {
cy.mitForMandatesCallTest(
fixtures.mitConfirmBody,
data,
- 65000,
+ 60000,
true,
"manual",
globalState
);
});
});
+
context("Card-NoThreeDS fail payment flow test", () => {
let shouldContinue = true; // variable that will be used to skip tests if a previous test fails
@@ -724,9 +701,5 @@ describe("Corner cases", () => {
cy.confirmCallTest(fixtures.confirmBody, data, true, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
-
- it("retrieve-payment-call-test", () => {
- cy.retrievePaymentCallTest(globalState);
- });
});
});
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js
index 365137ee34..07f285cadf 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js
@@ -211,7 +211,7 @@ describe("Card - Customer Deletion and Psync", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -307,7 +307,7 @@ describe("Card - Customer Deletion and Psync", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 6500, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js
index 76116acc2b..9daa587ecf 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js
@@ -71,7 +71,7 @@ describe.skip("[Payment] Incremental Auth", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 7000, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -131,7 +131,7 @@ describe.skip("[Payment] Incremental Auth", () => {
"card_pm"
]["Capture"];
- cy.captureCallTest(fixtures.captureBody, data, 7000, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
diff --git a/cypress-tests/cypress/fixtures/create-confirm-body.json b/cypress-tests/cypress/fixtures/create-confirm-body.json
index df533116e5..e0ea67816d 100644
--- a/cypress-tests/cypress/fixtures/create-confirm-body.json
+++ b/cypress-tests/cypress/fixtures/create-confirm-body.json
@@ -1,5 +1,5 @@
{
- "amount": 6500,
+ "amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
diff --git a/cypress-tests/cypress/fixtures/create-mandate-cit.json b/cypress-tests/cypress/fixtures/create-mandate-cit.json
index d23c1f8054..d011b59d78 100644
--- a/cypress-tests/cypress/fixtures/create-mandate-cit.json
+++ b/cypress-tests/cypress/fixtures/create-mandate-cit.json
@@ -1,5 +1,5 @@
{
- "amount": 7000,
+ "amount": 6000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
diff --git a/cypress-tests/cypress/fixtures/create-payment-body.json b/cypress-tests/cypress/fixtures/create-payment-body.json
index ea1d22d364..3b0efb9e8a 100644
--- a/cypress-tests/cypress/fixtures/create-payment-body.json
+++ b/cypress-tests/cypress/fixtures/create-payment-body.json
@@ -1,6 +1,6 @@
{
"currency": "USD",
- "amount": 6500,
+ "amount": 6000,
"authentication_type": "three_ds",
"description": "Joseph First Crypto",
"email": "[email protected]",
diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js
index f04d7762fa..77f94cf30f 100644
--- a/cypress-tests/cypress/support/commands.js
+++ b/cypress-tests/cypress/support/commands.js
@@ -119,12 +119,18 @@ Cypress.Commands.add("merchantRetrieveCall", (globalState) => {
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.payment_response_hash_key).to.not.be.empty;
- expect(response.body.publishable_key).to.not.be.empty;
- expect(response.body.default_profile).to.not.be.empty;
- expect(response.body.organization_id).to.not.be.empty;
+ 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) {
@@ -2161,44 +2167,48 @@ Cypress.Commands.add(
}
);
-Cypress.Commands.add(
- "captureCallTest",
- (requestBody, data, amount_to_capture, globalState) => {
- const { Configs: configs = {}, Response: resData } = data || {};
+Cypress.Commands.add("captureCallTest", (requestBody, data, globalState) => {
+ const {
+ Configs: configs = {},
+ Request: reqData,
+ Response: resData,
+ } = data || {};
- const configInfo = execConfig(validateConfig(configs));
- const payment_id = globalState.get("paymentID");
- const profile_id = globalState.get(`${configInfo.profilePrefix}Id`);
+ const configInfo = execConfig(validateConfig(configs));
+ const paymentId = globalState.get("paymentID");
+ const profileId = globalState.get(`${configInfo.profilePrefix}Id`);
- requestBody.amount_to_capture = amount_to_capture;
- requestBody.profile_id = profile_id;
+ requestBody.profile_id = profileId;
- cy.request({
- method: "POST",
- url: `${globalState.get("baseUrl")}/payments/${payment_id}/capture`,
- headers: {
- "Content-Type": "application/json",
- "api-key": globalState.get("apiKey"),
- },
- failOnStatusCode: false,
- body: requestBody,
- }).then((response) => {
- logRequestId(response.headers["x-request-id"]);
+ for (const key in reqData) {
+ requestBody[key] = reqData[key];
+ }
- 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(payment_id);
- for (const key in resData.body) {
- expect(resData.body[key]).to.equal(response.body[key]);
- }
- } else {
- defaultErrorHandler(response, resData);
+ 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 {
@@ -2329,46 +2339,47 @@ Cypress.Commands.add(
}
);
-Cypress.Commands.add(
- "refundCallTest",
- (requestBody, data, refund_amount, globalState) => {
- const { Configs: configs = {}, Response: resData } = data || {};
+Cypress.Commands.add("refundCallTest", (requestBody, data, globalState) => {
+ const {
+ Configs: configs = {},
+ Request: reqData,
+ Response: resData,
+ } = data || {};
- const payment_id = globalState.get("paymentID");
+ const payment_id = globalState.get("paymentID");
- // we only need this to set the delay. We don't need the return value
- execConfig(validateConfig(configs));
+ // we only need this to set the delay. We don't need the return value
+ execConfig(validateConfig(configs));
- requestBody.amount = refund_amount;
- requestBody.payment_id = payment_id;
+ requestBody.amount = reqData.amount;
+ 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.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);
+ 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 || {};