feat(connector): [PlaceToPay] Implement Cards for PlaceToPay (#3117)

Signed-off-by: chikke srujan <121822803+srujanchikke@users.noreply.github.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
chikke srujan
2023-12-17 13:25:53 +05:30
committed by GitHub
parent 62c0c47e99
commit 107c66fec3
7 changed files with 483 additions and 131 deletions

View File

@ -1630,6 +1630,12 @@ pub fn is_manual_capture(capture_method: Option<enums::CaptureMethod>) -> bool {
|| capture_method == Some(enums::CaptureMethod::ManualMultiple)
}
pub fn generate_random_bytes(length: usize) -> Vec<u8> {
// returns random bytes of length n
let mut rng = rand::thread_rng();
(0..length).map(|_| rand::Rng::gen(&mut rng)).collect()
}
pub fn validate_currency(
request_currency: types::storage::enums::Currency,
merchant_config_currency: Option<types::storage::enums::Currency>,