mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat: stripe connect integration for payouts (#2041)
Co-authored-by: Rachit Naithani <81706961+racnan@users.noreply.github.com> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Apoorv Dixit <64925866+apoorvdixit88@users.noreply.github.com> Co-authored-by: Swangi Kumari <85639103+swangi-kumari@users.noreply.github.com> Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in> Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sakil Mostak <73734619+Sakilmostak@users.noreply.github.com> Co-authored-by: AkshayaFoiger <131388445+AkshayaFoiger@users.noreply.github.com>
This commit is contained in:
@ -154,6 +154,10 @@ impl Connector {
|
||||
pub fn supports_access_token_for_payout(&self, payout_method: PayoutType) -> bool {
|
||||
matches!((self, payout_method), (Self::Paypal, _))
|
||||
}
|
||||
#[cfg(feature = "payouts")]
|
||||
pub fn supports_vendor_disburse_account_create_for_payout(&self) -> bool {
|
||||
matches!(self, Self::Stripe)
|
||||
}
|
||||
pub fn supports_access_token(&self, payment_method: PaymentMethod) -> bool {
|
||||
matches!(
|
||||
(self, payment_method),
|
||||
@ -338,6 +342,7 @@ pub enum AuthenticationConnectors {
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum PayoutConnectors {
|
||||
Adyen,
|
||||
Stripe,
|
||||
Wise,
|
||||
Paypal,
|
||||
}
|
||||
@ -347,6 +352,7 @@ impl From<PayoutConnectors> for RoutableConnectors {
|
||||
fn from(value: PayoutConnectors) -> Self {
|
||||
match value {
|
||||
PayoutConnectors::Adyen => Self::Adyen,
|
||||
PayoutConnectors::Stripe => Self::Stripe,
|
||||
PayoutConnectors::Wise => Self::Wise,
|
||||
PayoutConnectors::Paypal => Self::Paypal,
|
||||
}
|
||||
@ -358,6 +364,7 @@ impl From<PayoutConnectors> for Connector {
|
||||
fn from(value: PayoutConnectors) -> Self {
|
||||
match value {
|
||||
PayoutConnectors::Adyen => Self::Adyen,
|
||||
PayoutConnectors::Stripe => Self::Stripe,
|
||||
PayoutConnectors::Wise => Self::Wise,
|
||||
PayoutConnectors::Paypal => Self::Paypal,
|
||||
}
|
||||
@ -370,6 +377,7 @@ impl TryFrom<Connector> for PayoutConnectors {
|
||||
fn try_from(value: Connector) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
Connector::Adyen => Ok(Self::Adyen),
|
||||
Connector::Stripe => Ok(Self::Stripe),
|
||||
Connector::Wise => Ok(Self::Wise),
|
||||
Connector::Paypal => Ok(Self::Paypal),
|
||||
_ => Err(format!("Invalid payout connector {}", value)),
|
||||
|
||||
Reference in New Issue
Block a user