From 64809759573d3aea9c06474837fe8111a82b5ae3 Mon Sep 17 00:00:00 2001 From: Shankar Singh C Date: Fri, 8 Nov 2024 13:43:17 +0530 Subject: [PATCH] fix(router): get apple pay certifiactes only from metadata during the session call --- .../src/core/payments/flows/session_flow.rs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/crates/router/src/core/payments/flows/session_flow.rs b/crates/router/src/core/payments/flows/session_flow.rs index ba8054696a11..545d05e776fa 100644 --- a/crates/router/src/core/payments/flows/session_flow.rs +++ b/crates/router/src/core/payments/flows/session_flow.rs @@ -189,20 +189,11 @@ async fn create_applepay_session_token( ) } else { // Get the apple pay metadata - let connector_apple_pay_wallet_details = - helpers::get_applepay_metadata(router_data.connector_wallets_details.clone()) - .map_err(|error| { - logger::debug!( - "Apple pay connector wallets details parsing failed in create_applepay_session_token {:?}", - error - ) - }) - .ok(); - - let apple_pay_metadata = match connector_apple_pay_wallet_details { - Some(apple_pay_wallet_details) => apple_pay_wallet_details, - None => helpers::get_applepay_metadata(router_data.connector_meta_data.clone())?, - }; + let apple_pay_metadata = + helpers::get_applepay_metadata(router_data.connector_meta_data.clone()) + .attach_printable( + "Failed to to fetch apple pay certificates during session call", + )?; // Get payment request data , apple pay session request and merchant keys let (