Skip to content

Commit

Permalink
refactor(connector): default case for worldline (#2674)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hangsaai authored Oct 25, 2023
1 parent 27b9762 commit e6272c6
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions crates/router/src/connector/worldline/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,19 @@ impl
make_bank_redirect_request(&item.router_data.request, bank_redirect)?,
))
}
_ => {
return Err(
errors::ConnectorError::NotImplemented("Payment methods".to_string()).into(),
)
}
api::PaymentMethodData::CardRedirect(_)
| api::PaymentMethodData::Wallet(_)
| api::PaymentMethodData::PayLater(_)
| api::PaymentMethodData::BankDebit(_)
| api::PaymentMethodData::BankTransfer(_)
| 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("worldline"),
))?,
};

let customer =
Expand Down Expand Up @@ -393,10 +401,25 @@ fn make_bank_redirect_request(
},
809,
),
_ => {
return Err(
errors::ConnectorError::NotImplemented("Payment methods".to_string()).into(),
payments::BankRedirectData::BancontactCard { .. }
| payments::BankRedirectData::Bizum {}
| payments::BankRedirectData::Blik { .. }
| payments::BankRedirectData::Eps { .. }
| payments::BankRedirectData::Interac { .. }
| payments::BankRedirectData::OnlineBankingCzechRepublic { .. }
| payments::BankRedirectData::OnlineBankingFinland { .. }
| payments::BankRedirectData::OnlineBankingPoland { .. }
| payments::BankRedirectData::OnlineBankingSlovakia { .. }
| payments::BankRedirectData::OpenBankingUk { .. }
| payments::BankRedirectData::Przelewy24 { .. }
| payments::BankRedirectData::Sofort { .. }
| payments::BankRedirectData::Trustly { .. }
| payments::BankRedirectData::OnlineBankingFpx { .. }
| payments::BankRedirectData::OnlineBankingThailand { .. } => {
return Err(errors::ConnectorError::NotImplemented(
utils::get_unimplemented_payment_method_error_message("worldline"),
)
.into())
}
};
Ok(RedirectPaymentMethod {
Expand Down

0 comments on commit e6272c6

Please sign in to comment.