Skip to content

Commit

Permalink
ci check
Browse files Browse the repository at this point in the history
  • Loading branch information
ShankarSinghC committed Nov 8, 2024
1 parent d66aaeb commit ca4e7ce
Showing 1 changed file with 6 additions and 26 deletions.
32 changes: 6 additions & 26 deletions crates/router/src/core/payments/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4788,32 +4788,17 @@ pub fn validate_customer_access(

pub fn is_apple_pay_simplified_flow(
connector_metadata: Option<pii::SecretSerdeValue>,
connector_wallets_details: Option<pii::SecretSerdeValue>,
connector_name: Option<&String>,
) -> CustomResult<bool, errors::ApiErrorResponse> {
let connector_apple_pay_wallet_details =
get_applepay_metadata(connector_wallets_details)
.map_err(|error| {
logger::debug!(
"Apple pay connector wallets details parsing failed for {:?} in is_apple_pay_simplified_flow {:?}",
connector_name,
error
)
})
.ok();

let option_apple_pay_metadata = match connector_apple_pay_wallet_details {
Some(apple_pay_wallet_details) => Some(apple_pay_wallet_details),
None => get_applepay_metadata(connector_metadata)
.map_err(|error| {
logger::debug!(
"Apple pay metadata parsing failed for {:?} in is_apple_pay_simplified_flow {:?}",
let option_apple_pay_metadata = get_applepay_metadata(connector_metadata)
.map_err(|error| {
logger::info!(
"Apple pay metadata parsing for {:?} in is_apple_pay_simplified_flow {:?}",
connector_name,
error
)
})
.ok(),
};
})
.ok();

// return true only if the apple flow type is simplified
Ok(matches!(
Expand Down Expand Up @@ -4999,7 +4984,6 @@ where

let connector_data_list = if is_apple_pay_simplified_flow(
merchant_connector_account_type.get_metadata(),
merchant_connector_account_type.get_connector_wallets_details(),
merchant_connector_account_type
.get_connector_name()
.as_ref(),
Expand Down Expand Up @@ -5027,10 +5011,6 @@ where
for merchant_connector_account in profile_specific_merchant_connector_account_list {
if is_apple_pay_simplified_flow(
merchant_connector_account.metadata.clone(),
merchant_connector_account
.connector_wallets_details
.as_deref()
.cloned(),
Some(&merchant_connector_account.connector_name),
)? {
let connector_data = api::ConnectorData::get_connector_by_name(
Expand Down

0 comments on commit ca4e7ce

Please sign in to comment.