Skip to content

Commit

Permalink
Merge branch 'main' into gpay-default-boa
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshu-iiitu authored Nov 29, 2023
2 parents 8b70f5b + de8e31b commit 41ca2a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
21 changes: 9 additions & 12 deletions crates/router/src/connector/stax/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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"),
))?,
}
}
}
Expand Down Expand Up @@ -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"),
))?,
}
}
}
Expand Down
14 changes: 6 additions & 8 deletions crates/router/src/connector/volt/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,9 @@ impl TryFrom<&VoltRouterData<&types::PaymentsAuthorizeRouterData>> for VoltPayme
| api_models::payments::BankRedirectData::Trustly { .. }
| api_models::payments::BankRedirectData::OnlineBankingFpx { .. }
| api_models::payments::BankRedirectData::OnlineBankingThailand { .. } => {
Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "Volt",
}
Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Volt"),
)
.into())
}
},
Expand All @@ -150,10 +149,9 @@ impl TryFrom<&VoltRouterData<&types::PaymentsAuthorizeRouterData>> for VoltPayme
| api_models::payments::PaymentMethodData::Voucher(_)
| api_models::payments::PaymentMethodData::GiftCard(_)
| api_models::payments::PaymentMethodData::CardToken(_) => {
Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "Volt",
}
Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("Volt"),
)
.into())
}
}
Expand Down

0 comments on commit 41ca2a9

Please sign in to comment.