Skip to content

Commit

Permalink
feat(connector): [Nomupay] Implement nomupay payouts flows (#6511)
Browse files Browse the repository at this point in the history
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
sumanmaji4 and hyperswitch-bot[bot] authored Feb 25, 2025
1 parent 66b6865 commit a80c7ae
Show file tree
Hide file tree
Showing 30 changed files with 1,406 additions and 751 deletions.
21 changes: 19 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7425,6 +7425,7 @@
"nexinets",
"nexixpay",
"nmi",
"nomupay",
"noon",
"novalnet",
"nuvei",
Expand Down Expand Up @@ -17215,6 +17216,7 @@
"adyenplatform",
"cybersource",
"ebanx",
"nomupay",
"payone",
"paypal",
"stripe",
Expand Down Expand Up @@ -20029,6 +20031,7 @@
"nexinets",
"nexixpay",
"nmi",
"nomupay",
"noon",
"novalnet",
"nuvei",
Expand Down
3 changes: 3 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9615,6 +9615,7 @@
"nexinets",
"nexixpay",
"nmi",
"nomupay",
"noon",
"novalnet",
"nuvei",
Expand Down Expand Up @@ -21439,6 +21440,7 @@
"adyenplatform",
"cybersource",
"ebanx",
"nomupay",
"payone",
"paypal",
"stripe",
Expand Down Expand Up @@ -24536,6 +24538,7 @@
"nexinets",
"nexixpay",
"nmi",
"nomupay",
"noon",
"novalnet",
"nuvei",
Expand Down
2 changes: 1 addition & 1 deletion config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ nexixpay = { payment_method = "card" }

[connector_customer]
connector_list = "gocardless,stax,stripe"
payout_connector_list = "stripe,wise"
payout_connector_list = "nomupay,stripe,wise"

[dummy_connector]
enabled = true
Expand Down
1 change: 0 additions & 1 deletion config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ cards = [
"nexinets",
"nexixpay",
"nmi",
"nomupay",
"noon",
"novalnet",
"nuvei",
Expand Down
4 changes: 4 additions & 0 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub enum PayoutConnectors {
Adyenplatform,
Cybersource,
Ebanx,
Nomupay,
Payone,
Paypal,
Stripe,
Expand All @@ -62,6 +63,7 @@ impl From<PayoutConnectors> for RoutableConnectors {
PayoutConnectors::Adyenplatform => Self::Adyenplatform,
PayoutConnectors::Cybersource => Self::Cybersource,
PayoutConnectors::Ebanx => Self::Ebanx,
PayoutConnectors::Nomupay => Self::Nomupay,
PayoutConnectors::Payone => Self::Payone,
PayoutConnectors::Paypal => Self::Paypal,
PayoutConnectors::Stripe => Self::Stripe,
Expand All @@ -78,6 +80,7 @@ impl From<PayoutConnectors> for Connector {
PayoutConnectors::Adyenplatform => Self::Adyenplatform,
PayoutConnectors::Cybersource => Self::Cybersource,
PayoutConnectors::Ebanx => Self::Ebanx,
PayoutConnectors::Nomupay => Self::Nomupay,
PayoutConnectors::Payone => Self::Payone,
PayoutConnectors::Paypal => Self::Paypal,
PayoutConnectors::Stripe => Self::Stripe,
Expand All @@ -95,6 +98,7 @@ impl TryFrom<Connector> for PayoutConnectors {
Connector::Adyenplatform => Ok(Self::Adyenplatform),
Connector::Cybersource => Ok(Self::Cybersource),
Connector::Ebanx => Ok(Self::Ebanx),
Connector::Nomupay => Ok(Self::Nomupay),
Connector::Payone => Ok(Self::Payone),
Connector::Paypal => Ok(Self::Paypal),
Connector::Stripe => Ok(Self::Stripe),
Expand Down
10 changes: 6 additions & 4 deletions crates/common_enums/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub enum RoutableConnectors {
Nexinets,
Nexixpay,
Nmi,
// Nomupay,
Nomupay,
Noon,
Novalnet,
Nuvei,
Expand Down Expand Up @@ -239,7 +239,7 @@ pub enum Connector {
Nexinets,
Nexixpay,
Nmi,
// Nomupay,
Nomupay,
Noon,
Novalnet,
Nuvei,
Expand Down Expand Up @@ -289,6 +289,7 @@ impl Connector {
(Self::Paypal, Some(PayoutType::Wallet))
| (_, Some(PayoutType::Card))
| (Self::Adyenplatform, _)
| (Self::Nomupay, _)
)
}
#[cfg(feature = "payouts")]
Expand All @@ -309,7 +310,7 @@ impl Connector {
}
#[cfg(feature = "payouts")]
pub fn supports_vendor_disburse_account_create_for_payout(self) -> bool {
matches!(self, Self::Stripe)
matches!(self, Self::Stripe | Self::Nomupay)
}
pub fn supports_access_token(self, payment_method: PaymentMethod) -> bool {
matches!(
Expand Down Expand Up @@ -389,7 +390,7 @@ impl Connector {
| Self::Multisafepay
| Self::Nexinets
| Self::Nexixpay
// | Self::Nomupay
| Self::Nomupay
| Self::Novalnet
| Self::Nuvei
| Self::Opennode
Expand Down Expand Up @@ -519,6 +520,7 @@ impl From<RoutableConnectors> for Connector {
RoutableConnectors::Nexinets => Self::Nexinets,
RoutableConnectors::Nexixpay => Self::Nexixpay,
RoutableConnectors::Nmi => Self::Nmi,
RoutableConnectors::Nomupay => Self::Nomupay,
RoutableConnectors::Noon => Self::Noon,
RoutableConnectors::Novalnet => Self::Novalnet,
RoutableConnectors::Nuvei => Self::Nuvei,
Expand Down
3 changes: 3 additions & 0 deletions crates/connector_configs/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ pub struct ConnectorConfig {
pub nexinets: Option<ConnectorTomlConfig>,
pub nexixpay: Option<ConnectorTomlConfig>,
pub nmi: Option<ConnectorTomlConfig>,
pub nomupay_payout: Option<ConnectorTomlConfig>,
pub noon: Option<ConnectorTomlConfig>,
pub novalnet: Option<ConnectorTomlConfig>,
pub nuvei: Option<ConnectorTomlConfig>,
Expand Down Expand Up @@ -281,6 +282,7 @@ impl ConnectorConfig {
PayoutConnectors::Adyenplatform => Ok(connector_data.adyenplatform_payout),
PayoutConnectors::Cybersource => Ok(connector_data.cybersource_payout),
PayoutConnectors::Ebanx => Ok(connector_data.ebanx_payout),
PayoutConnectors::Nomupay => Ok(connector_data.nomupay_payout),
PayoutConnectors::Payone => Ok(connector_data.payone_payout),
PayoutConnectors::Paypal => Ok(connector_data.paypal_payout),
PayoutConnectors::Stripe => Ok(connector_data.stripe_payout),
Expand Down Expand Up @@ -375,6 +377,7 @@ impl ConnectorConfig {
Connector::Nexixpay => Ok(connector_data.nexixpay),
Connector::Prophetpay => Ok(connector_data.prophetpay),
Connector::Nmi => Ok(connector_data.nmi),
Connector::Nomupay => Err("Use get_payout_connector_config".to_string()),
Connector::Novalnet => Ok(connector_data.novalnet),
Connector::Noon => Ok(connector_data.noon),
Connector::Nuvei => Ok(connector_data.nuvei),
Expand Down
13 changes: 13 additions & 0 deletions crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4052,6 +4052,19 @@ key1 = "Adyen Account Id"
[stripe_payout.connector_auth.HeaderKey]
api_key = "Stripe API Key"

[nomupay_payout]
[[nomupay_payout.bank_transfer]]
payment_method_type = "sepa"
[nomupay_payout.connector_auth.BodyKey]
api_key = "Nomupay kid"
key1 = "Nomupay eid"
[nomupay_payout.metadata.private_key]
name="Private key for signature generation"
label="Enter your private key"
placeholder="------BEGIN PRIVATE KEY-------"
required=true
type="Text"

[wise_payout]
[[wise_payout.bank_transfer]]
payment_method_type = "ach"
Expand Down
15 changes: 14 additions & 1 deletion crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3475,4 +3475,17 @@ api_key="API Key"
api_key="API Key"
key1="API Token"
[inespay.connector_webhook_details]
merchant_secret="API Key"
merchant_secret="API Key"

[nomupay_payout]
[[nomupay_payout.bank_transfer]]
payment_method_type = "sepa"
[nomupay_payout.connector_auth.BodyKey]
api_key = "Nomupay kid"
key1 = "Nomupay eid"
[nomupay_payout.metadata.private_key]
name="Private key for signature generation"
label="Enter your private key"
placeholder="------BEGIN PRIVATE KEY-------"
required=true
type="Text"
13 changes: 13 additions & 0 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3992,6 +3992,19 @@ type="Text"
[stripe_payout.connector_auth.HeaderKey]
api_key = "Stripe API Key"

[nomupay_payout]
[[nomupay_payout.bank_transfer]]
payment_method_type = "sepa"
[nomupay_payout.connector_auth.BodyKey]
api_key = "Nomupay kid"
key1 = "Nomupay eid"
[nomupay_payout.metadata.private_key]
name="Private key for signature generation"
label="Enter your private key"
placeholder="------BEGIN PRIVATE KEY-------"
required=true
type="Text"

[wise_payout]
[[wise_payout.bank_transfer]]
payment_method_type = "ach"
Expand Down
2 changes: 1 addition & 1 deletion crates/hyperswitch_connectors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ error-stack = "0.4.1"
hex = "0.4.3"
http = "0.2.12"
image = { version = "0.25.1", default-features = false, features = ["png"] }
josekit = "0.8.6"
josekit = { git = "https://github.com/sumanmaji4/josekit-rs.git", rev = "5ab54876c29a84f86aef8c169413a46026883efe", features = ["support-empty-payload"]}
mime = "0.3.17"
once_cell = "1.19.0"
qrcode = "0.14.0"
Expand Down
Loading

0 comments on commit a80c7ae

Please sign in to comment.