mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
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:
@ -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?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user