Skip to content

Commit

Permalink
fix(router): get apple pay certifiactes only from metadata during the…
Browse files Browse the repository at this point in the history
… session call
  • Loading branch information
ShankarSinghC committed Nov 8, 2024
1 parent 01951de commit 6480975
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions crates/router/src/core/payments/flows/session_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 6480975

Please sign in to comment.