mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor(customer_v2): fixed customer_v2 create panic issue (#5699)
This commit is contained in:
		| @ -45,7 +45,21 @@ pub const IRRELEVANT_CONNECTOR_REQUEST_REFERENCE_ID_IN_PAYOUTS_FLOW: &str = | ||||
| const IRRELEVANT_PAYMENT_ID_IN_DISPUTE_FLOW: &str = "irrelevant_payment_id_in_dispute_flow"; | ||||
| const IRRELEVANT_ATTEMPT_ID_IN_DISPUTE_FLOW: &str = "irrelevant_attempt_id_in_dispute_flow"; | ||||
|  | ||||
| #[cfg(feature = "payouts")] | ||||
| #[cfg(all(feature = "payouts", feature = "v2", feature = "customer_v2"))] | ||||
| #[instrument(skip_all)] | ||||
| pub async fn construct_payout_router_data<'a, F>( | ||||
|     _connector_data: &api::ConnectorData, | ||||
|     _merchant_account: &domain::MerchantAccount, | ||||
|     _payout_data: &mut PayoutData, | ||||
| ) -> RouterResult<types::PayoutsRouterData<F>> { | ||||
|     todo!() | ||||
| } | ||||
|  | ||||
| #[cfg(all( | ||||
|     feature = "payouts", | ||||
|     any(feature = "v1", feature = "v2"), | ||||
|     not(feature = "customer_v2") | ||||
| ))] | ||||
| #[instrument(skip_all)] | ||||
| pub async fn construct_payout_router_data<'a, F>( | ||||
|     connector_data: &api::ConnectorData, | ||||
| @ -131,7 +145,7 @@ pub async fn construct_payout_router_data<'a, F>( | ||||
|     let router_data = types::RouterData { | ||||
|         flow: PhantomData, | ||||
|         merchant_id: merchant_account.get_id().to_owned(), | ||||
|         customer_id: customer_details.to_owned().map(|c| c.get_customer_id()), | ||||
|         customer_id: customer_details.to_owned().map(|c| c.customer_id), | ||||
|         connector_customer: connector_customer_id, | ||||
|         connector: connector_name.to_string(), | ||||
|         payment_id: "".to_string(), | ||||
| @ -162,7 +176,7 @@ pub async fn construct_payout_router_data<'a, F>( | ||||
|             customer_details: customer_details | ||||
|                 .to_owned() | ||||
|                 .map(|c| payments::CustomerDetails { | ||||
|                     customer_id: Some(c.get_customer_id()), | ||||
|                     customer_id: Some(c.customer_id), | ||||
|                     name: c.name.map(Encryptable::into_inner), | ||||
|                     email: c.email.map(Email::from), | ||||
|                     phone: c.phone.map(Encryptable::into_inner), | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Sahkal Poddar
					Sahkal Poddar