fix: validate refund amount with amount_captured instead of amount (#3120)

This commit is contained in:
Hrithikesh
2023-12-13 19:22:36 +05:30
committed by GitHub
parent d28c82c0ee
commit be13d15d3c
31 changed files with 538 additions and 24 deletions

View File

@ -33,7 +33,7 @@ pub enum StripeErrorCode {
expected_format: String,
},
#[error(error_type = StripeErrorType::InvalidRequestError, code = "IR_06", message = "Refund amount exceeds the payment amount.")]
#[error(error_type = StripeErrorType::InvalidRequestError, code = "IR_06", message = "The refund amount exceeds the amount captured.")]
RefundAmountExceedsPaymentAmount { param: String },
#[error(error_type = StripeErrorType::ApiError, code = "payment_intent_authentication_failure", message = "Payment failed while processing with connector. Retry payment.")]