nl.iShopService.util
Class Ideal3Http

java.lang.Object
  extended by nl.iShopService.util.Ideal3Http

public class Ideal3Http
extends java.lang.Object

The Ideal3Http class hides http communications with bank servers.

Author:
jvdm

Constructor Summary
Ideal3Http()
           
 
Method Summary
 AcquirerErrorRes getAcquirerErrorRes()
          Get error info after request
 AcquirerStatusRes getAcquirerStatusRes()
          Get Status type request result
 AcquirerTrxRes getAcquirerTrxRes()
          Get Transaction type request result
 DirectoryRes getDirectoryRes()
          Get Directory type request result
 boolean isValidMessage()
          Checks if response has valid signature
 void send(java.lang.String signedMessage, java.lang.String serverUrl, TypeIdeal3Request requestType, java.lang.String certificate)
          Send a http message to the bank.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ideal3Http

public Ideal3Http()
Method Detail

send

public void send(java.lang.String signedMessage,
                 java.lang.String serverUrl,
                 TypeIdeal3Request requestType,
                 java.lang.String certificate)
Send a http message to the bank. This method supports all three message types iDEAL uses. It can address both a test server or a production server The method does not return some object but the send() results are store in class properties validMessage, DirectoryRes, AcquirerTrxRes, AcquirerStatusRes or AcquirerErrorRes. Use the getters for these structures to obtain the request result.

Parameters:
signedMessage - XML formatted string to be send to bank. Must have a digital signature.
serverUrl - url for production of test environment
requestType - TypeIdeal3Request.directory, TypeIdeal3Request.transaction or TypeIdeal3Request.status
certificate - Bank X509 certificate

getDirectoryRes

public DirectoryRes getDirectoryRes()
Get Directory type request result

Returns:
DirectoryRes if request was of directory type and the response data is valid, that is the XML and it's contents contains valid data. return null in case the request was not for directory.

getAcquirerErrorRes

public AcquirerErrorRes getAcquirerErrorRes()
Get error info after request

Returns:
AcquirerErrorRes if digital signature is valid but the request for directory, transaction or status fails. The error code revers to iDEAL documentation. If no errors occured, null is returned

getAcquirerStatusRes

public AcquirerStatusRes getAcquirerStatusRes()
Get Status type request result

Returns:
AcquirerStatusRes if request was of status type and the response data is valid, that is the XML and it's contents contains valid data. return null in case the request was not for status.

getAcquirerTrxRes

public AcquirerTrxRes getAcquirerTrxRes()
Get Transaction type request result

Returns:
AcquirerTrxRes if request was of transaction type and the response data is valid, that is the XML and it's contents contains valid data. return null in case the request was not for transaction.

isValidMessage

public boolean isValidMessage()
Checks if response has valid signature

Returns:
true is the reponse form the bank has a valid signature