Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions api-reference/v1/openapi_spec_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -10939,6 +10939,16 @@
"type": "string",
"description": "The device model of the client",
"nullable": true
},
"accept_language": {
"type": "string",
"description": "Accept-language of the browser",
"nullable": true
},
"referer": {
"type": "string",
"description": "Identifier of the source that initiated the request.",
"nullable": true
}
}
},
Expand Down Expand Up @@ -26582,6 +26592,14 @@
"type": "string",
"description": "Identifier for payout method",
"nullable": true
},
"browser_info": {
"allOf": [
{
"$ref": "#/components/schemas/BrowserInformation"
}
],
"nullable": true
}
}
},
Expand All @@ -26592,6 +26610,7 @@
"adyenplatform",
"cybersource",
"ebanx",
"gigadat",
"nomupay",
"payone",
"paypal",
Expand Down Expand Up @@ -27558,6 +27577,14 @@
"type": "string",
"description": "Identifier for payout method",
"nullable": true
},
"browser_info": {
"allOf": [
{
"$ref": "#/components/schemas/BrowserInformation"
}
],
"nullable": true
}
}
},
Expand Down Expand Up @@ -27782,6 +27809,14 @@
"type": "string",
"description": "Identifier for payout method",
"nullable": true
},
"browser_info": {
"allOf": [
{
"$ref": "#/components/schemas/BrowserInformation"
}
],
"nullable": true
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions api-reference/v2/openapi_spec_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -20716,6 +20716,7 @@
"adyenplatform",
"cybersource",
"ebanx",
"gigadat",
"nomupay",
"payone",
"paypal",
Expand Down Expand Up @@ -21015,6 +21016,14 @@
"type": "string",
"description": "Identifier for payout method",
"nullable": true
},
"browser_info": {
"allOf": [
{
"$ref": "#/components/schemas/BrowserInformation"
}
],
"nullable": true
}
},
"additionalProperties": false
Expand Down
3 changes: 3 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,
Gigadat,
Nomupay,
Payone,
Paypal,
Expand All @@ -74,6 +75,7 @@ impl From<PayoutConnectors> for RoutableConnectors {
PayoutConnectors::Adyenplatform => Self::Adyenplatform,
PayoutConnectors::Cybersource => Self::Cybersource,
PayoutConnectors::Ebanx => Self::Ebanx,
PayoutConnectors::Gigadat => Self::Gigadat,
PayoutConnectors::Nomupay => Self::Nomupay,
PayoutConnectors::Payone => Self::Payone,
PayoutConnectors::Paypal => Self::Paypal,
Expand All @@ -91,6 +93,7 @@ impl From<PayoutConnectors> for Connector {
PayoutConnectors::Adyenplatform => Self::Adyenplatform,
PayoutConnectors::Cybersource => Self::Cybersource,
PayoutConnectors::Ebanx => Self::Ebanx,
PayoutConnectors::Gigadat => Self::Gigadat,
PayoutConnectors::Nomupay => Self::Nomupay,
PayoutConnectors::Payone => Self::Payone,
PayoutConnectors::Paypal => Self::Paypal,
Expand Down
6 changes: 6 additions & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,12 @@ pub struct BrowserInformation {

/// The device model of the client
pub device_model: Option<String>,

/// Accept-language of the browser
pub accept_language: Option<String>,

/// Identifier of the source that initiated the request.
pub referer: Option<String>,
}

impl RequestSurchargeDetails {
Expand Down
8 changes: 8 additions & 0 deletions crates/api_models/src/payouts.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::collections::HashMap;

use cards::CardNumber;
#[cfg(feature = "v2")]
use common_utils::types::BrowserInformation;
use common_utils::{
consts::default_payouts_list_limit,
crypto, id_type, link_utils, payout_method_utils,
Expand All @@ -9,6 +11,8 @@ use common_utils::{
types::{UnifiedCode, UnifiedMessage},
};
use masking::Secret;
#[cfg(feature = "v1")]
use payments::BrowserInformation;
use router_derive::FlatStruct;
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
Expand Down Expand Up @@ -191,6 +195,10 @@ pub struct PayoutCreateRequest {

/// Identifier for payout method
pub payout_method_id: Option<String>,

/// Additional details required by 3DS 2.0
#[schema(value_type = Option<BrowserInformation>)]
pub browser_info: Option<BrowserInformation>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do inplace import for readability

Suggested change
pub browser_info: Option<BrowserInformation>,
#[cfg(feature = "v1")]
pub browser_info: Option<payments::BrowserInformation>,
#[cfg(feature = "v2")]
pub browser_info: Option<common_utils::types::BrowserInformation>,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are avoiding feature flags on fields as much as possible , instead keep them on top-level imports
cc- @sai-harsha-vardhan

}

impl PayoutCreateRequest {
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 @@ -284,6 +284,8 @@ pub struct ConnectorConfig {
pub forte: Option<ConnectorTomlConfig>,
pub getnet: Option<ConnectorTomlConfig>,
pub gigadat: Option<ConnectorTomlConfig>,
#[cfg(feature = "payouts")]
pub gigadat_payout: Option<ConnectorTomlConfig>,
pub globalpay: Option<ConnectorTomlConfig>,
pub globepay: Option<ConnectorTomlConfig>,
pub gocardless: Option<ConnectorTomlConfig>,
Expand Down Expand Up @@ -396,6 +398,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::Gigadat => Ok(connector_data.gigadat_payout),
PayoutConnectors::Nomupay => Ok(connector_data.nomupay_payout),
PayoutConnectors::Payone => Ok(connector_data.payone_payout),
PayoutConnectors::Paypal => Ok(connector_data.paypal_payout),
Expand Down
16 changes: 15 additions & 1 deletion crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7179,7 +7179,21 @@ placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[gigadat_payout]
[gigadat_payout.connector_auth.SignatureKey]
api_key = "Username"
api_secret = "Password"
key1 = "Compaign Id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it Campaign Id?

[[gigadat_payout.bank_redirect]]
payment_method_type = "interac"
[gigadat_payout.metadata.site]
name = "site"
label = "Site where transaction is initiated"
placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[tesouro]
[tesouro.connector_auth.BodyKey]
api_key="Client ID"
key1="Client Secret"
key1="Client Secret"
14 changes: 14 additions & 0 deletions crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5916,6 +5916,20 @@ placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[gigadat_payout]
[gigadat_payout.connector_auth.SignatureKey]
api_key = "Username"
api_secret = "Password"
key1 = "Compaign Id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

[[gigadat_payout.bank_redirect]]
payment_method_type = "interac"
[gigadat_payout.metadata.site]
name = "site"
label = "Site where transaction is initiated"
placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[tesouro]
[tesouro.connector_auth.BodyKey]
api_key="Client ID"
Expand Down
14 changes: 14 additions & 0 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7157,6 +7157,20 @@ placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[gigadat_payout]
[gigadat_payout.connector_auth.SignatureKey]
api_key = "Username"
api_secret = "Password"
key1 = "Compaign Id"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

[[gigadat_payout.bank_redirect]]
payment_method_type = "interac"
[gigadat_payout.metadata.site]
name = "site"
label = "Site where transaction is initiated"
placeholder = "Enter site where transaction is initiated"
required = true
type = "Text"

[tesouro]
[tesouro.connector_auth.BodyKey]
api_key="Client ID"
Expand Down
Loading
Loading