feat(core): add Mobile Payment (Direct Carrier Billing) as a payment method (#6196)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sakil Mostak
2024-11-14 01:19:59 +05:30
committed by GitHub
parent 600cf44684
commit d0a041c361
94 changed files with 1111 additions and 310 deletions

View File

@ -147,6 +147,9 @@ fn get_dir_value_payment_method(
Ok(dirval!(OpenBankingType = OpenBankingPIS))
}
api_enums::PaymentMethodType::Paze => Ok(dirval!(WalletType = Paze)),
api_enums::PaymentMethodType::DirectCarrierBilling => {
Ok(dirval!(MobilePaymentType = DirectCarrierBilling))
}
}
}
@ -421,6 +424,7 @@ fn global_vec_pmt(
global_vector.append(collect_global_variants!(BankTransferType));
global_vector.append(collect_global_variants!(CardRedirectType));
global_vector.append(collect_global_variants!(OpenBankingType));
global_vector.append(collect_global_variants!(MobilePaymentType));
global_vector.push(dir::DirValue::PaymentMethod(
dir::enums::PaymentMethod::Card,
));

View File

@ -104,6 +104,7 @@ impl IntoDirValue for api_enums::PaymentMethod {
Self::GiftCard => Ok(dirval!(PaymentMethod = GiftCard)),
Self::CardRedirect => Ok(dirval!(PaymentMethod = CardRedirect)),
Self::OpenBanking => Ok(dirval!(PaymentMethod = OpenBanking)),
Self::MobilePayment => Ok(dirval!(PaymentMethod = MobilePayment)),
}
}
}
@ -158,6 +159,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::Reward
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::MobilePayment
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
@ -176,6 +178,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::Reward
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::MobilePayment
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
@ -195,6 +198,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::Reward
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::MobilePayment
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
@ -308,6 +312,9 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
Ok(dirval!(OpenBankingType = OpenBankingPIS))
}
api_enums::PaymentMethodType::Paze => Ok(dirval!(WalletType = Paze)),
api_enums::PaymentMethodType::DirectCarrierBilling => {
Ok(dirval!(MobilePaymentType = DirectCarrierBilling))
}
}
}
}