Skip to content

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

refactor(connector): [Iatapay] remove default case handling (#2587)

HeetVekariya6494e8a6e4a1
diff --git a/crates/router/src/connector/iatapay/transformers.rs b/crates/router/src/connector/iatapay/transformers.rs
index 9d4ecdff19..f98798fe5b 100644
--- a/crates/router/src/connector/iatapay/transformers.rs
+++ b/crates/router/src/connector/iatapay/transformers.rs
@@ -86,7 +86,18 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for IatapayPaymentsRequest {
let payment_method = item.payment_method;
let country = match payment_method {
PaymentMethod::Upi => "IN".to_string(),
- _ => item.get_billing_country()?.to_string(),
+
+ PaymentMethod::Card
+ | PaymentMethod::CardRedirect
+ | PaymentMethod::PayLater
+ | PaymentMethod::Wallet
+ | PaymentMethod::BankRedirect
+ | PaymentMethod::BankTransfer
+ | PaymentMethod::Crypto
+ | PaymentMethod::BankDebit
+ | PaymentMethod::Reward
+ | PaymentMethod::Voucher
+ | PaymentMethod::GiftCard => item.get_billing_country()?.to_string(),
};
let return_url = item.get_return_url()?;
let payer_info = match item.request.payment_method_data.clone() {