mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
feat(payment_methods): added kv support for payment_methods table (#4311)
Co-authored-by: Akshay S <akshay.s@Akshay-Subramanian-D66TQ6D97K.local> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -38,6 +38,7 @@ pub trait PaymentMethodRetrieve {
|
||||
payment_intent: &PaymentIntent,
|
||||
card_token_data: Option<&CardToken>,
|
||||
customer: &Option<domain::Customer>,
|
||||
storage_scheme: common_enums::enums::MerchantStorageScheme,
|
||||
) -> RouterResult<storage::PaymentMethodDataWithId>;
|
||||
}
|
||||
|
||||
@ -122,6 +123,7 @@ impl PaymentMethodRetrieve for Oss {
|
||||
payment_intent: &PaymentIntent,
|
||||
card_token_data: Option<&CardToken>,
|
||||
customer: &Option<domain::Customer>,
|
||||
storage_scheme: common_enums::enums::MerchantStorageScheme,
|
||||
) -> RouterResult<storage::PaymentMethodDataWithId> {
|
||||
let token = match token_data {
|
||||
storage::PaymentTokenData::TemporaryGeneric(generic_token) => {
|
||||
@ -172,6 +174,8 @@ impl PaymentMethodRetrieve for Oss {
|
||||
.unwrap_or(&card_token.token),
|
||||
payment_intent,
|
||||
card_token_data,
|
||||
merchant_key_store,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
.map(|card| Some((card, enums::PaymentMethod::Card)))?
|
||||
@ -201,6 +205,8 @@ impl PaymentMethodRetrieve for Oss {
|
||||
.unwrap_or(&card_token.token),
|
||||
payment_intent,
|
||||
card_token_data,
|
||||
merchant_key_store,
|
||||
storage_scheme,
|
||||
)
|
||||
.await
|
||||
.map(|card| Some((card, enums::PaymentMethod::Card)))?
|
||||
|
||||
Reference in New Issue
Block a user