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

ci(cypress): fix datatrans and fiuu connector tests (#13885)

likhinbopanna45be8cbf798d
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
index a6167c843f..b18dca6218 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
@@ -100,6 +100,62 @@ const billingWithNewline = {
};
+export const blockedPaymentErrorBodyForIssuingCountry = {
+ status: 200,
+ expectBlockedPayment: true,
+ body: {
+ error: {
+ type: "blocked",
+ message:
+ "Cards issued in your region aren't supported for this transaction, please try a different card",
+ code: "HE_03",
+ reason: "Blocked",
+ },
+ },
+};
+
+export const blockedPaymentErrorBodyForDebitCard = {
+ status: 200,
+ expectBlockedPayment: true,
+ body: {
+ error: {
+ type: "blocked",
+ message:
+ "Debit cards are not accepted for this transaction, please try a different card",
+ code: "HE_03",
+ reason: "Blocked",
+ },
+ },
+};
+
+export const blockedPaymentErrorBodyForCardSubtype = {
+ status: 200,
+ expectBlockedPayment: true,
+ body: {
+ error: {
+ type: "blocked",
+ message:
+ "This card is not accepted for this transaction, please try a different card",
+ code: "HE_03",
+ reason: "Blocked",
+ },
+ },
+};
+
+export const blockedPaymentErrorBodyForBinUnavailable = {
+ status: 200,
+ expectBlockedPayment: true,
+ body: {
+ error: {
+ type: "blocked",
+ message:
+ "We couldn't verify this card's information, please try a different card",
+ code: "HE_03",
+ reason: "Blocked",
+ },
+ },
+};
+
export const connectorDetails = {
card_pm: {
PaymentIntent: {
@@ -777,4 +833,78 @@ export const connectorDetails = {
},
},
},
+ payment_method_blocking_pm: {
+ BlockIssuingCountry: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "4000000000000002",
+ card_exp_month: "03",
+ card_exp_year: "30",
+ card_holder_name: "joseph Doeeee",
+ card_cvc: "737",
+ card_network: "Visa",
+ },
+ },
+ billing: billingWithNewline,
+ currency: "MYR",
+ },
+ Response: blockedPaymentErrorBodyForIssuingCountry,
+ },
+ BlockCardType: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "4111111111111111",
+ card_exp_month: "03",
+ card_exp_year: "30",
+ card_holder_name: "joseph Doeeee",
+ card_cvc: "737",
+ card_network: "Visa",
+ },
+ },
+ billing: billingWithNewline,
+ currency: "MYR",
+ },
+ Response: blockedPaymentErrorBodyForDebitCard,
+ },
+ BlockCardSubtype: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "378282246310005",
+ card_exp_month: "03",
+ card_exp_year: "30",
+ card_holder_name: "joseph Doeeee",
+ card_cvc: "737",
+ card_network: "Visa",
+ },
+ },
+ currency: "MYR",
+ billing: billingWithNewline,
+ },
+ Response: blockedPaymentErrorBodyForCardSubtype,
+ },
+ BlockIfBinInfoUnavailable: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "6304000000000000",
+ card_exp_month: "03",
+ card_exp_year: "30",
+ card_holder_name: "joseph Doeeee",
+ card_cvc: "737",
+ card_network: "Visa",
+ },
+ },
+ billing: billingWithNewline,
+ currency: "MYR",
+ },
+ Response: blockedPaymentErrorBodyForBinUnavailable,
+ },
+ },
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
index 9246dcd08f..b19d59786a 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
@@ -89,10 +89,8 @@ const MITErrorResponse = {
status: 200,
body: {
status: "failed",
- error_code:
- "Your transaction has been denied due to merchant account issue",
- error_message:
- "Your transaction has been denied due to merchant account issue",
+ error_code: "Token not found",
+ error_message: "Token not found",
},
};
diff --git a/cypress-tests/cypress/utils/specSelection/config.js b/cypress-tests/cypress/utils/specSelection/config.js
index edc8641369..323da8be61 100644
--- a/cypress-tests/cypress/utils/specSelection/config.js
+++ b/cypress-tests/cypress/utils/specSelection/config.js
@@ -43,6 +43,7 @@ export const CONNECTOR_PAYMENT_METHODS = Object.freeze({
checkbook: ["bank_transfer"],
coingate: ["crypto"],
cryptopay: ["crypto"],
+ datatrans: ["card"],
facilitapay: ["bank_transfer"],
fiservcommercehub: ["card"],
gigadat: ["bank_redirect"],