mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-11-04 05:59:48 +08:00 
			
		
		
		
	fix: cybersource mandates and fiserv exp year (#2920)
Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
This commit is contained in:
		@ -322,6 +322,7 @@ impl PaymentsCaptureRequestData for types::PaymentsCaptureData {
 | 
			
		||||
 | 
			
		||||
pub trait PaymentsSetupMandateRequestData {
 | 
			
		||||
    fn get_browser_info(&self) -> Result<types::BrowserInformation, Error>;
 | 
			
		||||
    fn get_email(&self) -> Result<Email, Error>;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl PaymentsSetupMandateRequestData for types::SetupMandateRequestData {
 | 
			
		||||
@ -330,6 +331,9 @@ impl PaymentsSetupMandateRequestData for types::SetupMandateRequestData {
 | 
			
		||||
            .clone()
 | 
			
		||||
            .ok_or_else(missing_field_err("browser_info"))
 | 
			
		||||
    }
 | 
			
		||||
    fn get_email(&self) -> Result<Email, Error> {
 | 
			
		||||
        self.email.clone().ok_or_else(missing_field_err("email"))
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
pub trait PaymentsAuthorizeRequestData {
 | 
			
		||||
    fn is_auto_capture(&self) -> Result<bool, Error>;
 | 
			
		||||
@ -869,6 +873,7 @@ impl CryptoData for api::CryptoData {
 | 
			
		||||
pub trait PhoneDetailsData {
 | 
			
		||||
    fn get_number(&self) -> Result<Secret<String>, Error>;
 | 
			
		||||
    fn get_country_code(&self) -> Result<String, Error>;
 | 
			
		||||
    fn get_number_with_country_code(&self) -> Result<Secret<String>, Error>;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl PhoneDetailsData for api::PhoneDetails {
 | 
			
		||||
@ -882,6 +887,11 @@ impl PhoneDetailsData for api::PhoneDetails {
 | 
			
		||||
            .clone()
 | 
			
		||||
            .ok_or_else(missing_field_err("billing.phone.number"))
 | 
			
		||||
    }
 | 
			
		||||
    fn get_number_with_country_code(&self) -> Result<Secret<String>, Error> {
 | 
			
		||||
        let number = self.get_number()?;
 | 
			
		||||
        let country_code = self.get_country_code()?;
 | 
			
		||||
        Ok(Secret::new(format!("{}{}", country_code, number.peek())))
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pub trait AddressDetailsData {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user