iDEAL Advance PHP integration is not that tough but it will be tough when you miss documentation. Before you begin to write code, read “iDEAL_General_EN_v2.1.pdf”, Topic 3.4. Below is summery diagram.

You should be aware of general configuration part before you can begin this portion of code. Read Topic 3.3 in “iDEAL_Advanced_PHP_EN_V2.2.pdf”.
In brief it works in following way:
- Make directory request (Get Bank list, Issuer list is what they called)
- Make Transaction Request and redirected to iDEAL/bank)
- Make Status Request (This is after iDEAL/bank redirect to webshop)
1) Directory Request
Directory Request means you are fetching Issuer List (List of banks) from iDEAL. This is list of banks which are associated with iDEAL and making payment from these banks is possible. Below is code, how can you fetch Issuer List:
-
$ideal_connector = new iDEALConnector();
-
$response = $ideal_connector->GetIssuerList();
-
-
if ($response->errorMessage)
-
{
-
$errorCode = $response->getErrorCode();
-
$errorMsg = $response->getErrorMessage();
-
$consumerMessage = $response->getConsumerMessage();
-
}
-
else
-
{
-
$IssuerList =& $response->getIssuerFullList();
-
}
If you see line number 3, I have made little bit changes. Original iDEAL document has
-
if ( ! $response ) {,
There’s no way that $response is false on failure because $ideal_connector->GetIssuerList() returns ErrorRespose Object. So when error is returned by Get $ideal_connector->IssuerList(), you’ll encounter error in next line i.e. $response->getIssuerFullList() because ErrorResponse object do not have getIssuerFullList().
Once you fetch Issuer Lists (Banks), let end user select his/her bank. HTML code looks like below:
-
<form method="post" action="" id="form1" name="form1">
-
<td valign="top" class="form-label">
-
-
<select name="bank">
-
<option value="">Select Your Bank</option>
-
<?php foreach($banks as $bank): ?>
-
<option value="<?php echo $bank->issuerID ?>"><?php echo $bank->issuerName ?></option>
-
<?php endforeach; ?>
-
</select>
-
</td>
-
<td>
-
<input class="btn" type="submit" name="submit2" value="Make Your Payment" id="submit2">
-
</td>
-
</form>
Note: It is suggested to save issuer list in local cache and run DirectoryRequest query once in 24 hour.
Transaction Request
End user will select banks (issuer is what they called) and submit form. Now you have to make Transaction request and redirect issuer’s website. Code looks like below
-
$ideal_connector = new iDEALConnector();
-
$response = $ideal_connector->RequestTransaction($issuerId,$purchaseId,$amount,$description,$entranceCode);
-
if($response->transactionID)
-
{
-
$url = $response->getIssuerAuthenticationURL();
-
header("Location:".$url);
-
}
After this, end user login to his bank and make payment. On successful, iDEAL/bank redirect customer to webshop again (you have to define redirect page in config, they call it MerchantReturnURL).
Parameters for RequestTransaction():
IssuerId: the ID of the issuer the consumer has selected from the pick list
PurchaseId: the purchase number according to the online shop’s system
Amount: the amount in whole cents (no decimals; 1 Euro = 100)
Description: the description of the product
EntranceCode: a code determined by the online shop with which the purchase can be
authenticated upon redirection to the online shop (see section 4.2.2 for details).
(optional) ExpirationPeriod: if different from the configured value.
(optional) MerchantReturnURL: if different from the configured value.
Status Request
When iDEAL/bank redirect end user to webshop, it will automatically add two parameters entranceCode and TransactionId. entranceCode is hold by ec variable and TransectionId is hold by trxid variable. So, you have TransactionId (trxid) in landing page, you should make status request. If you do not make status request, payment will not be guaranteed. Following is code to make status request:
-
$connector = new iDEALConnector();
-
$transactionId = $_GET['trxid'];
-
$response = $connector->RequestTransactionStatus($transactionId);
-
if ($response->errorMessage)
-
{
-
$errorCode = $response->getErrorCode();
-
$errorMsg = $response->getErrorMessage();
-
$consumerMessage = $response->getConsumerMessage();
-
} else {
-
$status =& $response->getStatus();
-
-
if ($status === IDEAL_TX_STATUS_SUCCESS )
-
{
-
$consumerName = $response->getConsumerName();
-
$consumerAccNumber = $response->getConsumerAccountNumber();
-
$consumerCity = $response->getConsumerCity();
-
}
-
}
(Issue request can be made manually from iDEAL Dashboard as well).



