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
fix(cypress): fix return url of cashtocode for local and payment webhook testing section of cypress (#11183)
AdityaWNL1d974bb58d86
diff --git a/crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs b/crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rsindex 536efe28e2..299ed5ef85 100644--- a/crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs@@ -14,6 +14,7 @@ use hyperswitch_domain_models::{};use hyperswitch_interfaces::errors;use masking::Secret;+use router_env::env::{self, Env};use serde::{Deserialize, Serialize};use crate::{@@ -62,7 +63,10 @@ impl TryFrom<(&PaymentsAuthorizeRouterData, FloatMajorUnit)> for CashtocodePayme(item, amount): (&PaymentsAuthorizeRouterData, FloatMajorUnit),) -> Result<Self, Self::Error> {let customer_id = item.get_customer_id()?;- let url = item.request.get_router_return_url()?;+ let url = match env::which() {+ Env::Development => "https://example.com".to_string(),+ _ => item.request.get_router_return_url()?,+ };let mid = get_mid(&item.connector_auth_type,item.request.payment_method_type,diff --git a/cypress-tests/cypress/e2e/spec/Payment/00039-PaymentWebhookFixture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00039-PaymentWebhookFixture.cy.jsindex 0fb7854c26..9270aa52c6 100644--- a/cypress-tests/cypress/e2e/spec/Payment/00039-PaymentWebhookFixture.cy.js+++ b/cypress-tests/cypress/e2e/spec/Payment/00039-PaymentWebhookFixture.cy.js@@ -1,6 +1,7 @@import * as fixtures from "../../../fixtures/imports";import State from "../../../utils/State";import getConnectorDetails, * as utils from "../../configs/Payment/Utils";+import { payment_methods_enabled } from "../../configs/Payment/Commons";let globalState;let connector;@@ -35,6 +36,23 @@ describe("Payment Webhook Tests", () => {cy.task("setGlobalState", globalState.data);});+ it("merchant-create-call-test", () => {+ cy.merchantCreateCallTest(fixtures.merchantCreateBody, globalState);+ });++ it("api-key-create-call-test", () => {+ cy.apiKeyCreateTest(fixtures.apiKeyCreateBody, globalState);+ });++ it("Create merchant connector account", () => {+ cy.createConnectorCallTest(+ "payment_processor",+ fixtures.createConnectorBody,+ payment_methods_enabled,+ globalState+ );+ });+context("NoThreeDS Manual payment flow test", () => {it("create-payment-call-test", () => {const data = getConnectorDetails(globalState.get("connectorId"))[