mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(router): add straight-through routing connector selection in payments (#153)
This commit is contained in:
@ -468,6 +468,34 @@ pub enum MandateStatus {
|
||||
Revoked,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Default,
|
||||
Eq,
|
||||
PartialEq,
|
||||
serde::Deserialize,
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
frunk::LabelledGeneric,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum Connector {
|
||||
Aci,
|
||||
Adyen,
|
||||
Applepay,
|
||||
Authorizedotnet,
|
||||
Braintree,
|
||||
Checkout,
|
||||
#[default]
|
||||
Dummy,
|
||||
Klarna,
|
||||
Stripe,
|
||||
}
|
||||
|
||||
impl From<AttemptStatus> for IntentStatus {
|
||||
fn from(s: AttemptStatus) -> Self {
|
||||
match s {
|
||||
|
||||
@ -22,6 +22,7 @@ pub struct PaymentsRequest {
|
||||
pub merchant_id: Option<String>,
|
||||
#[serde(default, deserialize_with = "amount::deserialize_option")]
|
||||
pub amount: Option<Amount>,
|
||||
pub connector: Option<api_enums::Connector>,
|
||||
pub currency: Option<String>,
|
||||
pub capture_method: Option<api_enums::CaptureMethod>,
|
||||
pub amount_to_capture: Option<i64>,
|
||||
|
||||
Reference in New Issue
Block a user