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
test(cypress): add Rapyd connector config for card credit and debit payments (#12367)
HS-QUALIBOT5bec616f5027
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Rapyd.js b/cypress-tests/cypress/e2e/configs/Payment/Rapyd.jsnew file mode 100644index 0000000000..f1a11eaa48--- /dev/null+++ b/cypress-tests/cypress/e2e/configs/Payment/Rapyd.js@@ -0,0 +1,950 @@+import { customerAcceptance } from "./Commons";++const successfulNo3DSCardDetails = {+ card_number: "4111111111111111",+ card_exp_month: "12",+ card_exp_year: "2030",+ card_holder_name: "Test User",+ card_cvc: "123",+};++const successfulThreeDSTestCardDetails = {+ card_number: "4000002500003155",+ card_exp_month: "12",+ card_exp_year: "2030",+ card_holder_name: "Test User",+ card_cvc: "123",+};+const singleUseMandateData = {+ customer_acceptance: customerAcceptance,+ mandate_type: {+ single_use: {+ amount: 6540,+ currency: "USD",+ },+ },+};++const multiUseMandateData = {+ customer_acceptance: customerAcceptance,+ mandate_type: {+ multi_use: {+ amount: 6540,+ currency: "USD",+ },+ },+};++const returnUrl = "https://example.com/return";++export const connectorDetails = {+ card_pm: {+ PaymentIntent: {+ Request: {+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_payment_method",+ setup_future_usage: "on_session",+ },+ },+ },+ PaymentIntentOffSession: {+ Request: {+ amount: 6540,+ authentication_type: "no_three_ds",+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "off_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_payment_method",+ },+ },+ },+ No3DSAutoCapture: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ payment_method: "card",+ attempt_count: 1,+ },+ },+ },+ No3DSManualCapture: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ payment_method: "card",+ attempt_count: 1,+ },+ },+ },+ "3DSAutoCapture": {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ "3DSManualCapture": {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ PaymentIntentWithShippingCost: {+ Request: {+ currency: "USD",+ shipping_cost: 50,+ amount: 6540,+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_payment_method",+ },+ },+ },+ PaymentConfirmWithShippingCost: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ shipping_cost: 50,+ amount_received: 6590,+ amount: 6540,+ },+ },+ },+ Void: {+ Request: {},+ Response: {+ status: 200,+ body: {+ status: "cancelled",+ },+ },+ },+ No3DSFailPayment: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ customer_acceptance: null,+ setup_future_usage: "on_session",+ return_url: returnUrl,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ No3DSAutoCaptureDebit: {+ Request: {+ payment_method: "card",+ payment_method_type: "debit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ payment_method: "card",+ attempt_count: 1,+ },+ },+ },+ No3DSManualCaptureDebit: {+ Request: {+ payment_method: "card",+ payment_method_type: "debit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ payment_method: "card",+ attempt_count: 1,+ },+ },+ },+ Refund: {+ Request: {+ amount: 6540,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ PartialRefund: {+ Request: {+ amount: 2000,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ SyncRefund: {+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ Capture: {+ Request: {+ amount_to_capture: 6540,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ PartialCapture: {+ Request: {+ amount_to_capture: 2000,+ },+ Response: {+ status: 200,+ body: {+ status: "partially_captured",+ },+ },+ },+ manualPaymentRefund: {+ Request: {+ amount: 6540,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ manualPaymentPartialRefund: {+ Request: {+ amount: 2000,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ MandateSingleUse3DSAutoCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: singleUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ MandateSingleUse3DSManualCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: singleUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ MandateMultiUse3DSAutoCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: multiUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ MandateMultiUse3DSManualCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: multiUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ MandateSingleUseNo3DSAutoCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: singleUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ MandateSingleUseNo3DSManualCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: singleUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ MandateMultiUseNo3DSAutoCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: multiUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ MandateMultiUseNo3DSManualCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ mandate_data: multiUseMandateData,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ ZeroAuthMandate: {+ Response: {+ status: 501,+ body: {+ error: {+ type: "invalid_request",+ message: "Setup Mandate flow for Rapyd is not implemented",+ code: "IR_00",+ },+ },+ },+ },+ ZeroAuthPaymentIntent: {+ Request: {+ amount: 0,+ currency: "USD",+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_payment_method",+ },+ },+ },+ ZeroAuthConfirmPayment: {+ Request: {+ payment_type: "setup_mandate",+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ mandate_data: null,+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 400,+ body: {+ error: {+ type: "invalid_request",+ message: "Setup Mandate flow for Rapyd is not implemented",+ code: "IR_00",+ },+ },+ },+ },+ PaymentMethodIdMandateNo3DSAutoCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ currency: "USD",+ mandate_data: null,+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ PaymentMethodIdMandateNo3DSManualCapture: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ currency: "USD",+ mandate_data: null,+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ PaymentMethodIdMandate3DSAutoCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ currency: "USD",+ mandate_data: null,+ authentication_type: "three_ds",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ PaymentMethodIdMandate3DSManualCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ currency: "USD",+ mandate_data: null,+ authentication_type: "three_ds",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ SaveCardUseNo3DSAutoCapture: {+ Configs: {+ DELAY: {+ STATUS: true,+ TIMEOUT: 2000,+ },+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ SaveCardUseNo3DSManualCapture: {+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ amount: 6540,+ currency: "USD",+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ SaveCardUse3DSAutoCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ SaveCardUse3DSManualCapture: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ amount: 6540,+ currency: "USD",+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ SaveCardUse3DSAutoCaptureOffSession: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ setup_future_usage: "off_session",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ SaveCardUse3DSManualCaptureOffSession: {+ // Skipping 3DS testing due to limitations of the Cypress browser environment.+ // The 'Continue' action works intermittently in the Cypress browser, succeeding at times and failing at others.+ // This is not an issue with Hyperswitch or the Rapyd connector.+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulThreeDSTestCardDetails,+ },+ setup_future_usage: "off_session",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ SaveCardUseNo3DSAutoCaptureOffSession: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ setup_future_usage: "off_session",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ SaveCardUseNo3DSManualCaptureOffSession: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ payment_method: "card",+ payment_method_type: "credit",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ setup_future_usage: "off_session",+ customer_acceptance: customerAcceptance,+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ SaveCardConfirmAutoCaptureOffSession: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ SaveCardConfirmManualCaptureOffSession: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_capture",+ },+ },+ },+ SaveCardConfirmAutoCaptureOffSessionWithoutBilling: {+ Configs: {+ TRIGGER_SKIP: true,+ },+ Request: {+ setup_future_usage: "off_session",+ billing: null,+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ },+ },+ },+ ManualRetryPaymentDisabled: {+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 400,+ body: {+ type: "invalid_request",+ message:+ "You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again",+ code: "IR_16",+ },+ },+ },+ ManualRetryPaymentEnabled: {+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "succeeded",+ payment_method: "card",+ attempt_count: 2,+ },+ },+ },+ ManualRetryPaymentCutoffExpired: {+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ currency: "USD",+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 400,+ body: {+ type: "invalid_request",+ message:+ "You cannot confirm this payment using `manual_retry` because the allowed duration has expired",+ code: "IR_16",+ },+ },+ },+ },+ bank_transfer_pm: {},+ wallet_pm: {},+};diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.jsindex 8ad0d37671..7f81924755 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js@@ -59,6 +59,7 @@ import { connectorDetails as paysafeConnectorDetails } from "./Paysafe.js";import { connectorDetails as payuConnectorDetails } from "./Payu.js";import { connectorDetails as peachpaymentsConnectorDetails } from "./Peachpayments.js";import { connectorDetails as powertranzConnectorDetails } from "./PowerTranz.js";+import { connectorDetails as rapydConnectorDetails } from "./Rapyd.js";import { connectorDetails as redsysConnectorDetails } from "./Redsys.js";import { connectorDetails as shift4ConnectorDetails } from "./Shift4.js";import { connectorDetails as silverflowConnectorDetails } from "./Silverflow.js";@@ -135,6 +136,7 @@ const connectorDetails = {payu: payuConnectorDetails,peachpayments: peachpaymentsConnectorDetails,powertranz: powertranzConnectorDetails,+ rapyd: rapydConnectorDetails,redsys: redsysConnectorDetails,shift4: shift4ConnectorDetails,silverflow: silverflowConnectorDetails,diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.jsindex b9b51b571d..daf90f251e 100644--- a/cypress-tests/cypress/support/commands.js+++ b/cypress-tests/cypress/support/commands.js@@ -638,7 +638,6 @@ Cypress.Commands.add("merchantRetrieveCall", (globalState, options = {}) => {"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);@@ -5632,7 +5631,6 @@ Cypress.Commands.add("listCustomerPMCallTest", (globalState, order = 0) => {expect(cardInfo.card_holder_name, "card_holder_name").to.not.be.null;}- // Validate last_used_at timestampexpect(new Date(lastUsedAt).getTime(), "last_used_at").to.be.lessThan(Date.now()).and.to.not.be.null;