Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(connector): [RISKIFIED] Add support for riskified frm connector #2533

Merged
merged 70 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
652ed18
add riskified frm connector
AkshayaFoiger Oct 10, 2023
5b25031
add a constant content_length
AkshayaFoiger Oct 10, 2023
0542f8b
Merge branch 'main' into riskified
AkshayaFoiger Oct 10, 2023
e0b0ea4
docs(openapi): re-generate OpenAPI specification
github-actions[bot] Oct 10, 2023
f760733
add frm_metadata
AkshayaFoiger Oct 17, 2023
f9cd512
remove const CONTENT_LENGTH
AkshayaFoiger Oct 17, 2023
ccf9581
merge main
AkshayaFoiger Oct 17, 2023
76ca6e5
resolve conflicts
AkshayaFoiger Oct 17, 2023
b96fcd8
docs(openapi): re-generate OpenAPI specification
github-actions[bot] Oct 17, 2023
0a70256
fix clippy error
AkshayaFoiger Oct 17, 2023
c95511e
chore(version): v1.61.0
github-actions[bot] Oct 18, 2023
32ea56b
heMerge branch 'main' into riskified
AkshayaFoiger Oct 19, 2023
f83bf8f
add extra field v1
AkshayaFoiger Oct 20, 2023
309db04
chore: run formatter
github-actions[bot] Oct 20, 2023
43ffa94
fix clippy errors
AkshayaFoiger Oct 26, 2023
0e1df73
Merge branch 'main' into riskified
AkshayaFoiger Nov 9, 2023
4a1340a
Merge branch 'main' into riskified
AkshayaFoiger Nov 9, 2023
b994d95
Merge branch 'main' into riskified
AkshayaFoiger Nov 10, 2023
fe84044
Merge branch 'main' into riskified
AkshayaFoiger Nov 10, 2023
34b3270
resolve conflict
AkshayaFoiger Nov 10, 2023
b58b08a
Merge branch 'main' into riskified
AkshayaFoiger Nov 16, 2023
48013dc
Merge branch 'main' into riskified
AkshayaFoiger Nov 16, 2023
466a244
generate openapi spec
AkshayaFoiger Nov 16, 2023
b8a7eea
update frm_metadata of complete auth to none
AkshayaFoiger Nov 21, 2023
b0dd243
Merge branch 'main' into riskified
AkshayaFoiger Nov 21, 2023
49b0d0e
resolve conflicts
AkshayaFoiger Nov 21, 2023
a4c5d10
chore: run formatter
github-actions[bot] Nov 21, 2023
228593e
Merge branch 'main' into riskified
AkshayaFoiger Nov 22, 2023
fb155fd
Merge branch 'main' into riskified
AkshayaFoiger Nov 22, 2023
8be82f2
feat: move FRM module to OSS
Nov 23, 2023
940b997
Merge remote-tracking branch 'origin/main'
Nov 23, 2023
6191c6f
refactor: add feature flags for FRM functionality
Nov 23, 2023
3a7d0ae
Merge tag 'v1.90.0' into frm_oss
Nov 28, 2023
1c38f23
Merge branch 'main' into riskified
AkshayaFoiger Nov 28, 2023
888b5e9
Merge remote-tracking branch 'origin/main' into frm_oss
Nov 28, 2023
c887820
update
AkshayaFoiger Nov 29, 2023
53a6ead
add PaymentsAttemptData trait
AkshayaFoiger Nov 29, 2023
3f1971b
chore: run formatter
hyperswitch-bot[bot] Nov 29, 2023
ea0a933
Merge branch 'frm_oss' into riskified
AkshayaFoiger Nov 30, 2023
65172b8
Merge remote-tracking branch 'origin/main' into frm_oss
Nov 30, 2023
319a0cc
refactor: move signifyd base_url to configs
Nov 30, 2023
22d4e72
Merge remote-tracking branch 'origin/main' into frm_oss
Nov 30, 2023
4d20657
add riskified in oss
AkshayaFoiger Dec 1, 2023
aef6bda
fix spell check
AkshayaFoiger Dec 1, 2023
25978e3
fix formatting
AkshayaFoiger Dec 1, 2023
78c3fed
Merge branch 'main' into frm_oss
AkshayaFoiger Dec 1, 2023
90589b2
Merge branch 'frm_oss' into riskified
AkshayaFoiger Dec 1, 2023
d0980a4
fix openapi_spec errors
AkshayaFoiger Dec 1, 2023
0202f23
fix cargo hack
AkshayaFoiger Dec 1, 2023
77a71b0
chore: run formatter
hyperswitch-bot[bot] Dec 1, 2023
7cf532a
fix hack
AkshayaFoiger Dec 1, 2023
1b85ef4
fix formatting
AkshayaFoiger Dec 1, 2023
da9f47d
chore: fix cargo hack errors
AkshayaFoiger Dec 1, 2023
fc2ec74
Update crates/router/src/connector/riskified/transformers/api.rs
AkshayaFoiger Dec 1, 2023
c56d0e9
Update crates/router/src/connector/riskified/transformers/api.rs
AkshayaFoiger Dec 1, 2023
fdda633
Update crates/router/src/connector/riskified/transformers/api.rs
AkshayaFoiger Dec 1, 2023
fccde40
Update crates/router/src/connector/riskified/transformers/auth.rs
AkshayaFoiger Dec 1, 2023
92ddef0
Update crates/router/src/core/fraud_check/types.rs
AkshayaFoiger Dec 1, 2023
dc54bfc
Update crates/router/src/core/fraud_check/flows/checkout_flow.rs
AkshayaFoiger Dec 1, 2023
b54ff3d
Update crates/router/src/types/fraud_check.rs
AkshayaFoiger Dec 1, 2023
5e8e922
chore: fix openAPI Spec
AkshayaFoiger Dec 2, 2023
dfe650e
chore: fix cargo hack
AkshayaFoiger Dec 3, 2023
36b2584
make Error a global variable
AkshayaFoiger Dec 4, 2023
eda6021
Merge branch 'main' into riskified
AkshayaFoiger Dec 6, 2023
9865001
Merge branch 'main' into riskified
AkshayaFoiger Dec 6, 2023
faaad3a
resolve merge conflict
AkshayaFoiger Dec 6, 2023
55e6c11
resolve comments
AkshayaFoiger Dec 7, 2023
10ec670
update field name
AkshayaFoiger Dec 7, 2023
48ed336
Merge branch 'main' into riskified
AkshayaFoiger Dec 12, 2023
550bc59
chore: run formatter
hyperswitch-bot[bot] Dec 12, 2023
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
1 change: 1 addition & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ payu.base_url = "https://secure.snd.payu.com/"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
riskified.base_url = "https://sandbox.riskified.com/api"
shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
Expand Down
1 change: 1 addition & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ payu.base_url = "https://secure.snd.payu.com/"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
riskified.base_url = "https://sandbox.riskified.com/api"
shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
Expand Down
1 change: 1 addition & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ payu.base_url = "https://secure.snd.payu.com/"
powertranz.base_url = "https://staging.ptranz.com/api/"
prophetpay.base_url = "https://ccm-thirdparty.cps.golf/"
rapyd.base_url = "https://sandboxapi.rapyd.net"
riskified.base_url = "https://sandbox.riskified.com/api"
shift4.base_url = "https://api.shift4.com/"
signifyd.base_url = "https://api.signifyd.com/"
square.base_url = "https://connect.squareupsandbox.com/"
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 @@ -126,6 +126,7 @@ pub enum Connector {
Zen,
Signifyd,
Plaid,
Riskified,
}

