feat(connector): Add dummy billing connector auth flow (#7819)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Aditya Chaurasia
2025-04-23 12:00:00 +05:30
committed by GitHub
parent 2c9b8abdb5
commit bca8979a0c
8 changed files with 37 additions and 3 deletions

View File

@ -27,6 +27,10 @@ pub use crate::PaymentMethodType;
pub enum RoutableConnectors {
Adyenplatform,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "stripe_billing_test")]
#[strum(serialize = "stripe_billing_test")]
DummyBillingConnector,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "phonypay")]
#[strum(serialize = "phonypay")]
DummyConnector1,
@ -170,6 +174,10 @@ pub enum RoutableConnectors {
pub enum Connector {
Adyenplatform,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "stripe_billing_test")]
#[strum(serialize = "stripe_billing_test")]
DummyBillingConnector,
#[cfg(feature = "dummy_connector")]
#[serde(rename = "phonypay")]
#[strum(serialize = "phonypay")]
DummyConnector1,
@ -354,6 +362,8 @@ impl Connector {
}
pub fn is_separate_authentication_supported(self) -> bool {
match self {
#[cfg(feature = "dummy_connector")]
Self::DummyBillingConnector => false,
#[cfg(feature = "dummy_connector")]
Self::DummyConnector1
| Self::DummyConnector2
@ -500,6 +510,8 @@ impl From<RoutableConnectors> for Connector {
match routable_connector {
RoutableConnectors::Adyenplatform => Self::Adyenplatform,
#[cfg(feature = "dummy_connector")]
RoutableConnectors::DummyBillingConnector => Self::DummyBillingConnector,
#[cfg(feature = "dummy_connector")]
RoutableConnectors::DummyConnector1 => Self::DummyConnector1,
#[cfg(feature = "dummy_connector")]
RoutableConnectors::DummyConnector2 => Self::DummyConnector2,
@ -608,6 +620,8 @@ impl TryFrom<Connector> for RoutableConnectors {
match connector {
Connector::Adyenplatform => Ok(Self::Adyenplatform),
#[cfg(feature = "dummy_connector")]
Connector::DummyBillingConnector => Ok(Self::DummyBillingConnector),
#[cfg(feature = "dummy_connector")]
Connector::DummyConnector1 => Ok(Self::DummyConnector1),
#[cfg(feature = "dummy_connector")]
Connector::DummyConnector2 => Ok(Self::DummyConnector2),