Download the PHP package gingerpayments/ginger-php without Composer

On this page you can find all versions of the php package gingerpayments/ginger-php. 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 ginger-php

Ginger PHP bindings

Build Status Packagist MIT License

Requirements

Installation

You can install the PHP bindings using composer:

You can also use the PHP bindings without using Composer by registering an autoloader function:

Or you could just include the composer generated autoloader:

Getting started

First create a new API client with your API key and API endpoint:

Initiating a payment

You can start a new payment by creating a new order:

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:

There is a lot more data related to an order. Please refer to the API documentation provided by your PSP to learn more about the various payment methods and options.

Getting an order

If you want to retrieve an existing order, use the getOrder method on the client:

This will return an associative array with all order information.

Updating an order

Some fields are not read-only and you are able to update them after order has been created. You can do this using the updateOrder method on the client:

Initiating a refund

You can refund an existing order by using the refundOrder method on the client:

Capturing a transaction of an order

You can initiate a capture of an order's transaction by using the captureOrderTransaction method:

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.

Getting the currency list

You can use the following request to retrieve a list of available currencies in ISO 4217 format.

For each available payment method for your account, you receive a list with available ISO 4217 currencies.

Custom requests

You can send any request that the API accepts using the send method. E.g. instead of using the createOrder method you could also use the following:

The $result variable would then contain the decoded JSON returned by the API.

Using a different CA bundle

If you need to use a different CA bundle than the one that comes with your system or cURL installation, you can provide custom cURL options indicating the location of your CA bundle as follows:

For more information on which cURL options to use, refer to the PHP cURL documentation.

Custom HTTP client

This library ships with its own minimal HTTP client for compatibility reasons. If you would like to use a different HTTP client, you can do so by implementing the Ginger\HttpClient\HttpClient interface and then constructing your own client:

Make sure your HTTP client prefixes the endpoint URL and API version to all requests, and uses HTTP basic auth to authenticate with the API using your API key.

API documentation

For the complete API documentation please prefer to the resources provided by your PSP.


All versions of ginger-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-curl Version *
ext-json Version *
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 gingerpayments/ginger-php contains the following files

Loading the files please wait ....