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): [Stax] change error message from NotSupported to NotImplemented (#2879)

Brian Silah8a4dabc61df3
diff --git a/crates/router/src/connector/stax/transformers.rs b/crates/router/src/connector/stax/transformers.rs
index bb37bf1fc9..5aa0949a09 100644
--- a/crates/router/src/connector/stax/transformers.rs
+++ b/crates/router/src/connector/stax/transformers.rs
@@ -63,10 +63,9 @@ impl TryFrom<&StaxRouterData<&types::PaymentsAuthorizeRouterData>> for StaxPayme
item: &StaxRouterData<&types::PaymentsAuthorizeRouterData>,
) -> Result<Self, Self::Error> {
if item.router_data.request.currency != enums::Currency::USD {
- Err(errors::ConnectorError::NotSupported {
- message: item.router_data.request.currency.to_string(),
- connector: "Stax",
- })?
+ Err(errors::ConnectorError::NotImplemented(
+ utils::get_unimplemented_payment_method_error_message("Stax"),
+ ))?
}
let total = item.amount;
@@ -119,10 +118,9 @@ impl TryFrom<&StaxRouterData<&types::PaymentsAuthorizeRouterData>> for StaxPayme
| api::PaymentMethodData::GiftCard(_)
| api::PaymentMethodData::CardRedirect(_)
| api::PaymentMethodData::Upi(_)
- | api::PaymentMethodData::CardToken(_) => Err(errors::ConnectorError::NotSupported {
- message: "SELECTED_PAYMENT_METHOD".to_string(),
- connector: "Stax",
- })?,
+ | api::PaymentMethodData::CardToken(_) => Err(errors::ConnectorError::NotImplemented(
+ utils::get_unimplemented_payment_method_error_message("Stax"),
+ ))?,
}
}
}
@@ -270,10 +268,9 @@ impl TryFrom<&types::TokenizationRouterData> for StaxTokenRequest {
| api::PaymentMethodData::GiftCard(_)
| api::PaymentMethodData::CardRedirect(_)
| api::PaymentMethodData::Upi(_)
- | api::PaymentMethodData::CardToken(_) => Err(errors::ConnectorError::NotSupported {
- message: "SELECTED_PAYMENT_METHOD".to_string(),
- connector: "Stax",
- })?,
+ | api::PaymentMethodData::CardToken(_) => Err(errors::ConnectorError::NotImplemented(
+ utils::get_unimplemented_payment_method_error_message("Stax"),
+ ))?,
}
}
}