iDIN is used for personal identification by bank and is supported by Dutch banks. With iDIN you can be sure who is registering on your application. This PHP package contains a client for CM Telecom.
See for more information: https://www.idin.nl
Install package by running the command:
$ composer require nimbles-nl/cm-telecom
This package is easy to use and can be used in any php project with php 7.0 or later.
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
$adapter = new GuzzleAdapter(new GuzzleClient());
$apiToken = 'secret-token';
$apiUrl = 'https://idin.cmtelecom.com/idin/v1.0/test';
$applicationName = 'MyApp';
$client = new IDINClient($adapter, $apiToken, $apiUrl, $applicationName);
$issuers = $client->getIssuers();
$issuers = $client->getIssuers();
$issuer = $issuers[0];
$transaction = $client->getIDINTransaction($issuer);
// Remember this data / store it in your database
$transactionId = $transaction->getTransactionId();
$entranceCode = $transaction->getEntranceCode();
$merchantReference = $transaction->getMerchantReference();
// Redirect the user to the bank page
return new RedirectResponse($transaction->getAuthenticationUrl());
$transaction = new IDINTransaction($transactionId, $merchantReference, $entranceCode);
$userData = $client->getUserInfo($transaction);
You can also receive bank account details with the IBANClient. It works almost the same as with IDIN. The client is already included in this package, but remember you use a different url for the api requests.
use GuzzleHttp\Client as GuzzleClient;
use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
$adapter = new GuzzleAdapter(new GuzzleClient());
$apiToken = 'secret-token';
$apiUrl = 'https://ibancheck.cmdisp.com/ibancheck/v1.0/test';
$applicationName = 'MyApp';
$client = new IBANClient($adapter, $apiToken, $apiUrl, $applicationName);
$issuers = $client->getIssuers();
$issuers = $client->getIssuers();
$issuer = $issuers[0];
$transaction = $client->getIBANTransaction($issuer);
// Remember this data / store it in your database
$transactionId = $transaction->getTransactionId();
$entranceCode = $transaction->getEntranceCode();
$merchantReference = $transaction->getMerchantReference();
// Redirect the user to the bank page
return new RedirectResponse($transaction->getAuthenticationUrl());
$transaction = new IBANTransaction($transactionId, $merchantReference, $entranceCode);
$userData = $client->getTransactionInfo($transaction);