public class SofortLibCommon
extends java.lang.Object
| Constructor and Description |
|---|
SofortLibCommon(ConnectionConfig connectionConfig,
DataHandler dataHandler,
org.apache.commons.logging.Log log)
Defines a SofortLib with the given connection data, data handler and
logger.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection(SofortLibRequest request)
Returns the defined connection for given kind of the SofortLib request.
|
SofortTransactionStatusNotification |
parseStatusNotificationResponse(RawResponse rawResponse)
Parses received raw response to the sofort transaction notification.
|
<T extends SofortLibResponse> |
sendLibRequest(SofortLibRequest request,
java.lang.Class<T> responseClass)
Sends a defined SofortLib request to API and receives the expected
SofortLib response.
|
public SofortLibCommon(ConnectionConfig connectionConfig, DataHandler dataHandler, org.apache.commons.logging.Log log)
connectionConfig - connection specific communication settings containerdataHandler - handler controls the parsing and rendering of the datalog - logger of type Log. The SofortLibCommon can but should
not be used directly, therefore the logger should be passed
through from the product implementationspublic <T extends SofortLibResponse> T sendLibRequest(SofortLibRequest request, java.lang.Class<T> responseClass)
T - the generic type of a sofort lib responserequest - the defined SofortLib request.responseClass - expected response class. Needed topublic SofortTransactionStatusNotification parseStatusNotificationResponse(RawResponse rawResponse)
rawResponse - the raw responsepublic Connection getConnection(SofortLibRequest request)
request - the defined SofortLib request.