Skip to content

Commit

Permalink
feat(connector): [JPMORGAN] add Payment flows for cards (#6668)
Browse files Browse the repository at this point in the history
Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-GJQC9R9THR.local>
  • Loading branch information
bsayak03 and Sayak Bhattacharya authored Dec 22, 2024
1 parent dc0a92d commit adcddd6
Show file tree
Hide file tree
Showing 25 changed files with 1,341 additions and 187 deletions.
2 changes: 2 additions & 0 deletions api-reference-v2/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -6557,6 +6557,7 @@
"helcim",
"iatapay",
"itaubank",
"jpmorgan",
"klarna",
"mifinity",
"mollie",
Expand Down Expand Up @@ -19423,6 +19424,7 @@
"helcim",
"iatapay",
"itaubank",
"jpmorgan",
"klarna",
"mifinity",
"mollie",
Expand Down
2 changes: 2 additions & 0 deletions api-reference/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9276,6 +9276,7 @@
"helcim",
"iatapay",
"itaubank",
"jpmorgan",
"klarna",
"mifinity",
"mollie",
Expand Down Expand Up @@ -23842,6 +23843,7 @@
"helcim",
"iatapay",
"itaubank",
"jpmorgan",
"klarna",
"mifinity",
"mollie",
Expand Down
1 change: 1 addition & 0 deletions config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://sandbox.devportal.itau.com.br/"
jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url= "https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down
5 changes: 5 additions & 0 deletions config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://sandbox.devportal.itau.com.br/"
jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url="https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -298,6 +299,10 @@ debit.currency = "USD"
ali_pay.currency = "GBP,CNY"
we_chat_pay.currency = "GBP,CNY"

[pm.filters.jpmorgan]
debit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }
credit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }

[pm_filters.klarna]
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" }

Expand Down
5 changes: 5 additions & 0 deletions config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ iatapay.base_url = "https://iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://secure.api.itau/"
jpmorgan.base_url = "https://api-ms.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url="https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.klarna.com/"
mifinity.base_url = "https://secure.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -332,6 +333,10 @@ debit.currency = "USD"
ali_pay.currency = "GBP,CNY"
we_chat_pay.currency = "GBP,CNY"

[pm.filters.jpmorgan]
debit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }
credit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }

[pm_filters.klarna]
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" }

Expand Down
5 changes: 5 additions & 0 deletions config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://sandbox.devportal.itau.com.br/"
jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url="https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -333,6 +334,10 @@ debit.currency = "USD"
ali_pay.currency = "GBP,CNY"
we_chat_pay.currency = "GBP,CNY"

[pm.filters.jpmorgan]
debit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }
credit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }

[pm_filters.klarna]
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "CHF,DKK,EUR,GBP,NOK,PLN,SEK,USD,AUD,NZD,CAD" }

Expand Down
5 changes: 5 additions & 0 deletions config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://sandbox.devportal.itau.com.br/"
jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url= "https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down Expand Up @@ -491,6 +492,10 @@ paypal = { currency = "AUD,BRL,CAD,CNY,CZK,DKK,EUR,HKD,HUF,ILS,JPY,MYR,MXN,TWD,N
credit = { currency = "USD" }
debit = { currency = "USD" }

[pm.filters.jpmorgan]
debit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }
credit = { country = "CA, EU, UK, US", currency = "CAD, EUR, GBP, USD" }

[pm_filters.klarna]
klarna = { country = "AU,AT,BE,CA,CZ,DK,FI,FR,DE,GR,IE,IT,NL,NZ,NO,PL,PT,ES,SE,CH,GB,US", currency = "AUD,EUR,EUR,CAD,CZK,DKK,EUR,EUR,EUR,EUR,EUR,EUR,EUR,NZD,NOK,PLN,EUR,EUR,SEK,CHF,GBP,USD" }

