Skip to content

Commit

Permalink
refactor(connector): [CryptoPay] Remove Default Case Handling (#2643)
Browse files Browse the repository at this point in the history
Co-authored-by: Prasunna Soppa <[email protected]>
  • Loading branch information
ashutuptiwari and prasunna09 authored Oct 25, 2023
1 parent 027385e commit 6428d07
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions crates/router/src/connector/cryptopay/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,23 @@ impl TryFrom<&CryptopayRouterData<&types::PaymentsAuthorizeRouterData>>
custom_id: item.router_data.connector_request_reference_id.clone(),
})
}
_ => Err(errors::ConnectorError::NotImplemented(
"payment method".to_string(),
)),
api_models::payments::PaymentMethodData::Card(_)
| api_models::payments::PaymentMethodData::CardRedirect(_)
| api_models::payments::PaymentMethodData::Wallet(_)
| api_models::payments::PaymentMethodData::PayLater(_)
| api_models::payments::PaymentMethodData::BankRedirect(_)
| api_models::payments::PaymentMethodData::BankDebit(_)
| api_models::payments::PaymentMethodData::BankTransfer(_)
| api_models::payments::PaymentMethodData::MandatePayment {}
| api_models::payments::PaymentMethodData::Reward {}
| api_models::payments::PaymentMethodData::Upi(_)
| api_models::payments::PaymentMethodData::Voucher(_)
| api_models::payments::PaymentMethodData::GiftCard(_) => {
Err(errors::ConnectorError::NotSupported {
message: utils::SELECTED_PAYMENT_METHOD.to_string(),
connector: "CryptoPay",
})
}
}?;
Ok(cryptopay_request)
}
Expand Down

0 comments on commit 6428d07

Please sign in to comment.