mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	fix(router): store network_transaction_id in stripe authorize flow (#5399)
				
					
				
			This commit is contained in:
		| @ -2389,7 +2389,18 @@ impl<F, T> | ||||
|  | ||||
|         //Note: we might have to call retrieve_setup_intent to get the network_transaction_id in case its not sent in PaymentIntentResponse | ||||
|         // Or we identify the mandate txns before hand and always call SetupIntent in case of mandate payment call | ||||
|         let network_txn_id = Option::foreign_from(item.response.latest_attempt); | ||||
|         let network_txn_id = match item.response.latest_charge.as_ref() { | ||||
|             Some(StripeChargeEnum::ChargeObject(charge_object)) => charge_object | ||||
|                 .payment_method_details | ||||
|                 .as_ref() | ||||
|                 .and_then(|payment_method_details| match payment_method_details { | ||||
|                     StripePaymentMethodDetailsResponse::Card { card } => { | ||||
|                         card.network_transaction_id.clone() | ||||
|                     } | ||||
|                     _ => None, | ||||
|                 }), | ||||
|             _ => None, | ||||
|         }; | ||||
|  | ||||
|         let connector_metadata = | ||||
|             get_connector_metadata(item.response.next_action.as_ref(), item.response.amount)?; | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shankar Singh C
					Shankar Singh C