impl Connector {
Expand Down Expand Up @@ -199,13 +200,15 @@ impl From<PayoutConnectors> for RoutableConnectors {
pub enum FrmConnectors {
/// Signifyd Risk Manager. Official docs: https://docs.signifyd.com/
Signifyd,
Riskified,
}

#[cfg(feature = "frm")]
impl From<FrmConnectors> for RoutableConnectors {
fn from(value: FrmConnectors) -> Self {
match value {
FrmConnectors::Signifyd => Self::Signifyd,
FrmConnectors::Riskified => Self::Riskified,
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions crates/api_models/src/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ pub struct PaymentsRequest {

///Request for an incremental authorization
pub request_incremental_authorization: Option<bool>,

/// additional data related to some frm connectors
pub frm_metadata: Option<serde_json::Value>,
}

impl PaymentsRequest {
Expand Down Expand Up @@ -2598,8 +2601,30 @@ pub struct OrderDetailsWithAmount {
pub quantity: u16,
/// the amount per quantity of product
pub amount: i64,
// Does the order includes shipping
pub requires_shipping: Option<bool>,
/// The image URL of the product
pub product_img_link: Option<String>,
/// ID of the product that is being purchased
pub product_id: Option<String>,
/// Category of the product that is being purchased
pub category: Option<String>,
/// Brand of the product that is being purchased
pub brand: Option<String>,
/// Type of the product that is being purchased
pub product_type: Option<ProductType>,
}

#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
#[serde(rename_all = "snake_case")]
pub enum ProductType {
#[default]
Physical,
Digital,
Travel,
Ride,
Event,
Accommodation,
}

#[derive(Debug, Default, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
Expand All @@ -2610,8 +2635,18 @@ pub struct OrderDetails {
/// The quantity of the product to be purchased
#[schema(example = 1)]
pub quantity: u16,
// Does the order include shipping
pub requires_shipping: Option<bool>,
/// The image URL of the product
pub product_img_link: Option<String>,
/// ID of the product that is being purchased
pub product_id: Option<String>,
/// Category of the product that is being purchased
pub category: Option<String>,
/// Brand of the product that is being purchased
pub brand: Option<String>,
/// Type of the product that is being purchased
pub product_type: Option<ProductType>,
}

#[derive(Default, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
Expand Down
1 change: 1 addition & 0 deletions crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ pub enum RoutableConnectors {
Powertranz,
Prophetpay,
Rapyd,
Riskified,
Shift4,
Signifyd,
Square,
Expand Down
1 change: 1 addition & 0 deletions crates/router/src/configs/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ pub struct Connectors {
pub powertranz: ConnectorParams,
pub prophetpay: ConnectorParams,
pub rapyd: ConnectorParams,
pub riskified: ConnectorParams,
pub shift4: ConnectorParams,
pub signifyd: ConnectorParams,
pub square: ConnectorParams,
Expand Down
7 changes: 4 additions & 3 deletions crates/router/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub mod payu;
pub mod powertranz;
pub mod prophetpay;
pub mod rapyd;
pub mod riskified;
pub mod shift4;
pub mod signifyd;
pub mod square;
Expand All @@ -64,7 +65,7 @@ pub use self::{
iatapay::Iatapay, klarna::Klarna, mollie::Mollie, multisafepay::Multisafepay,
nexinets::Nexinets, nmi::Nmi, noon::Noon, nuvei::Nuvei, opayo::Opayo, opennode::Opennode,
payeezy::Payeezy, payme::Payme, paypal::Paypal, payu::Payu, powertranz::Powertranz,
prophetpay::Prophetpay, rapyd::Rapyd, shift4::Shift4, signifyd::Signifyd, square::Square,
stax::Stax, stripe::Stripe, trustpay::Trustpay, tsys::Tsys, volt::Volt, wise::Wise,
worldline::Worldline, worldpay::Worldpay, zen::Zen,
prophetpay::Prophetpay, rapyd::Rapyd, riskified::Riskified, shift4::Shift4, signifyd::Signifyd,
square::Square, stax::Stax, stripe::Stripe, trustpay::Trustpay, tsys::Tsys, volt::Volt,
wise::Wise, worldline::Worldline, worldpay::Worldpay, zen::Zen,
};
Loading
Loading