refactor: pass customer object to make_pm_data (#3246)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Chethan Rao
2024-01-09 20:06:28 +05:30
committed by GitHub
parent eba789640b
commit 36c32c377a
17 changed files with 100 additions and 21 deletions

View File

@ -458,7 +458,7 @@ pub trait ConnectorActions: Connector {
customer_details: Some(payments::CustomerDetails {
customer_id: core_utils::get_or_generate_id("customer_id", &None, "cust_").ok(),
name: Some(Secret::new("John Doe".to_string())),
email: TryFrom::try_from("john.doe@example".to_string()).ok(),
email: Email::from_str("john.doe@example").ok(),
phone: Some(Secret::new("620874518".to_string())),
phone_country_code: Some("+31".to_string()),
}),
@ -996,7 +996,7 @@ impl Default for CustomerType {
let data = types::ConnectorCustomerData {
payment_method_data: types::api::PaymentMethodData::Card(CCardType::default().0),
description: None,
email: Some(Email::from(Secret::new("test@juspay.in".to_string()))),
email: Email::from_str("test@juspay.in").ok(),
phone: None,
name: None,
preprocessing_id: None,