|
1 | 1 | use api_models::payments::Card;
|
2 | 2 | use common_utils::pii::Email;
|
3 | 3 | use diesel_models::enums::RefundStatus;
|
| 4 | +use error_stack::IntoReport; |
4 | 5 | use masking::Secret;
|
5 | 6 | use serde::{Deserialize, Serialize};
|
6 | 7 | use uuid::Uuid;
|
@@ -101,9 +102,22 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for PowertranzPaymentsRequest
|
101 | 102 | fn try_from(item: &types::PaymentsAuthorizeRouterData) -> Result<Self, Self::Error> {
|
102 | 103 | let source = match item.request.payment_method_data.clone() {
|
103 | 104 | api::PaymentMethodData::Card(card) => Ok(Source::from(&card)),
|
104 |
| - _ => Err(errors::ConnectorError::NotImplemented( |
105 |
| - "Payment method".to_string(), |
106 |
| - )), |
| 105 | + api::PaymentMethodData::Wallet(_) |
| 106 | + | api::PaymentMethodData::CardRedirect(_) |
| 107 | + | api::PaymentMethodData::PayLater(_) |
| 108 | + | api::PaymentMethodData::BankRedirect(_) |
| 109 | + | api::PaymentMethodData::BankDebit(_) |
| 110 | + | api::PaymentMethodData::BankTransfer(_) |
| 111 | + | api::PaymentMethodData::Crypto(_) |
| 112 | + | api::PaymentMethodData::MandatePayment |
| 113 | + | api::PaymentMethodData::Reward |
| 114 | + | api::PaymentMethodData::Upi(_) |
| 115 | + | api::PaymentMethodData::Voucher(_) |
| 116 | + | api::PaymentMethodData::GiftCard(_) => Err(errors::ConnectorError::NotSupported { |
| 117 | + message: utils::SELECTED_PAYMENT_METHOD.to_string(), |
| 118 | + connector: "powertranz", |
| 119 | + }) |
| 120 | + .into_report(), |
107 | 121 | }?;
|
108 | 122 | // let billing_address = get_address_details(&item.address.billing, &item.request.email);
|
109 | 123 | // let shipping_address = get_address_details(&item.address.shipping, &item.request.email);
|
|
0 commit comments