mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	feat(core): create a process_tracker workflow for PCR (#7124)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -350,6 +350,25 @@ pub fn get_outgoing_webhook_retry_schedule_time( | ||||
|     } | ||||
| } | ||||
|  | ||||
| pub fn get_pcr_payments_retry_schedule_time( | ||||
|     mapping: process_data::RevenueRecoveryPaymentProcessTrackerMapping, | ||||
|     merchant_id: &common_utils::id_type::MerchantId, | ||||
|     retry_count: i32, | ||||
| ) -> Option<i32> { | ||||
|     let mapping = match mapping.custom_merchant_mapping.get(merchant_id) { | ||||
|         Some(map) => map.clone(), | ||||
|         None => mapping.default_mapping, | ||||
|     }; | ||||
|     // TODO: check if the current scheduled time is not more than the configured timerange | ||||
|  | ||||
|     // For first try, get the `start_after` time | ||||
|     if retry_count == 0 { | ||||
|         Some(mapping.start_after) | ||||
|     } else { | ||||
|         get_delay(retry_count, &mapping.frequencies) | ||||
|     } | ||||
| } | ||||
|  | ||||
| /// Get the delay based on the retry count | ||||
| pub fn get_delay<'a>( | ||||
|     retry_count: i32, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Amisha Prabhat
					Amisha Prabhat