Skip to content

Commit

Permalink
fix possdk live url (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
jillingk authored Oct 1, 2024
1 parent 5dd5478 commit 643684f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/com/adyen/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,14 @@ protected String createBaseURL(String url) {
if (config.getLiveEndpointUrlPrefix() == null) {
throw new IllegalArgumentException("please provide a live url prefix in the client");
}
url = url.replaceFirst("https://checkout-test.adyen.com/",
"https://" + config.getLiveEndpointUrlPrefix() + "-checkout-live.adyenpayments.com/checkout/");
if (url.contains("/possdk/v68")) {
// Temporary until they fix possdk
url = url.replaceFirst("https://checkout-test.adyen.com/",
"https://" + config.getLiveEndpointUrlPrefix() + "-checkout-live.adyenpayments.com/");
} else {
url = url.replaceFirst("https://checkout-test.adyen.com/",
"https://" + config.getLiveEndpointUrlPrefix() + "-checkout-live.adyenpayments.com/checkout/");
}
}

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

0 comments on commit 643684f

Please sign in to comment.