mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
refactor(router): Remove refunds_v2 feature flag (#8310)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use diesel_models::refund as diesel_refund;
|
||||
use error_stack::report;
|
||||
use router_env::{instrument, tracing};
|
||||
use time::PrimitiveDateTime;
|
||||
@ -45,7 +46,7 @@ pub fn validate_success_transaction(
|
||||
#[instrument(skip_all)]
|
||||
pub fn validate_refund_amount(
|
||||
amount_captured: i64,
|
||||
all_refunds: &[storage::Refund],
|
||||
all_refunds: &[diesel_refund::Refund],
|
||||
refund_amount: i64,
|
||||
) -> CustomResult<(), RefundValidationError> {
|
||||
let total_refunded_amount: i64 = all_refunds
|
||||
@ -86,7 +87,7 @@ pub fn validate_payment_order_age(
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub fn validate_maximum_refund_against_payment_attempt(
|
||||
all_refunds: &[storage::Refund],
|
||||
all_refunds: &[diesel_refund::Refund],
|
||||
refund_max_attempts: usize,
|
||||
) -> CustomResult<(), RefundValidationError> {
|
||||
utils::when(all_refunds.len() > refund_max_attempts, || {
|
||||
|
||||
Reference in New Issue
Block a user