Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
feat(core): Added Crypto and Mifinity Wallet PaymentMethod for Hyperswitch <> UCS Integration (#10076)
Shubhodip pal7f350f0b1768
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rsindex f1c97d7491..7296be2df1 100644--- a/crates/router/src/core/unified_connector_service.rs+++ b/crates/router/src/core/unified_connector_service.rs@@ -42,8 +42,9 @@ use masking::{ExposeInterface, PeekInterface, Secret};use router_env::{instrument, logger, tracing};use unified_connector_service_cards::CardNumber;use unified_connector_service_client::payments::{- self as payments_grpc, payment_method::PaymentMethod, CardDetails, CardPaymentMethodType,- PaymentServiceAuthorizeResponse, RewardPaymentMethodType,+ self as payments_grpc, payment_method::PaymentMethod, wallet_payment_method_type::WalletType,+ CardDetails, CardPaymentMethodType, CryptoCurrency, CryptoCurrencyPaymentMethodType,+ PaymentServiceAuthorizeResponse, RewardPaymentMethodType, WalletPaymentMethodType,};#[cfg(feature = "v2")]@@ -873,6 +874,36 @@ pub fn build_unified_connector_service_payment_method(.into()),}}+ hyperswitch_domain_models::payment_method_data::PaymentMethodData::Wallet(wallet_data) => {+ match wallet_data {+ hyperswitch_domain_models::payment_method_data::WalletData::Mifinity(+ mifinity_data,+ ) => Ok(payments_grpc::PaymentMethod {+ payment_method: Some(PaymentMethod::Wallet(WalletPaymentMethodType {+ wallet_type: Some(WalletType::Mifinity(payments_grpc::MifinityWallet {+ date_of_birth: Some(+ mifinity_data.date_of_birth.peek().to_string().into(),+ ),+ language_preference: mifinity_data.language_preference,+ })),+ })),+ }),+ _ => Err(UnifiedConnectorServiceError::NotImplemented(format!(+ "Unimplemented payment method subtype: {payment_method_type:?}"+ ))+ .into()),+ }+ }+ hyperswitch_domain_models::payment_method_data::PaymentMethodData::Crypto(crypto_data) => {+ Ok(payments_grpc::PaymentMethod {+ payment_method: Some(PaymentMethod::Crypto(CryptoCurrencyPaymentMethodType {+ crypto_currency: Some(CryptoCurrency {+ pay_currency: crypto_data.pay_currency.clone(),+ network: crypto_data.network.clone(),+ }),+ })),+ })+ }_ => Err(UnifiedConnectorServiceError::NotImplemented(format!("Unimplemented payment method: {payment_method_data:?}"))