fix: amount_captured goes to 0 for 3ds payments (#2954)

This commit is contained in:
Hrithikesh
2023-11-23 13:03:42 +05:30
committed by GitHub
parent e721b06c70
commit 75eea7e817
7 changed files with 65 additions and 36 deletions

View File

@ -111,14 +111,8 @@ where
}
}
enums::AttemptStatus::Charged => {
let captured_amount = if self.request.is_psync() {
payment_data
.payment_attempt
.amount_to_capture
.or(Some(payment_data.payment_attempt.get_total_amount()))
} else {
types::Capturable::get_capture_amount(&self.request)
};
let captured_amount =
types::Capturable::get_capture_amount(&self.request, payment_data);
if Some(payment_data.payment_attempt.get_total_amount()) == captured_amount {
enums::AttemptStatus::Charged
} else if captured_amount.is_some() {