feat(core): Payments core modification for open banking connectors (#3947)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sarthak Soni
2024-07-17 14:57:50 +05:30
committed by GitHub
parent ecc862c354
commit eb6f27d64e
101 changed files with 1101 additions and 48 deletions

View File

@ -103,6 +103,7 @@ impl IntoDirValue for api_enums::PaymentMethod {
Self::Voucher => Ok(dirval!(PaymentMethod = Voucher)),
Self::GiftCard => Ok(dirval!(PaymentMethod = GiftCard)),
Self::CardRedirect => Ok(dirval!(PaymentMethod = CardRedirect)),
Self::OpenBanking => Ok(dirval!(PaymentMethod = OpenBanking)),
}
}
}
@ -158,6 +159,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
AnalysisErrorType::NotSupported,
)),
@ -175,6 +177,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
AnalysisErrorType::NotSupported,
)),
@ -193,6 +196,7 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
| api_enums::PaymentMethod::RealTimePayment
| api_enums::PaymentMethod::Upi
| api_enums::PaymentMethod::Voucher
| api_enums::PaymentMethod::OpenBanking
| api_enums::PaymentMethod::GiftCard => Err(KgraphError::ContextConstructionError(
AnalysisErrorType::NotSupported,
)),
@ -300,6 +304,9 @@ impl IntoDirValue for (api_enums::PaymentMethodType, api_enums::PaymentMethod) {
api_enums::PaymentMethodType::DuitNow => Ok(dirval!(RealTimePaymentType = DuitNow)),
api_enums::PaymentMethodType::PromptPay => Ok(dirval!(RealTimePaymentType = PromptPay)),
api_enums::PaymentMethodType::VietQr => Ok(dirval!(RealTimePaymentType = VietQr)),
api_enums::PaymentMethodType::OpenBankingPIS => {
Ok(dirval!(OpenBankingType = OpenBankingPIS))
}
}
}
}