Skip to content

Commit

Permalink
chore: run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperswitch-bot[bot] committed Dec 17, 2024
1 parent ba456d6 commit 07fd9d8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
2 changes: 1 addition & 1 deletion crates/api_models/src/events/customer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ impl ApiEventMetric for CustomerId {
.to_string(),
})
}
}
}
42 changes: 20 additions & 22 deletions crates/router/src/core/payment_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,17 +853,16 @@ pub async fn create_payment_method(
let customer_id = req.customer_id.to_owned();
let key_manager_state = &(state).into();

db
.find_customer_by_global_id(
key_manager_state,
customer_id.get_string_repr(),
merchant_account.get_id(),
key_store,
merchant_account.storage_scheme,
)
.await
.to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)
.attach_printable("Customer not found for the payment method")?;
db.find_customer_by_global_id(
key_manager_state,
customer_id.get_string_repr(),
merchant_account.get_id(),
key_store,
merchant_account.storage_scheme,
)
.await
.to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)
.attach_printable("Customer not found for the payment method")?;

let payment_method_billing_address: Option<Encryptable<Secret<serde_json::Value>>> = req
.billing
Expand Down Expand Up @@ -973,17 +972,16 @@ pub async fn payment_method_intent_create(
let customer_id = req.customer_id.to_owned();
let key_manager_state = &(state).into();

db
.find_customer_by_global_id(
key_manager_state,
customer_id.get_string_repr(),
merchant_account.get_id(),
key_store,
merchant_account.storage_scheme,
)
.await
.to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)
.attach_printable("Customer not found for the payment method")?;
db.find_customer_by_global_id(
key_manager_state,
customer_id.get_string_repr(),
merchant_account.get_id(),
key_store,
merchant_account.storage_scheme,
)
.await
.to_not_found_response(errors::ApiErrorResponse::CustomerNotFound)
.attach_printable("Customer not found for the payment method")?;

let payment_method_billing_address: Option<Encryptable<Secret<serde_json::Value>>> = req
.billing
Expand Down

0 comments on commit 07fd9d8

Please sign in to comment.