mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
fix(router): fixed integrity check failures in case of 3ds flow in sync flow (#5279)
This commit is contained in:
@ -72,7 +72,7 @@ impl Feature<api::PSync, types::PaymentsSyncData>
|
||||
types::SyncRequestType::MultipleCaptureSync(pending_connector_capture_id_list),
|
||||
Ok(services::CaptureSyncMethod::Individual),
|
||||
) => {
|
||||
let resp = self
|
||||
let mut new_router_data = self
|
||||
.execute_connector_processing_step_for_each_capture(
|
||||
state,
|
||||
pending_connector_capture_id_list,
|
||||
@ -80,7 +80,15 @@ impl Feature<api::PSync, types::PaymentsSyncData>
|
||||
connector_integration,
|
||||
)
|
||||
.await?;
|
||||
Ok(resp)
|
||||
// Initiating Integrity checks
|
||||
let integrity_result = helpers::check_integrity_based_on_flow(
|
||||
&new_router_data.request,
|
||||
&new_router_data.response,
|
||||
);
|
||||
|
||||
new_router_data.integrity_check = integrity_result;
|
||||
|
||||
Ok(new_router_data)
|
||||
}
|
||||
(types::SyncRequestType::MultipleCaptureSync(_), Err(err)) => Err(err),
|
||||
_ => {
|
||||
|
||||
@ -1372,7 +1372,6 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsSyncData
|
||||
.as_ref()
|
||||
.map(|surcharge_details| surcharge_details.final_amount)
|
||||
.unwrap_or(payment_data.amount.into());
|
||||
let captured_amount = payment_data.payment_intent.amount_captured;
|
||||
Ok(Self {
|
||||
amount,
|
||||
integrity_object: None,
|
||||
@ -1395,7 +1394,6 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsSyncData
|
||||
payment_method_type: payment_data.payment_attempt.payment_method_type,
|
||||
currency: payment_data.currency,
|
||||
payment_experience: payment_data.payment_attempt.payment_experience,
|
||||
captured_amount,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user