Skip to content

Commit

Permalink
added return for live prefix as well as test (#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
DjoykeAbyah authored Aug 15, 2024
1 parent d5a6932 commit 4b07395
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/adyen/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void setApiKeyRequired(boolean apiKeyRequired) {
protected String createBaseURL(String url) {
Config config = this.getClient().getConfig();
if (config.getEnvironment() != Environment.LIVE) {
return url;
return url.replaceFirst("-live", "-test");
}

if (url.contains("pal-")) {
Expand All @@ -67,6 +67,7 @@ protected String createBaseURL(String url) {
url = url.replaceFirst("https://checkout-test.adyen.com/",
"https://" + config.getLiveEndpointUrlPrefix() + "-checkout-live.adyenpayments.com/checkout/");
}

return url.replaceFirst("-test", "-live");
}
}

0 comments on commit 4b07395

Please sign in to comment.