simotod/omnipay-setefi

Setefi driver for the Omnipay payment processing library

1.0.2 2015-10-09 16:02 UTC

This package is auto-updated.

Last update: 2024-04-16 05:12:08 UTC


README

Setefi gateway for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Setefi support for Omnipay.

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:

{
    "require": {
        "simotod/omnipay-setefi": "~1.0"
    }
}

And run composer to update your dependencies:

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Basic Usage

For general usage instructions, please see the main Omnipay repository.

Example

	$gateway = Omnipay::create('\SimoTod\OmnipaySetefi\Gateway');

	$request = $gateway->purchase(
 		array(
            'id'                    => '99999999',
            'password'              => '99999999',
            'amount'                => '1.00',
            'returnUrl'             => 'http://www.merchant.it/notify',
            'cancelUrl'             => 'http://www.merchant.it/error',
            'transactionId'         => 'TRCK0001',
            'description'           => 'Description'
            'language'              => \SimoTod\OmnipaySetefi\Gateway::LANG_ITA
 		)
	);

	//Set test mode. Remove this row or set to false in production.
	$request->setTestMode(true);

	$response = $request->send();

	if ($response->isRedirect()) {
		// (optional) save the $response->getTransactionReference() token.
        // redirect to offsite payment Setefi
        $response->redirect();
    } else {
        // payment failed: display message to customer
        echo $response->getMessage();
    }

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker.