All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.safecharge.biz.SafechargeHttpClient Maven / Gradle / Ivy

Go to download

SafeCharge’s REST API SDK for Java provides developer tools for accessing Safecharge's REST API. SafeCharge’s REST API is a simple, easy to use, secure and stateless API, which enables online merchants and service providers to process consumer payments through SafeCharge’s payment gateway. The API supports merchants of all levels of PCI certification, from their online and mobile merchant applications, and is compatible with a large variety of payment options, i.e. payment cards, alternative payment methods, etc.

There is a newer version: 1.7.11
Show newest version
package com.safecharge.biz;

import org.apache.http.client.HttpClient;

import com.safecharge.model.Proxy;

/**
 * Copyright (C) 2007-2017 SafeCharge International Group Limited.
 * 

* Wrapper class for {@link HttpClient} with specific Safecharge's properties * * @author Nikola Dichev * @since 2/16/2017 */ public class SafechargeHttpClient { /** * Creates a pre-configured {@link HttpClient} instance. * * @return @link HttpClient} with specific Safecharge's default properties */ public static HttpClient createDefault() { return new SafechargeClientBuilder().setDefaultConnectionManager() .setDefaultConnectionTTL() .setDefaultRequestConfig() .setDefaultSSLSocketFactory() .build(); } /** * Creates a pre-configured {@link HttpClient} instance which connects to SafeCharge's API via {@link Proxy}. * * @param proxy A {@link Proxy} object to get the connection info from * @return {@link HttpClient} with specific Safecharge's default properties and the proxy properties defined by the {@code proxy} */ public static HttpClient createDefault(Proxy proxy) { return new SafechargeClientBuilder().setProxy(proxy) .setDefaultConnectionManager() .setDefaultConnectionTTL() .setDefaultRequestConfig() .setDefaultSSLSocketFactory() .build(); } /** * Provides custom {@link HttpClient} configuration. * * @return {@link SafechargeClientBuilder} instance */ public static SafechargeClientBuilder custom() { return new SafechargeClientBuilder(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy