Download the PHP package digiwallet/transaction-sdk without Composer

On this page you can find all versions of the php package digiwallet/transaction-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package transaction-sdk

DigiWallet SDK

With this (namespaced) SDK you can easily make the calls to DigiWallet for all the payment methods that are provided.

Required: PHP 5.4+

Installation

Usage

First register the autoloader. If your framework already has an autoloader you might not need to use this. Use the proper route to the autoload file

require_once __DIR__.'/../lib/DigiWallet/autoload.php';

Include the DigiWallet namespace:

use \DigiWallet as DigiWallet;

Now start the payment by calling:

$startPaymentResult = DigiWallet\Transaction::model("Ideal")
    ->outletId(143835)
    ->amount(1000)
    ->description('Test payment')
    ->returnUrl('http://www.test.nl/success')
    ->cancelUrl('http://www.test.nl/canceled')
    ->reportUrl('http://www.test.nl/report')
    ->bank('INGBNL2A')
    ->start();      

You can check the result. $startPaymentResult->status will be true in case of success. If not startPaymentResult->status will have the error message.

If all is OK, redirect to the bank:

Header ("Location: ".$startPaymentResult->url);

After payment the reportUrl will be called by DigiWallet, passing amongst others the transaction ID . See the DigiWallet documentation for more information.

The script behind this report URL has to check the validity of the report, thus checking the actual payment.

This is done by calling (after including the autoloader and use statement):

        $checkPaymentResult = DigiWallet\Transaction::model($method)
            ->outletId(143835)
            ->transactionId($startPaymentResult->transactionId)
            ->check();

Check the results in $checkPaymentResult for more information about the payment. Most important: $checkPaymentResult = true indicates a succesful payment. Save the result of the payment in your database.

When the customer paid, he will be redirected to the Return URL. If not, he is redirected to the Cancel URL.

Test-mode

When logged in to our Organization Dashboard in DigiWallet, you have the option to enable Test-mode for any of our outlets. If you do this, every transaction started on that outlet will immediately run in test mode, meaning no actual money will be transferred.

Instead of the payment method's specific banking environment, a link to the DigiWallet Transaction Test Panel is returned. On this panel you can very easily manipulate the status of the transaction, to simulate a successful customer return or server-to-server callback, or to simulate cancellations or errors.

Payment methods

Currently the following payment methods are implemented. See their classes (in parentheses) under /lib/DigiWallet/Methods for their specifics like minimum/maximum amounts and specific properties:

Notes


All versions of transaction-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digiwallet/transaction-sdk contains the following files

Loading the files please wait ....