Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(core): Delete-tokenize scheduling for initial task and retries (#13375)

Sayak Bhattacharya4a4e00d4bf49
diff --git a/crates/router/src/core/payment_methods/vault.rs b/crates/router/src/core/payment_methods/vault.rs
index fc64c66b55..76fb2000fb 100644
--- a/crates/router/src/core/payment_methods/vault.rs
+++ b/crates/router/src/core/payment_methods/vault.rs
@@ -3026,7 +3026,7 @@ pub async fn get_delete_tokenize_schedule_time(
process_data::PaymentMethodsPTMapping::default()
}
};
- let time_delta = process_tracker_utils::get_pm_schedule_time(mapping, pm, retry_count + 1);
+ let time_delta = process_tracker_utils::get_pm_schedule_time(mapping, pm, retry_count);
process_tracker_utils::get_time_from_delta(time_delta)
}
@@ -3036,7 +3036,7 @@ pub async fn retry_delete_tokenize(
pm: enums::PaymentMethod,
pt: storage::ProcessTracker,
) -> Result<(), errors::ProcessTrackerError> {
- let schedule_time = get_delete_tokenize_schedule_time(db, pm, pt.retry_count).await;
+ let schedule_time = get_delete_tokenize_schedule_time(db, pm, pt.retry_count + 1).await;
match schedule_time {
Some(s_time) => {