use of com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration in project connect-sdk-java by Ingenico-ePayments.
the class SDKProxyTest method test.
/**
* Smoke test for using a proxy configured through SDK properties.
*/
@Test
public void test() throws URISyntaxException, IOException {
ConvertAmountParams request = new ConvertAmountParams();
request.setAmount(123L);
request.setSource("USD");
request.setTarget("EUR");
Client client = getClientWithProxy();
try {
ServicesClient services = client.merchant("9991").services();
CommunicatorConfiguration configuration = getCommunicatorConfigurationWithProxy();
Assert.assertNotNull(configuration.getProxyConfiguration());
assertProxySet(services, configuration.getProxyConfiguration());
ConvertAmount response = services.convertAmount(request);
Assert.assertNotNull(response.getConvertedAmount());
} finally {
client.close();
}
}
use of com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration in project connect-sdk-java by Ingenico-ePayments.
the class GetPaymentExample method getClient.
private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");
URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
use of com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration in project connect-sdk-java by Ingenico-ePayments.
the class CreatePayoutExample method getClient.
private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");
URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
use of com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration in project connect-sdk-java by Ingenico-ePayments.
the class GetPaymentProductGroupsExample method getClient.
private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");
URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
use of com.ingenico.connect.gateway.sdk.java.CommunicatorConfiguration in project connect-sdk-java by Ingenico-ePayments.
the class GetDeviceFingerprintExample method getClient.
private Client getClient() throws URISyntaxException {
String apiKeyId = System.getProperty("connect.api.apiKeyId", "someKey");
String secretApiKey = System.getProperty("connect.api.secretApiKey", "someSecret");
URL propertiesUrl = getClass().getResource("/example-configuration.properties");
CommunicatorConfiguration configuration = Factory.createConfiguration(propertiesUrl.toURI(), apiKeyId, secretApiKey);
return Factory.createClient(configuration);
}
Aggregations