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: return url none on complete authorize (#3067)
Kartikeya Hegde6eec06b1d6ee
diff --git a/crates/router/src/core/payments/operations/payment_approve.rs b/crates/router/src/core/payments/operations/payment_approve.rsindex fee0326df0..37a3e1a141 100644--- a/crates/router/src/core/payments/operations/payment_approve.rs+++ b/crates/router/src/core/payments/operations/payment_approve.rs@@ -179,7 +179,11 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>payment_intent.shipping_address_id = shipping_address.clone().map(|i| i.address_id);payment_intent.billing_address_id = billing_address.clone().map(|i| i.address_id);- payment_intent.return_url = request.return_url.as_ref().map(|a| a.to_string());+ payment_intent.return_url = request+ .return_url+ .as_ref()+ .map(|a| a.to_string())+ .or(payment_intent.return_url);payment_intent.allowed_payment_method_types = request.get_allowed_payment_method_types_as_value()diff --git a/crates/router/src/core/payments/operations/payment_complete_authorize.rs b/crates/router/src/core/payments/operations/payment_complete_authorize.rsindex 17b71172a3..48b503b96b 100644--- a/crates/router/src/core/payments/operations/payment_complete_authorize.rs+++ b/crates/router/src/core/payments/operations/payment_complete_authorize.rs@@ -131,7 +131,9 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>payment_attempt.browser_info = browser_info;payment_attempt.payment_method_type =payment_method_type.or(payment_attempt.payment_method_type);- payment_attempt.payment_experience = request.payment_experience;+ payment_attempt.payment_experience = request+ .payment_experience+ .or(payment_attempt.payment_experience);currency = payment_attempt.currency.get_required_value("currency")?;amount = payment_attempt.amount.into();@@ -173,7 +175,11 @@ impl<F: Send + Clone, Ctx: PaymentMethodRetrieve>payment_intent.shipping_address_id = shipping_address.clone().map(|i| i.address_id);payment_intent.billing_address_id = billing_address.clone().map(|i| i.address_id);- payment_intent.return_url = request.return_url.as_ref().map(|a| a.to_string());+ payment_intent.return_url = request+ .return_url+ .as_ref()+ .map(|a| a.to_string())+ .or(payment_intent.return_url);payment_intent.allowed_payment_method_types = request.get_allowed_payment_method_types_as_value()