mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	refactor(connector): [Airwallex] Remove default case handling (#2703)
This commit is contained in:
		| @ -186,8 +186,18 @@ impl TryFrom<&AirwallexRouterData<&types::PaymentsAuthorizeRouterData>> | ||||
|                 })) | ||||
|             } | ||||
|             api::PaymentMethodData::Wallet(ref wallet_data) => get_wallet_details(wallet_data), | ||||
|             _ => Err(errors::ConnectorError::NotImplemented( | ||||
|                 "Unknown payment method".to_string(), | ||||
|             api::PaymentMethodData::PayLater(_) | ||||
|             | api::PaymentMethodData::BankRedirect(_) | ||||
|             | api::PaymentMethodData::BankDebit(_) | ||||
|             | api::PaymentMethodData::BankTransfer(_) | ||||
|             | api::PaymentMethodData::CardRedirect(_) | ||||
|             | api::PaymentMethodData::Crypto(_) | ||||
|             | api::PaymentMethodData::MandatePayment | ||||
|             | api::PaymentMethodData::Reward | ||||
|             | api::PaymentMethodData::Upi(_) | ||||
|             | api::PaymentMethodData::Voucher(_) | ||||
|             | api::PaymentMethodData::GiftCard(_) => Err(errors::ConnectorError::NotImplemented( | ||||
|                 utils::get_unimplemented_payment_method_error_message("airwallex"), | ||||
|             )), | ||||
|         }?; | ||||
|  | ||||
| @ -215,9 +225,35 @@ fn get_wallet_details( | ||||
|                 payment_method_type: AirwallexPaymentType::Googlepay, | ||||
|             })) | ||||
|         } | ||||
|         _ => Err(errors::ConnectorError::NotImplemented( | ||||
|             "Payment method".to_string(), | ||||
|         ))?, | ||||
|         api_models::payments::WalletData::AliPayQr(_) | ||||
|         | api_models::payments::WalletData::AliPayRedirect(_) | ||||
|         | api_models::payments::WalletData::AliPayHkRedirect(_) | ||||
|         | api_models::payments::WalletData::MomoRedirect(_) | ||||
|         | api_models::payments::WalletData::KakaoPayRedirect(_) | ||||
|         | api_models::payments::WalletData::GoPayRedirect(_) | ||||
|         | api_models::payments::WalletData::GcashRedirect(_) | ||||
|         | api_models::payments::WalletData::ApplePay(_) | ||||
|         | api_models::payments::WalletData::ApplePayRedirect(_) | ||||
|         | api_models::payments::WalletData::ApplePayThirdPartySdk(_) | ||||
|         | api_models::payments::WalletData::DanaRedirect {} | ||||
|         | api_models::payments::WalletData::GooglePayRedirect(_) | ||||
|         | api_models::payments::WalletData::GooglePayThirdPartySdk(_) | ||||
|         | api_models::payments::WalletData::MbWayRedirect(_) | ||||
|         | api_models::payments::WalletData::MobilePayRedirect(_) | ||||
|         | api_models::payments::WalletData::PaypalRedirect(_) | ||||
|         | api_models::payments::WalletData::PaypalSdk(_) | ||||
|         | api_models::payments::WalletData::SamsungPay(_) | ||||
|         | api_models::payments::WalletData::TwintRedirect {} | ||||
|         | api_models::payments::WalletData::VippsRedirect {} | ||||
|         | api_models::payments::WalletData::TouchNGoRedirect(_) | ||||
|         | api_models::payments::WalletData::WeChatPayRedirect(_) | ||||
|         | api_models::payments::WalletData::WeChatPayQr(_) | ||||
|         | api_models::payments::WalletData::CashappQr(_) | ||||
|         | api_models::payments::WalletData::SwishQr(_) => { | ||||
|             Err(errors::ConnectorError::NotImplemented( | ||||
|                 utils::get_unimplemented_payment_method_error_message("airwallex"), | ||||
|             ))? | ||||
|         } | ||||
|     }; | ||||
|     Ok(wallet_details) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Hangsaai
					Hangsaai