feat(router): modify attempt_id generation logic to accommodate payment_id as prefix (#1596)

This commit is contained in:
Sai Harsha Vardhan
2023-07-04 19:12:52 +05:30
committed by GitHub
parent 6447b04574
commit 82e1bf0d16
9 changed files with 38 additions and 6 deletions

View File

@ -150,3 +150,8 @@ pub fn to_currency_base_unit_asf64(
};
Ok(amount)
}
#[inline]
pub fn get_payment_attempt_id(payment_id: impl std::fmt::Display, attempt_count: i16) -> String {
format!("{payment_id}_{attempt_count}")
}