Skip to content

Commit

Permalink
add comments in incremental_auth check
Browse files Browse the repository at this point in the history
  • Loading branch information
sai-harsha-vardhan committed Oct 9, 2024
1 parent effbc9b commit 56c77f3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ impl<F: Send + Clone>
.await
.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;

// Incremental authorization should be performed on an amount greater than the original authorized amount (in this case, greater than the net_amount which is sent for authorization)
// request.amount is the total amount that should be authorized in incremental authorization which should be greater than the original authorized amount
if payment_attempt.get_total_amount() > request.amount {
Err(errors::ApiErrorResponse::PreconditionFailed {
message: "Amount should be greater than original authorized amount".to_owned(),
Expand Down

0 comments on commit 56c77f3

Please sign in to comment.