Expand Down
1 change: 1 addition & 0 deletions config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
inespay.base_url = "https://apiflow.inespay.com/san/v21"
itaubank.base_url = "https://sandbox.devportal.itau.com.br/"
jpmorgan.base_url = "https://api-mock.payments.jpmorgan.com/api/v2"
jpmorgan.secondary_base_url="https://id.payments.jpmorgan.com"
klarna.base_url = "https://api{{klarna_region}}.playground.klarna.com/"
mifinity.base_url = "https://demo.mifinity.com/"
mollie.base_url = "https://api.mollie.com/v2/"
Expand Down
5 changes: 3 additions & 2 deletions crates/api_models/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub enum Connector {
// Inespay,
Iatapay,
Itaubank,
//Jpmorgan,
Jpmorgan,
Klarna,
Mifinity,
Mollie,
Expand Down Expand Up @@ -175,6 +175,7 @@ impl Connector {
(Self::Airwallex, _)
| (Self::Deutschebank, _)
| (Self::Globalpay, _)
| (Self::Jpmorgan, _)
| (Self::Paypal, _)
| (Self::Payu, _)
| (Self::Trustpay, PaymentMethod::BankRedirect)
Expand Down Expand Up @@ -234,7 +235,7 @@ impl Connector {
| Self::Iatapay
// | Self::Inespay
| Self::Itaubank
//| Self::Jpmorgan
| Self::Jpmorgan
| Self::Klarna
| Self::Mifinity
| Self::Mollie
Expand Down
2 changes: 1 addition & 1 deletion crates/common_enums/src/connector_enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub enum RoutableConnectors {
Iatapay,
// Inespay,
Itaubank,
//Jpmorgan,
Jpmorgan,
Klarna,
Mifinity,
Mollie,
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 @@ -198,6 +198,7 @@ pub struct ConnectorConfig {
pub gpayments: Option<ConnectorTomlConfig>,
pub helcim: Option<ConnectorTomlConfig>,
// pub inespay: Option<ConnectorTomlConfig>,
pub jpmorgan: Option<ConnectorTomlConfig>,
pub klarna: Option<ConnectorTomlConfig>,
pub mifinity: Option<ConnectorTomlConfig>,
pub mollie: Option<ConnectorTomlConfig>,
Expand Down Expand Up @@ -370,6 +371,7 @@ impl ConnectorConfig {
Connector::Gpayments => Ok(connector_data.gpayments),
Connector::Helcim => Ok(connector_data.helcim),
// Connector::Inespay => Ok(connector_data.inespay),
Connector::Jpmorgan => Ok(connector_data.jpmorgan),
Connector::Klarna => Ok(connector_data.klarna),
Connector::Mifinity => Ok(connector_data.mifinity),
Connector::Mollie => Ok(connector_data.mollie),
Expand Down
41 changes: 41 additions & 0 deletions crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,47 @@ api_key="Client Secret"
api_secret="Certificates"
key2="Certificate Key"

[jpmorgan]
[[jpmorgan.credit]]
payment_method_type = "American Express"
[[jpmorgan.credit]]
payment_method_type = "ChaseNet"
[[jpmorgan.credit]]
payment_method_type = "Diners Club"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "JCB"
[[jpmorgan.credit]]
payment_method_type = "Mastercard"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "UnionPay"
[[jpmorgan.credit]]
payment_method_type = "Visa"
[[jpmorgan.debit]]
payment_method_type = "American Express"
[[jpmorgan.debit]]
payment_method_type = "ChaseNet"
[[jpmorgan.debit]]
payment_method_type = "Diners Club"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "JCB"
[[jpmorgan.debit]]
payment_method_type = "Mastercard"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "UnionPay"
[[jpmorgan.debit]]
payment_method_type = "Visa"
[jpmorgan.connector_auth.BodyKey]
api_key="Client ID"
key1="Client Secret"

[klarna]
[[klarna.pay_later]]
payment_method_type = "klarna"
Expand Down
40 changes: 40 additions & 0 deletions crates/connector_configs/toml/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,46 @@ api_key="Client Secret"
api_secret="Certificates"
key2="Certificate Key"

[jpmorgan]
[[jpmorgan.credit]]
payment_method_type = "American Express"
[[jpmorgan.credit]]
payment_method_type = "ChaseNet"
[[jpmorgan.credit]]
payment_method_type = "Diners Club"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "JCB"
[[jpmorgan.credit]]
payment_method_type = "Mastercard"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "UnionPay"
[[jpmorgan.credit]]
payment_method_type = "Visa"
[[jpmorgan.debit]]
payment_method_type = "American Express"
[[jpmorgan.debit]]
payment_method_type = "ChaseNet"
[[jpmorgan.debit]]
payment_method_type = "Diners Club"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "JCB"
[[jpmorgan.debit]]
payment_method_type = "Mastercard"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "UnionPay"
[[jpmorgan.debit]]
payment_method_type = "Visa"
[jpmorgan.connector_auth.BodyKey]
api_key="Access Token"

[klarna]
[[klarna.pay_later]]
payment_method_type = "klarna"
Expand Down
40 changes: 40 additions & 0 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,46 @@ api_key="Client Secret"
api_secret="Certificates"
key2="Certificate Key"

[jpmorgan]
[[jpmorgan.credit]]
payment_method_type = "American Express"
[[jpmorgan.credit]]
payment_method_type = "ChaseNet"
[[jpmorgan.credit]]
payment_method_type = "Diners Club"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "JCB"
[[jpmorgan.credit]]
payment_method_type = "Mastercard"
[[jpmorgan.credit]]
payment_method_type = "Discover"
[[jpmorgan.credit]]
payment_method_type = "UnionPay"
[[jpmorgan.credit]]
payment_method_type = "Visa"
[[jpmorgan.debit]]
payment_method_type = "American Express"
[[jpmorgan.debit]]
payment_method_type = "ChaseNet"
[[jpmorgan.debit]]
payment_method_type = "Diners Club"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "JCB"
[[jpmorgan.debit]]
payment_method_type = "Mastercard"
[[jpmorgan.debit]]
payment_method_type = "Discover"
[[jpmorgan.debit]]
payment_method_type = "UnionPay"
[[jpmorgan.debit]]
payment_method_type = "Visa"
[jpmorgan.connector_auth.BodyKey]
api_key="Access Token"

[klarna]
[[klarna.pay_later]]
payment_method_type = "klarna"
Expand Down
Loading

0 comments on commit adcddd6

Please sign in to comment.