Download the PHP package namshi/innovate without Composer

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

NAMSHI | Innovate

Build Status

SensioLabsInsight

This library provides support for the Innovate payment gateway using Guzzle.

Version

From the 3.0.0 version, the client constructor has been changed. Now it accepts two more parameters:

The added paramets are used when fetching the transactions related to a cart id (see below).

Installation

You can install this library via composer: have a look at the package on packagist.

Then include it into your composer.json:

Pick major and minor version according to your needs.

Usage

To use the library you will need an instance of the Namshi\Innovate\Client class. This library will provide also helper classes that describe the data needed by the Innovate api.

If you want you can also inject your own Guzzle client instance (as long as it extendes \Guzzle\Service\Client)

How It Works

There are two types of transactions:

We do not have a way to understand which is which beforehand. The way we can understand if we are dealing with a 3-D_Secure transaction is by checking the response from Innovate.

Authorization Statuses

Any payment will perform an authorization request first and then the payment request.

If the authorization is denied, you will receive a response with a failure message and the 400 Bad Request status code .

Normal transaction

A normal transaction will follow only the authorization and payment steps already described. On your end you will only need to check that the status code of the response is a 200. The library will take care of the rest.

3D secure transaction

A 3D secure transaction requires an additional step compared to the normal transaction.

When the library requests the authorization for a 3D secure transaction, Innovate will answer with a url where the customer should be redirect. The redirection should be done by your application (as described below).

Once the customer is done with the 3D secure step, she'll be redirected back to the application and there you can use this library to perform the actual payment.

Note: The library will return an instance of 'Namshi\Innovate\Http\Response\Redirect' when the transaction is a 3D secure one.

The following example describes the code to perform a 3D secure payment:

The response object will contain the following values:

You will need those as hidden fields to perform the redirect to Innovate:

One simple way to redirect the customer with the right parameters is to build a form and add those values as hidden fields.

The must be sent to the targetUrl:

Note: termUrl is the url where Innovate will redirect the customer after the 3D secure step.

An example of this form is here: ACS (Access Control Server) Form

The easiest way to submit the form is with Javascript (without asking the customer to do it):

After the form is submitted the customer will be redirected to the 3D-Secure page which asks for extra credentials. From there she gets redirected to termUrl with two values ('PaRes', 'MD'):

We can use this values to perfom the actual payment request:

The final response lets us check if the payment is successful or denied:

Fetching transaction related to a cart id

From 3.0.0 version there is a new method that let you fetch the transaction given the innovate cart id.

This method will return a object containing the answer from innovate or throw an exception ().

Tokenization of a credit card

With 4.0.0 version we add the ability to:

To request a token you should use the following method

To perform a normal transaction or a 3D Secure transaction with a token, the flow is the same described above, the only difference is:

Tests

You can run the test suite by first installing the dependencies and then running PHPUnit:

There is an integration test that actually verify that the library works flawlessly.

To run it, you need to create a file called .innovate.config in your your project directory with 4 parameters

and then run


All versions of innovate with dependencies

PHP Build Version
Package Version
Requires guzzle/guzzle Version ~3.1
symfony/serializer Version ~2.3
symfony/http-foundation Version ~2.3
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 namshi/innovate contains the following files

Loading the files please wait ....