Skip to content

Commit

Permalink
fix: Resolve PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayak Bhattacharya authored and Sayak Bhattacharya committed Dec 19, 2024
1 parent 1ea37c8 commit 2045fba
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +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/am/oauth2/alpha/access_token"
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
2 changes: 1 addition & 1 deletion config/deployments/integration_test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +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/am/oauth2/alpha/access_token"
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
2 changes: 1 addition & 1 deletion config/deployments/production.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +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/am/oauth2/alpha/access_token"
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
2 changes: 1 addition & 1 deletion config/deployments/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +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/am/oauth2/alpha/access_token"
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
2 changes: 1 addition & 1 deletion config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,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/am/oauth2/alpha/access_token"
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
2 changes: 1 addition & 1 deletion config/docker_compose.toml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +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/am/oauth2/alpha/access_token"
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
14 changes: 8 additions & 6 deletions crates/hyperswitch_connectors/src/connectors/jpmorgan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,14 @@ impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken>
_req: &RefreshTokenRouterData,
connectors: &Connectors,
) -> CustomResult<String, errors::ConnectorError> {
Ok(connectors
.jpmorgan
.secondary_base_url
.as_ref()
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?
.to_string())
Ok(format!(
"{}/am/oauth2/alpha/access_token",
connectors
.jpmorgan
.secondary_base_url
.as_ref()
.ok_or(errors::ConnectorError::FailedToObtainIntegrationUrl)?
))
}

fn get_request_body(
Expand Down
2 changes: 1 addition & 1 deletion loadtest/config/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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/am/oauth2/alpha/access_token"
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

0 comments on commit 2045fba

Please sign in to comment.