fix(router): store network_transaction_id in stripe authorize flow (#5399)

This commit is contained in:
Shankar Singh C
2024-07-22 22:33:57 +05:30
committed by GitHub
parent 3d385bbf73
commit be78dfc04e

View File

@ -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)?;