refactor(router): changed payment method token TTL to api contract based config from const value (#5115)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2024-07-02 13:49:45 +05:30
committed by GitHub
parent ee9190bf4f
commit 3bbdfb5a1c
20 changed files with 121 additions and 68 deletions

View File

@ -42,6 +42,7 @@ pub async fn retrieve_payment_method(
payment_intent: &PaymentIntent,
payment_attempt: &PaymentAttempt,
merchant_key_store: &domain::MerchantKeyStore,
business_profile: Option<&diesel_models::business_profile::BusinessProfile>,
) -> RouterResult<(Option<payments::PaymentMethodData>, Option<String>)> {
match pm_data {
pm_opt @ Some(pm @ api::PaymentMethodData::Card(_)) => {
@ -52,6 +53,7 @@ pub async fn retrieve_payment_method(
enums::PaymentMethod::Card,
pm,
merchant_key_store,
business_profile,
)
.await?;
@ -74,6 +76,7 @@ pub async fn retrieve_payment_method(
enums::PaymentMethod::BankTransfer,
pm,
merchant_key_store,
business_profile,
)
.await?;
@ -87,6 +90,7 @@ pub async fn retrieve_payment_method(
enums::PaymentMethod::Wallet,
pm,
merchant_key_store,
business_profile,
)
.await?;
@ -100,6 +104,7 @@ pub async fn retrieve_payment_method(
enums::PaymentMethod::BankRedirect,
pm,
merchant_key_store,
business_profile,
)
.await?;