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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci(cypress): add card tests for adyen platform (#10009)
likhinbopanna89ceb3b42eac
diff --git a/cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js b/cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.jsindex a2b7fc0603..7896474f2d 100644--- a/cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js+++ b/cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js@@ -1,3 +1,17 @@+const card_data = {+ card_number: "4111111111111111",+ expiry_month: "03",+ expiry_year: "2030",+ card_holder_name: "John Smith",+};++const payment_card_data = {+ card_number: "4111111111111111",+ card_exp_month: "03",+ card_exp_year: "2030",+ card_holder_name: "John Doe",+};+const billing = {address: {line1: "Raadhuisplein",@@ -15,7 +29,102 @@ const billing = {},};+const PaymentMethodData = {+ card: {+ card_issuer: "JP Morgan",+ card_network: "Visa",+ card_type: "CREDIT",+ card_issuing_country: "INDIA",+ bank_code: "JP_JPM",+ last4: "1111",+ card_isin: "411111",+ card_extended_bin: null,+ card_exp_month: "03",+ card_exp_year: "2030",+ card_holder_name: "John Smith",+ },+};+export const connectorDetails = {+ card_pm: {+ Create: {+ Request: {+ payout_method_data: {+ card: card_data,+ },+ currency: "EUR",+ payout_type: "card",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_confirmation",+ payout_type: "card",+ },+ },+ },+ Confirm: {+ Request: {+ payout_method_data: {+ card: card_data,+ },+ currency: "EUR",+ payout_type: "card",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_fulfillment",+ payout_type: "card",+ payout_method_data: PaymentMethodData,+ },+ },+ },+ Fulfill: {+ Request: {+ payout_method_data: {+ card: card_data,+ },+ currency: "EUR",+ payout_type: "card",+ recurring: true,+ },+ Response: {+ status: 200,+ body: {+ status: "initiated",+ payout_type: "card",+ },+ },+ },+ SavePayoutMethod: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ card: payment_card_data,+ metadata: {+ city: "NY",+ unit: "245",+ },+ },+ Response: {+ status: 200,+ },+ },+ Token: {+ Request: {+ payout_token: "token",+ payout_type: "card",+ },+ Response: {+ status: 200,+ body: {+ status: "initiated",+ payout_type: "card",+ },+ },+ },+ },bank_transfer_pm: {sepa_bank_transfer: {Create: {diff --git a/cypress-tests/cypress/e2e/configs/Payout/Wise.js b/cypress-tests/cypress/e2e/configs/Payout/Wise.jsindex 35fc23b6b2..7f590e7a60 100644--- a/cypress-tests/cypress/e2e/configs/Payout/Wise.js+++ b/cypress-tests/cypress/e2e/configs/Payout/Wise.js@@ -125,13 +125,13 @@ export const connectorDetails = {sepa_bank_transfer: {Create: {Request: {- currency: "GBP",+ currency: "EUR",payout_type: "bank",payout_method_data: {bank: {iban: "NL46TEST0136169112",bic: "ABNANL2A",- bank_name: "Deutsche Bank",+ bank_name: "Test Bank",bank_country_code: "NL",bank_city: "Amsterdam",},@@ -148,13 +148,13 @@ export const connectorDetails = {},Confirm: {Request: {- currency: "GBP",+ currency: "EUR",payout_type: "bank",payout_method_data: {bank: {iban: "NL46TEST0136169112",bic: "ABNANL2A",- bank_name: "Deutsche Bank",+ bank_name: "Test Bank",bank_country_code: "NL",bank_city: "Amsterdam",},@@ -171,13 +171,13 @@ export const connectorDetails = {},Fulfill: {Request: {- currency: "GBP",+ currency: "EUR",payout_type: "bank",payout_method_data: {bank: {iban: "NL46TEST0136169112",bic: "ABNANL2A",- bank_name: "Deutsche Bank",+ bank_name: "Test Bank",bank_country_code: "NL",bank_city: "Amsterdam",},@@ -188,7 +188,7 @@ export const connectorDetails = {Response: {status: 200,body: {- status: "success",+ status: "initiated",payout_type: "bank",},},@@ -215,14 +215,14 @@ export const connectorDetails = {},Token: {Request: {- currency: "GBP",+ currency: "EUR",payout_token: "token",payout_type: "bank",},Response: {status: 200,body: {- status: "success",+ status: "initiated",payout_type: "bank",},},diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.jsindex f340389315..eec11d067a 100644--- a/cypress-tests/cypress/support/commands.js+++ b/cypress-tests/cypress/support/commands.js@@ -3469,7 +3469,7 @@ Cypress.Commands.add(globalState.set("payoutAmount", createConfirmPayoutBody.amount);globalState.set("payoutID", response.body.payout_id);for (const key in resData.body) {- expect(resData.body[key]).to.equal(response.body[key]);+ expect(resData.body[key]).to.deep.equal(response.body[key]);}} else {defaultErrorHandler(response, resData);@@ -3511,7 +3511,7 @@ Cypress.Commands.add(globalState.set("payoutAmount", createConfirmPayoutBody.amount);globalState.set("payoutID", response.body.payout_id);for (const key in resData.body) {- expect(resData.body[key]).to.equal(response.body[key]);+ expect(resData.body[key]).to.deep.equal(response.body[key]);}} else {defaultErrorHandler(response, resData);