2017 © Pedro Peláez
 

library epay

Epay Bg gateway for Omnipay payment processing library

image

omnipay/epay

Epay Bg gateway for Omnipay payment processing library

  • Tuesday, September 13, 2016
  • by vanssata
  • Repository
  • 1 Watchers
  • 0 Stars
  • 83 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Omnipay: Epay

Epay driver 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 Epay, EasyPay Bpay and more Bugarian online payment providers support for Omnipay., (*2)

Installation

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

{
    "require": {
        //...
        "omnipay/epay": "1.2.*@dev",
    }
}

And run composer to update your dependencies:, (*4)

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

The following gateways are provided by this package:

  • Epay (Epay Chekcout)
  • EasyPay (EasyPay check out provider)

For general usage instructions, please see the main Omnipay repository., (*5)

BASIC USAGE

SEND DATA TO GATEWAY

use Omnipay\Omnipay;
$method = Epay; # Or Easypay 
$gateway = Omnipay::create($method);
$gateway->setSignature('EapyKey');
$gateway->setMin('Eapy user');
$gateway->setReturnUrl('ecample.com/{successful}'); ##retunr url after success pay
$gateway->setCancelUrl('ecample.com/{reject}'); ##return url after recject pay
//For demo pack 
$gateway->setTestMode(true);
//To generate transactionId/invoce we need basic function
$invoce = substr(number_format(time() * rand(), 0, '', ''), 0, 10);
$params =  $params = [
            'amount'        => $amount,
            'transactionId' => $invoice,
            'currency'      => $currency,
        ];
$response = $gateway->purchase($params)->send();

if ($response->isSuccessful()) {
    // only EasyPay get IDN 
    echo($response->getRedirectData()); 
} elseif ($response->isRedirect()) {
    // redirect to epay payment gateway
    $response->redirect();
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}

EPAY LISTENER

  • Listener for return payment status
//Use only epay gateway
$gateway  = $gateway = Omnipay::create('epay');
$response = $gateway->capture($_POST)->send();
if ($response['invoice']) {
    if (isset($response['notify_text'])) {
        //This is requere to stop epay gateway sends data 
        //Status of pyments is $response['status']; 
        //
        echo $response['notify_text'];
    }
}

EPAY BG

EPAY BG DOCUMENTATION, (*6)

TODO

  • Add funtion for expire data
  • Add function for add description
  • Add for more property

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

The Versions

13/09 2016

dev-master

9999999-dev https://github.com/vanssata/omnipay-epay

Epay Bg gateway for Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ivan kakurov

payment pay gateway merchant purchase omnipay epay bg easypay bg