paynl/sdk-idin

There is no license information available for the latest version (v1.10) of this package.

SDK specifically for idin

v1.10 2020-06-17 07:53 UTC

This package is auto-updated.

Last update: 2024-12-04 23:02:29 UTC


README

About

In order to use this SDK, you'll need to have iDIN enabled for your PAY. account.

This SDK extends the standard PAY. SDK, so all functions from the original SDK are also available.

Installation

This SDK uses composer.

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

For more information on how to use/install composer, please visit: https://github.com/composer/composer

To install the PAY. PHP SDK-iDIN into your project, simply

$ composer require paynl/sdk-idin

Installation without composer

Coming soon..

Setting up

To communicate with the API of PAY, you'll need to authenticate. PAY. uses a token to authenticate you. You can find your token in the PAY.admin. On the bottom of the API Tokens page.

Step 1 the autoloader

Composer generates an autoloader for your application. To be able to access the classes of the SDK, all you have to do is include the composer autoloader. The autoloader is located here: vendor/autoload.php

require_once('path_to/vendor/autoload.php');
Step 2 Your APItoken

To let the SDK know what your API token is, you'll have to register the TokenCode (AT-code belonging to the token) and API token as follows:

\Paynl\Config::setTokenCode('AT-####-####');
\Paynl\Config::setApiToken('****************************************');

Now you're ready to make some calls

Examples

The full list of functions can be found in the samples folder.

getIssuers

Gets an array with issuers

Authenticate

Starts an iDIN transaction based on issuer and merchant reference.

Status

Get the current status of an iDIN transaction possible statuses:

  • Init: The request is created; no iDIN status available (yet);
  • Open: Final result not yet known;
  • Pending: Transaction has not yet been completed;
  • Success: Positive result; the transaction is or has been executed;
  • Cancelled: Negative result due to cancellation by Consumer; the transaction will not be executed;
  • Expired: Negative result due to expiration of the transaction; the transaction will not be executed;
  • Failure: Negative result due to other reasons; the transaction will not be executed;
  • Error: Error message received from issuer;