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 cypress tests for checkout connector (#11068)

AdityaWNLb904ca566e31
diff --git a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
index 9e581d22f8..c13b95d5b2 100644
--- a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs
@@ -865,16 +865,21 @@ impl TryFrom<&CheckoutRouterData<&PaymentsAuthorizeRouterData>> for PaymentsRequ
let payment_ip = item.router_data.request.get_ip_address_as_optional();
- let billing_descriptor =
- item.router_data
- .request
- .billing_descriptor
- .as_ref()
- .map(|descriptor| CheckoutBillingDescriptor {
+ let billing_descriptor = item
+ .router_data
+ .request
+ .billing_descriptor
+ .as_ref()
+ .and_then(|descriptor| {
+ (descriptor.name.is_some()
+ || descriptor.city.is_some()
+ || descriptor.reference.is_some())
+ .then(|| CheckoutBillingDescriptor {
name: descriptor.name.clone(),
city: descriptor.city.clone(),
reference: descriptor.reference.clone(),
- });
+ })
+ });
let request = Self {
source: source_var,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
index b5e17e9868..ce206db09a 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js
@@ -7,11 +7,11 @@ const successfulNo3DSCardDetails = {
};
const successfulThreeDSTestCardDetails = {
- card_number: "4111111111111111",
+ card_number: "372688581899681",
card_exp_month: "12",
card_exp_year: "30",
card_holder_name: "joseph Doe",
- card_cvc: "100",
+ card_cvc: "1000",
};
const customerAcceptance = {