Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom terminal api cloud url #195

Merged
merged 6 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ public class ApplicationProperty {
@Value("${ADYEN_POS_POI_ID:#{null}}")
private String poiId;

@Value("${saleId:POS_SALE_ID_42}")
@Value("${saleId:POS_SALE_ID}")
private String saleId;

@Value("${ADYEN_TERMINAL_API_CLOUD_ENDPOINT:#{null}}")
private String adyenTerminalApiCloudEndpoint;

public int getServerPort() {
return serverPort;
}
Expand Down Expand Up @@ -52,4 +55,12 @@ public void setHmacKey(String hmacKey) {
public String getSaleId() { return saleId; }

public void setSaleId(String saleId) { this.saleId = saleId ; }

public String getAdyenTerminalApiCloudEndpoint() {
return this.adyenTerminalApiCloudEndpoint;
}

public void setAdyenTerminalApiCloudEndpoint(String adyenTerminalApiCloudEndpoint) {
this.adyenTerminalApiCloudEndpoint = adyenTerminalApiCloudEndpoint;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public TerminalCloudApiService(ApplicationProperty applicationProperty) {
}

client = new Client(applicationProperty.getApiKey(), Environment.TEST);
if(applicationProperty.getAdyenTerminalApiCloudEndpoint() != null) {
// override AdyenTerminalApiCloudEndpoint TEST URL (for example using Mock Terminal app)
gcatanese marked this conversation as resolved.
Show resolved Hide resolved
client.getConfig().setTerminalApiCloudEndpoint(applicationProperty.getAdyenTerminalApiCloudEndpoint());
}
terminalCloudAPI = new TerminalCloudAPI(client);
}

Expand Down