Skip to content

Commit 37e01ca

Browse files
authored
Correct live url for SessionAuthentication API (#1580)
1 parent 884b446 commit 37e01ca

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/main/java/com/adyen/Service.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ protected String createBaseURL(String url) {
8989
return url.replaceFirst("-live", "-test");
9090
}
9191

92+
if (url.contains("/authe/")) {
93+
return url.replaceFirst("https://test.adyen.com/", "https://authe-live.adyen.com/");
94+
}
95+
9296
if (url.contains("pal-")) {
9397
if (config.getLiveEndpointUrlPrefix() == null) {
9498
throw new IllegalArgumentException("please provide a live url prefix in the client");

src/test/java/com/adyen/ServiceTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,13 @@ public void testLiveCheckoutPosSdkUrlWithPrefix() {
9292
String actualUrl = service.createBaseURL(testUrl);
9393
assertEquals(expectedUrl, actualUrl);
9494
}
95+
96+
@Test
97+
public void testSessionAuthenticationLiveUrl() {
98+
String testUrl = "https://test.adyen.com/authe/api/v1";
99+
String expectedUrl = "https://authe-live.adyen.com/authe/api/v1";
100+
101+
String actualUrl = service.createBaseURL(testUrl);
102+
assertEquals(expectedUrl, actualUrl);
103+
}
95104
}

0 commit comments

Comments
 (0)