mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
fix(connector): [STAX] Add ACH Payment Filter for Bank Debits (#2074)
This commit is contained in:
@ -43,7 +43,9 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for StaxPaymentsRequest {
|
|||||||
payment_method_id: Secret::new(item.get_payment_method_token()?),
|
payment_method_id: Secret::new(item.get_payment_method_token()?),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
api::PaymentMethodData::BankDebit(_) => {
|
api::PaymentMethodData::BankDebit(
|
||||||
|
api_models::payments::BankDebitData::AchBankDebit { .. },
|
||||||
|
) => {
|
||||||
let pre_auth = !item.request.is_auto_capture()?;
|
let pre_auth = !item.request.is_auto_capture()?;
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
meta: StaxPaymentsRequestMetaData { tax: 0 },
|
meta: StaxPaymentsRequestMetaData { tax: 0 },
|
||||||
@ -53,7 +55,21 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for StaxPaymentsRequest {
|
|||||||
payment_method_id: Secret::new(item.get_payment_method_token()?),
|
payment_method_id: Secret::new(item.get_payment_method_token()?),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_ => Err(errors::ConnectorError::NotImplemented("Payment methods".to_string()).into()),
|
api::PaymentMethodData::BankDebit(_)
|
||||||
|
| api::PaymentMethodData::Wallet(_)
|
||||||
|
| api::PaymentMethodData::PayLater(_)
|
||||||
|
| api::PaymentMethodData::BankRedirect(_)
|
||||||
|
| api::PaymentMethodData::BankTransfer(_)
|
||||||
|
| api::PaymentMethodData::Crypto(_)
|
||||||
|
| api::PaymentMethodData::MandatePayment
|
||||||
|
| api::PaymentMethodData::Reward
|
||||||
|
| api::PaymentMethodData::Voucher(_)
|
||||||
|
| api::PaymentMethodData::GiftCard(_)
|
||||||
|
| api::PaymentMethodData::CardRedirect(_)
|
||||||
|
| api::PaymentMethodData::Upi(_) => Err(errors::ConnectorError::NotSupported {
|
||||||
|
message: "SELECTED_PAYMENT_METHOD".to_string(),
|
||||||
|
connector: "Stax",
|
||||||
|
})?,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -200,10 +216,10 @@ impl TryFrom<&types::TokenizationRouterData> for StaxTokenRequest {
|
|||||||
| api::PaymentMethodData::Voucher(_)
|
| api::PaymentMethodData::Voucher(_)
|
||||||
| api::PaymentMethodData::GiftCard(_)
|
| api::PaymentMethodData::GiftCard(_)
|
||||||
| api::PaymentMethodData::CardRedirect(_)
|
| api::PaymentMethodData::CardRedirect(_)
|
||||||
| api::PaymentMethodData::Upi(_) => Err(errors::ConnectorError::NotImplemented(
|
| api::PaymentMethodData::Upi(_) => Err(errors::ConnectorError::NotSupported {
|
||||||
"Payment Method".to_string(),
|
message: "SELECTED_PAYMENT_METHOD".to_string(),
|
||||||
))
|
connector: "Stax",
|
||||||
.into_report(),
|
})?,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user