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

fix(router): fixed ctp bug calling confirmation when UAS is eligible even though CTP is disabled (#7654)

Sahkal Poddard349a50b6100
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index 5b7ead3f4f..5146863a28 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -6805,14 +6805,16 @@ pub async fn decide_action_for_unified_authentication_service<F: Clone>(
)
}
None => {
- if *do_authorisation_confirmation {
- Some(UnifiedAuthenticationServiceFlow::ClickToPayConfirmation)
- } else if let Some(payment_method) = payment_data.payment_attempt.payment_method {
+ if let Some(payment_method) = payment_data.payment_attempt.payment_method {
if payment_method == storage_enums::PaymentMethod::Card
&& business_profile.is_click_to_pay_enabled
&& payment_data.service_details.is_some()
{
- Some(UnifiedAuthenticationServiceFlow::ClickToPayInitiate)
+ if *do_authorisation_confirmation {
+ Some(UnifiedAuthenticationServiceFlow::ClickToPayConfirmation)
+ } else {
+ Some(UnifiedAuthenticationServiceFlow::ClickToPayInitiate)
+ }
} else {
None
}