Download the PHP package duronrulez/ginger-php without Composer
On this page you can find all versions of the php package duronrulez/ginger-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download duronrulez/ginger-php
More information about duronrulez/ginger-php
Files in duronrulez/ginger-php
Package ginger-php
Short Description The official Ginger Payments PHP SDK
License MIT
Homepage https://github.com/gingerpayments/php-sdk
Informations about the package ginger-php
Ginger Payments PHP Bindings
You can sign up for a Ginger Payments account at https://www.gingerpayments.com
Requirements
- PHP 5.4 or later.
Installation
You can install the PHP bindings using composer:
You can also use the PHP bindings without using Composer by registering an autoloader function:
Getting started
First create a new API client with your API key:
Create a new order
Creating a new order is easy:
You can also use the createIdealOrder
method to create a new order using the iDEAL payment method:
Or the createCreditCardOrder
method:
Once you've created your order, a transaction is created and associated with it. You will need to redirect the user to the transaction's payment URL, which you can retrieve as follows:
It is also recommended that you store the order's ID somewhere, so you can retrieve information about it later:
You can also access other information related to the order. Inspect the GingerPayments\Payment\Order
class for more
information. If you just want everything as a simple array, you can also use the Order::toArray
method.
Getting an order
If you want to retrieve an existing order, use the getOrder
method on the client:
You can iterate over all transactions in the order as follows:
You can access other information related to order transactions as well. Inspect the
GingerPayments\Payment\Order\Transaction
class for more information.
Getting the iDEAL issuers
When you create an order with the iDEAL payment method, you need to provide an issuer ID. The issuer ID is an identifier
of the bank the user has selected. You can retrieve all possible issuers by using the getIdealIssuers
method:
You can then use this information to present a list to the user of possible banks to choose from.
API documentation
Full API documentation is available here.
Tests
In order to run the tests first install PHPUnit via Composer:
Then run the test suite:
All versions of ginger-php with dependencies
guzzlehttp/guzzle Version ~5.2
beberlei/assert Version ~2.3
mathiasverraes/classfunctions Version ~1.1
ronanguilloux/isocodes Version ~1.1
rhumsaa/uuid Version ~2.8
nesbot/carbon Version ~1.16