Skip to content

Commit

Permalink
feat(connector): added payment flows code
Browse files Browse the repository at this point in the history
  • Loading branch information
awasthi21 committed Jul 11, 2024
1 parent 3312e78 commit 029c4b1
Show file tree
Hide file tree
Showing 17 changed files with 4,748 additions and 193 deletions.
2 changes: 2 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -7736,6 +7736,7 @@
"coinbase",
"cryptopay",
"cybersource",
"datatrans",
"dlocal",
"ebanx",
"fiserv",
Expand Down Expand Up @@ -19460,6 +19461,7 @@
"coinbase",
"cryptopay",
"cybersource",
"datatrans",
"dlocal",
"ebanx",
"fiserv",
Expand Down
2 changes: 1 addition & 1 deletion config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ checkout.base_url = "https://api.sandbox.checkout.com/"
coinbase.base_url = "https://api.commerce.coinbase.com"
cryptopay.base_url = "https://business-sandbox.cryptopay.me"
cybersource.base_url = "https://apitest.cybersource.com/"
datatrans.base_url = "https://api.sandbox.datatrans.com"
datatrans.base_url = "https://api.sandbox.datatrans.com/"
dlocal.base_url = "https://sandbox.dlocal.com/"
dummyconnector.base_url = "http://localhost:8080/dummy-connector"
ebanx.base_url = "https://sandbox.ebanxpay.com/"
Expand Down
4 changes: 2 additions & 2 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub enum Connector {
Coinbase,
Cryptopay,
Cybersource,
// Datatrans,
Datatrans,
Dlocal,
Ebanx,
Fiserv,
Expand Down Expand Up @@ -257,7 +257,7 @@ impl Connector {
| Self::Razorpay
| Self::Riskified
| Self::Threedsecureio
// | Self::Datatrans
| Self::Datatrans
| Self::Netcetera
| Self::Noon
| Self::Stripe => false,
Expand Down
2 changes: 1 addition & 1 deletion crates/common_enums/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub enum RoutableConnectors {
Coinbase,
Cryptopay,
Cybersource,
// Datatrans,
Datatrans,
Dlocal,
Ebanx,
Fiserv,
Expand Down
2 changes: 2 additions & 0 deletions crates/connector_configs/src/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ pub struct ConnectorConfig {
pub iatapay: Option<ConnectorTomlConfig>,
pub opennode: Option<ConnectorTomlConfig>,
pub bambora: Option<ConnectorTomlConfig>,
pub datatrans: Option<ConnectorTomlConfig>,
pub dlocal: Option<ConnectorTomlConfig>,
pub ebanx_payout: Option<ConnectorTomlConfig>,
pub fiserv: Option<ConnectorTomlConfig>,
Expand Down Expand Up @@ -290,6 +291,7 @@ impl ConnectorConfig {
Connector::Iatapay => Ok(connector_data.iatapay),
Connector::Opennode => Ok(connector_data.opennode),
Connector::Bambora => Ok(connector_data.bambora),
Connector::Datatrans => Ok(connector_data.datatrans),
Connector::Dlocal => Ok(connector_data.dlocal),
Connector::Ebanx => Ok(connector_data.ebanx_payout),
Connector::Fiserv => Ok(connector_data.fiserv),
Expand Down
43 changes: 42 additions & 1 deletion crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2797,4 +2797,45 @@ three_ds_requestor_id="ThreeDS request id"
payment_method_type = "UnionPay"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"
key1="Public Api Key"

[datatrans]
[[datatrans.credit]]
payment_method_type = "Mastercard"
[[datatrans.credit]]
payment_method_type = "Visa"
[[datatrans.credit]]
payment_method_type = "Interac"
[[datatrans.credit]]
payment_method_type = "AmericanExpress"
[[datatrans.credit]]
payment_method_type = "JCB"
[[datatrans.credit]]
payment_method_type = "DinersClub"
[[datatrans.credit]]
payment_method_type = "Discover"
[[datatrans.credit]]
payment_method_type = "CartesBancaires"
[[datatrans.credit]]
payment_method_type = "UnionPay"
[[datatrans.debit]]
payment_method_type = "Mastercard"
[[datatrans.debit]]
payment_method_type = "Visa"
[[datatrans.debit]]
payment_method_type = "Interac"
[[datatrans.debit]]
payment_method_type = "AmericanExpress"
[[datatrans.debit]]
payment_method_type = "JCB"
[[datatrans.debit]]
payment_method_type = "DinersClub"
[[datatrans.debit]]
payment_method_type = "Discover"
[[datatrans.debit]]
payment_method_type = "CartesBancaires"
[[datatrans.debit]]
payment_method_type = "UnionPay"
[datatrans.connector_auth.BodyKey]
api_key = "Passcode"
key1 = "datatrans MerchantId"
43 changes: 42 additions & 1 deletion crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2026,4 +2026,45 @@ key1 = "Merchant ID"
payment_method_type = "UnionPay"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"
key1="Public Api Key"

[datatrans]
[[datatrans.credit]]
payment_method_type = "Mastercard"
[[datatrans.credit]]
payment_method_type = "Visa"
[[datatrans.credit]]
payment_method_type = "Interac"
[[datatrans.credit]]
payment_method_type = "AmericanExpress"
[[datatrans.credit]]
payment_method_type = "JCB"
[[datatrans.credit]]
payment_method_type = "DinersClub"
[[datatrans.credit]]
payment_method_type = "Discover"
[[datatrans.credit]]
payment_method_type = "CartesBancaires"
[[datatrans.credit]]
payment_method_type = "UnionPay"
[[datatrans.debit]]
payment_method_type = "Mastercard"
[[datatrans.debit]]
payment_method_type = "Visa"
[[datatrans.debit]]
payment_method_type = "Interac"
[[datatrans.debit]]
payment_method_type = "AmericanExpress"
[[datatrans.debit]]
payment_method_type = "JCB"
[[datatrans.debit]]
payment_method_type = "DinersClub"
[[datatrans.debit]]
payment_method_type = "Discover"
[[datatrans.debit]]
payment_method_type = "CartesBancaires"
[[datatrans.debit]]
payment_method_type = "UnionPay"
[datatrans.connector_auth.BodyKey]
api_key = "Passcode"
key1 = "datatrans MerchantId"
41 changes: 41 additions & 0 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2799,3 +2799,44 @@ three_ds_requestor_id="ThreeDS request id"
[billwerk.connector_auth.BodyKey]
api_key="Private Api Key"
key1="Public Api Key"

[datatrans]
[[datatrans.credit]]
payment_method_type = "Mastercard"
[[datatrans.credit]]
payment_method_type = "Visa"
[[datatrans.credit]]
payment_method_type = "Interac"
[[datatrans.credit]]
payment_method_type = "AmericanExpress"
[[datatrans.credit]]
payment_method_type = "JCB"
[[datatrans.credit]]
payment_method_type = "DinersClub"
[[datatrans.credit]]
payment_method_type = "Discover"
[[datatrans.credit]]
payment_method_type = "CartesBancaires"
[[datatrans.credit]]
payment_method_type = "UnionPay"
[[datatrans.debit]]
payment_method_type = "Mastercard"
[[datatrans.debit]]
payment_method_type = "Visa"
[[datatrans.debit]]
payment_method_type = "Interac"
[[datatrans.debit]]
payment_method_type = "AmericanExpress"
[[datatrans.debit]]
payment_method_type = "JCB"
[[datatrans.debit]]
payment_method_type = "DinersClub"
[[datatrans.debit]]
payment_method_type = "Discover"
[[datatrans.debit]]
payment_method_type = "CartesBancaires"
[[datatrans.debit]]
payment_method_type = "UnionPay"
[datatrans.connector_auth.BodyKey]
api_key = "Passcode"
key1 = "datatrans MerchantId"
Loading

0 comments on commit 029c4b1

Please sign in to comment.