mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
@ -42,7 +42,7 @@ pub struct StripeAddressDetails {
|
||||
pub struct CreateCustomerRequest {
|
||||
pub email: Option<Email>,
|
||||
pub invoice_prefix: Option<String>,
|
||||
pub name: Option<common_utils::types::NameType>,
|
||||
pub name: Option<masking::Secret<String>>,
|
||||
pub phone: Option<masking::Secret<String>>,
|
||||
pub address: Option<StripeAddressDetails>,
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
@ -64,7 +64,7 @@ pub struct StripeCard {
|
||||
pub exp_month: masking::Secret<String>,
|
||||
pub exp_year: masking::Secret<String>,
|
||||
pub cvc: masking::Secret<String>,
|
||||
pub holder_name: Option<common_utils::types::NameType>,
|
||||
pub holder_name: Option<masking::Secret<String>>,
|
||||
}
|
||||
|
||||
// ApplePay wallet param is not available in stripe Docs
|
||||
@ -169,7 +169,7 @@ impl From<StripePaymentMethodDetails> for payments::PaymentMethodData {
|
||||
#[derive(Default, Serialize, PartialEq, Eq, Deserialize, Clone, Debug)]
|
||||
pub struct Shipping {
|
||||
pub address: AddressDetails,
|
||||
pub name: Option<common_utils::types::NameType>,
|
||||
pub name: Option<masking::Secret<String>>,
|
||||
pub carrier: Option<String>,
|
||||
pub phone: Option<masking::Secret<String>>,
|
||||
pub tracking_number: Option<masking::Secret<String>>,
|
||||
@ -950,9 +950,7 @@ fn get_pmd_based_on_payment_method_type(
|
||||
payments::PaymentMethodData::BankRedirect(payments::BankRedirectData::Ideal {
|
||||
billing_details: billing_details.as_ref().map(|billing_data| {
|
||||
payments::BankRedirectBilling {
|
||||
billing_name: billing_data
|
||||
.get_optional_full_name()
|
||||
.map(common_utils::types::NameType::get_unchecked_from_secret), // this is unchecked because the input is coming from a checked type
|
||||
billing_name: billing_data.get_optional_full_name(),
|
||||
email: billing_data.email.clone(),
|
||||
}
|
||||
}),
|
||||
|
||||
@ -96,9 +96,7 @@ impl From<StripeCard> for payments::Card {
|
||||
card_number: card.number,
|
||||
card_exp_month: card.exp_month,
|
||||
card_exp_year: card.exp_year,
|
||||
card_holder_name: Some(common_utils::types::NameType::get_unchecked(String::from(
|
||||
"Stripe_cust",
|
||||
))), // this is unchecked because valid input is being provided
|
||||
card_holder_name: Some(masking::Secret::new("stripe_cust".to_owned())),
|
||||
card_cvc: card.cvc,
|
||||
card_issuer: None,
|
||||
card_network: None,
|
||||
|
||||
Reference in New Issue
Block a user