Payssion driver for the Omnipay PHP payment processing library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitattributes
README.md
composer.json

README.md

Omnipay: Payssion

Payssion driver for the Omnipay PHP payment processing library

Latest Stable Version Total Downloads

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

Installation

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

{
    "require": {
        "inkedcurtis/omnipay-payssion": "^1.0"
    }
}

And run composer to update your dependencies:

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

Basic Usage

The following gateways are provided by this package:

  • Payssion

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

Example

Make a payment

$gateway = Omnipay::create('Payssion');

$gateway->initialize(array(
    'apiKey' => '',
    'secretKey' => '',
    'testMode' => true,
));

$response = $gateway->purchase([
    'pm_id' => 'dotpay_pl',
    'currency' => 'USD',
    'amount' => 1.00,
    'order_id' => '1234567',
    'description' => 'My Item Description',
    'track_id' => '1234567',
    'payer_name' => 'test',
    'payer_email' => 'test@test.com',
    'notify_url' => 'https://www.google.com', //optional, the notify url on your server side
    'success_url' => 'https://www.google.com', //optional,  the redirect url after success payments
    'return_url' => 'https://www.google.com', //optional,  the redirect url after success payments
    'redirect_url' => 'https://www.google.com'
])->send();

if ($response->isRedirect()) :
    $response->redirect();
elseif ($response->isSuccessful()) :
    // only redirect with Payssion
else :
    return print_r($response);
endif;

Validate Payment

$gateway = Omnipay::create('Payssion');

$gateway->initialize(array(
    'apiKey' => '',
    'secretKey' => '',
    'testMode' => true,
));

$response = $gateway->fetchTransaction([
    'order_id' => 1234567,
    'transaction_id' => $_GET['transaction_id']
])->send();

if($response->isSuccessful()){
    $data = $response->getData();
    .....
}

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, or better yet, fork the library and submit a pull request.