Omnipay: Setefi
Setefi gateway for the Omnipay PHP payment processing library, (*1)
Omnipay is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+. This package implements Setefi support for Omnipay., (*2)
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:, (*3)
{
"require": {
"simotod/omnipay-setefi": "~1.0"
}
}
And run composer to update your dependencies:, (*4)
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update
Basic Usage
For general usage instructions, please see the main Omnipay
repository., (*5)
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., (*6)
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., (*7)
If you believe you have found a bug, please report it using the GitHub issue tracker., (*8)