feat(router): Support card in payment_method_subtype [V2] (#7662)

This commit is contained in:
Anurag Thakur
2025-04-08 15:18:55 +05:30
committed by GitHub
parent bce9d48277
commit 187cceb39d
33 changed files with 348 additions and 73 deletions

View File

@ -1755,6 +1755,8 @@ pub enum PaymentMethodType {
BcaBankTransfer,
BniVa,
BriVa,
#[cfg(feature = "v2")]
Card,
CardRedirect,
CimbVa,
#[serde(rename = "classic")]
@ -1867,6 +1869,8 @@ impl PaymentMethodType {
Self::CardRedirect => "Card Redirect",
Self::CimbVa => "CIMB Virtual Account",
Self::ClassicReward => "Classic Reward",
#[cfg(feature = "v2")]
Self::Card => "Card",
Self::Credit => "Credit Card",
Self::CryptoCurrency => "Crypto",
Self::Cashapp => "Cash App",

View File

@ -1815,6 +1815,8 @@ impl From<PaymentMethodType> for PaymentMethod {
PaymentMethodType::CimbVa => Self::BankTransfer,
PaymentMethodType::ClassicReward => Self::Reward,
PaymentMethodType::Credit => Self::Card,
#[cfg(feature = "v2")]
PaymentMethodType::Card => Self::Card,
PaymentMethodType::CryptoCurrency => Self::Crypto,
PaymentMethodType::Dana => Self::Wallet,
PaymentMethodType::DanamonVa => Self::BankTransfer,