public class IPGApiClient extends Object
IPGApiClient
represents the core class of the client package.
Transaction or Action instances can be passed to the
IPGApiClient#commitTransaction(IPGApiTransactionObject)
operation or
the IPGApiClient#commitAction(IPGApiActionObject)
operation which
builds a SOAP message and sends it to the First Data API Web Service.Modifier and Type | Field and Description |
---|---|
protected org.apache.http.impl.client.CloseableHttpClient |
client |
Constructor and Description |
---|
IPGApiClient() |
IPGApiClient(String ipgApiUrl,
String storeId,
String password,
byte[] keyStore,
String keyStorePW)
creates an instance of the IPGApiClient taking all parameters which are
necessary for communicating with the First Data API Web Service
|
Modifier and Type | Method and Description |
---|---|
protected Object |
commit(byte[] requestBytes) |
protected Object |
commit(Object request) |
de.firstdata.ipg.api.schema.IPGApiActionResponse |
commitAction(IPGApiAction ipgApiAction)
commits an action on the First Data API by performing a Web Service call
with the action data passed
|
de.firstdata.ipg.api.schema.IPGApiActionResponse |
commitAction(IPGApiAction ipgApiAction,
IPGApiMerchantDetailsObject merchantDetails)
commits an action on the First Data API by performing a Web Service call
with the action data passed
|
IPGApiResult |
commitTransaction(IPGApiSubsequentTransaction ipgApiSubsequentTransaction,
IPGApiMerchantDetailsObject ipgApiMerchantDetails) |
IPGApiResult |
commitTransaction(IPGApiTransaction ipgApiTransaction)
commits a transaction on the First Data API by performing a Web Service
call with the transaction data passed
|
IPGApiResult |
commitTransaction(IPGApiTransaction ipgApiTransaction,
IPGApiMerchantDetailsObject ipgApiMerchantDetails)
commits a transaction on the First Data API by performing a Web Service
call with the transaction data passed
|
String |
getIpgApiUrl() |
byte[] |
getKeyStore() |
String |
getKeyStorePassword() |
int |
getMaxConnectionsPerRoute() |
int |
getMaxTotalConnections() |
String |
getPassword() |
int |
getSocketTimeout() |
String |
getStoreID() |
int |
getTimeout() |
byte[] |
getTrustStore() |
String |
getTrustStorePassword() |
URI |
getURI() |
String |
getUserID() |
String |
getUserMidfix() |
String |
getUserPrefix() |
void |
init()
If you used a setter method, you must call the init method to create a
new connection to the web service.
|
void |
setConnectionPoolTimeout(int value)
This method sets the ConnManagerPNames.TIMEOUT.
|
void |
setIpgApiUrl(String value)
This method has no effect without calling the method init().
|
void |
setKeyStore(byte[] value)
This method has no effect without calling the method init().
|
void |
setKeyStorePassword(String value)
This method has no effect without calling the method init().
|
void |
setMaxConnectionsPerRoute(int value)
This should be set to the numbers of terminal You have.
|
void |
setMaxTotalConnections(int value)
For detail information see the apache http client 4.0.3 doc.
|
void |
setPassword(String value)
The API store password.
|
void |
setProxy(String host,
Integer port,
String user,
String password,
String workstation,
String domain)
Sets the proxy.
|
void |
setSocketTimeout(int value)
This method sets the CoreConnectionPNames.SO_TIMEOUT.
|
void |
setStoreID(String value)
StoreID or technical user.
|
void |
setTrustStore(byte[] value)
This method has no effect without calling the method init().
|
void |
setTrustStorePassword(String value)
This method has no effect without calling the method init().
|
void |
setUserID(String value)
We set this to 1
This method has no effect without calling the method init().
|
void |
setUserMidfix(String value)
We set this to ._.
|
void |
setUserPrefix(String value)
We set this to WS.
|
public IPGApiClient()
public IPGApiClient(String ipgApiUrl, String storeId, String password, byte[] keyStore, String keyStorePW) throws IOException, JAXBException, URISyntaxException
ipgApiUrl
- the URL of the First Data API Web ServicestoreId
- your store IDpassword
- your passwordkeyStore
- a byte array containing your key storekeyStorePW
- the password with which your key store can be accessedIOException
JAXBException
URISyntaxException
GeneralSecurityException
public URI getURI()
public void init() throws IOException, JAXBException, URISyntaxException, GeneralSecurityException
public void setProxy(String host, Integer port, String user, String password, String workstation, String domain)
host
- name or ip of the proxy machineport
- port of the proxyuser
- authorisated userpassword
- of the authorisated userworkstation
- name or ip of the local machinedomain
- windows domainpublic IPGApiResult commitTransaction(IPGApiTransaction ipgApiTransaction) throws ServerException, ClientException, SOAPException, org.apache.http.HttpException, MerchantException, ProcessingException, InternalException, IOException, JAXBException
ipgApiTransaction
- the transaction to be committedClientException
- thrown when finding problems in processing the transaction
dataMerchantException
- thrown in case the First Data API has registered your store
as being closedProcessingException
- thrown in case the credit card processor has failed to
process your transaction due to invalid transaction data -
for details check the exception instance's attributes by
calling the appropriate getter
methodsSOAPException
- thrown when finding problems in building/reading the SOAP
request/response messageIOException
- thrown when finding internal problems in processing the
request/response dataValidationError
- thrown in case your transaction data is not valid according
to the XML Schema defining the request/response XML
structuresServerException
- thrown when finding problems in processing the returned
server response dataorg.apache.http.HttpException
- thrown in case the server responds with an HTTP code other
than 200
or 500
InternalException
- thrown in case of processing your transaction has resulted in
an internal system error - note that you should never receive
this exception, however, if so, please contact supportJAXBException
TransformerException
public IPGApiResult commitTransaction(IPGApiTransaction ipgApiTransaction, IPGApiMerchantDetailsObject ipgApiMerchantDetails) throws ServerException, ClientException, SOAPException, org.apache.http.HttpException, MerchantException, ProcessingException, InternalException, IOException, JAXBException
ipgApiTransaction
- the transaction to be committedipgApiMerchantDetails
- the merchant information to be committedClientException
- thrown when finding problems in processing the transaction
dataMerchantException
- thrown in case the First Data API has registered your store
as being closedProcessingException
- thrown in case the credit card processor has failed to
process your transaction due to invalid transaction data -
for details check the exception instance's attributes by
calling the appropriate getter
methodsSOAPException
- thrown when finding problems in building/reading the SOAP
request/response messageIOException
- thrown when finding internal problems in processing the
request/response dataValidationError
- thrown in case your transaction data is not valid according
to the XML Schema defining the request/response XML
structuresServerException
- thrown when finding problems in processing the returned
server response dataorg.apache.http.HttpException
- thrown in case the server responds with an HTTP code other
than 200
or 500
InternalException
- thrown in case of processing your transaction has resulted in
an internal system error - note that you should never receive
this exception, however, if so, please contact supportJAXBException
TransformerException
public IPGApiResult commitTransaction(IPGApiSubsequentTransaction ipgApiSubsequentTransaction, IPGApiMerchantDetailsObject ipgApiMerchantDetails) throws ServerException, ClientException, SOAPException, org.apache.http.HttpException, MerchantException, ProcessingException, InternalException, IOException, JAXBException
ServerException
ClientException
SOAPException
org.apache.http.HttpException
MerchantException
ProcessingException
InternalException
IOException
JAXBException
public de.firstdata.ipg.api.schema.IPGApiActionResponse commitAction(IPGApiAction ipgApiAction) throws MerchantException, ProcessingException, JAXBException, SOAPException, IOException, ServerException, org.apache.http.HttpException
ipgApiAction
- the action to be committedClientException
- thrown when finding problems in processing the action dataMerchantException
- thrown in case the First Data API has registered your store
as being closedProcessingException
- thrown in case the credit card processor has failed to
process your action due to invalid transaction data - for
details check the exception instance's attributes by calling
the appropriate getter
methodsSOAPException
- thrown when finding problems in building/reading the SOAP
request/response messageIOException
- thrown when finding internal problems in processing the
request/response dataValidationError
- thrown in case your action data is not valid according to the
XML Schema defining the request/response XML structuresServerException
- thrown when finding problems in processing the returned
server response dataorg.apache.http.HttpException
- thrown in case the server responds with an HTTP code other
than 200
or 500
InternalException
- thrown in case of processing your action has resulted in an
internal system error - note that you should never receive
this exception, however, if so, please contact supportJAXBException
org.apache.http.HttpException
TransformerException
public de.firstdata.ipg.api.schema.IPGApiActionResponse commitAction(IPGApiAction ipgApiAction, IPGApiMerchantDetailsObject merchantDetails) throws MerchantException, ProcessingException, JAXBException, SOAPException, IOException, ServerException, org.apache.http.HttpException
ipgApiAction
- the action to be committedipgApiMerchantDetails
- the merchant information to be committedClientException
- thrown when finding problems in processing the action dataMerchantException
- thrown in case the First Data API has registered your store
as being closedProcessingException
- thrown in case the credit card processor has failed to
process your action due to invalid transaction data - for
details check the exception instance's attributes by calling
the appropriate getter
methodsSOAPException
- thrown when finding problems in building/reading the SOAP
request/response messageIOException
- thrown when finding internal problems in processing the
request/response dataValidationError
- thrown in case your action data is not valid according to the
XML Schema defining the request/response XML structuresServerException
- thrown when finding problems in processing the returned
server response dataorg.apache.http.HttpException
- thrown in case the server responds with an HTTP code other
than 200
or 500
InternalException
- thrown in case of processing your action has resulted in an
internal system error - note that you should never receive
this exception, however, if so, please contact supportJAXBException
org.apache.http.HttpException
TransformerException
protected Object commit(Object request) throws JAXBException, SOAPException, IOException, MerchantException, ProcessingException, ServerException, org.apache.http.HttpException
JAXBException
SOAPException
IOException
MerchantException
ProcessingException
ServerException
org.apache.http.HttpException
protected Object commit(byte[] requestBytes) throws IOException, SOAPException, JAXBException, ServerException, MerchantException, ProcessingException, org.apache.http.HttpException
IOException
SOAPException
JAXBException
ServerException
MerchantException
ProcessingException
org.apache.http.HttpException
public void setIpgApiUrl(String value)
public String getIpgApiUrl()
public void setKeyStore(byte[] value)
public byte[] getKeyStore()
public void setKeyStorePassword(String value)
public String getKeyStorePassword()
public void setMaxConnectionsPerRoute(int value)
public int getMaxConnectionsPerRoute()
public void setPassword(String value)
public String getPassword()
public void setSocketTimeout(int value)
public int getSocketTimeout()
public void setStoreID(String value)
public String getStoreID()
public void setTrustStore(byte[] value)
public byte[] getTrustStore()
public void setTrustStorePassword(String value)
public String getTrustStorePassword()
public void setUserID(String value)
public String getUserID()
public void setUserMidfix(String value)
public String getUserMidfix()
public void setUserPrefix(String value)
public String getUserPrefix()
public void setMaxTotalConnections(int value)
public int getMaxTotalConnections()
public void setConnectionPoolTimeout(int value)
public int getTimeout()
Copyright © 2019. All rights reserved.