2017 © Pedro Peláez
 

library omnipay-epay

Epay Bg gateway for Omnipay payment processing library

image

gentor/omnipay-epay

Epay Bg gateway for Omnipay payment processing library

  • Friday, June 1, 2018
  • by gentor
  • Repository
  • 1 Watchers
  • 0 Stars
  • 618 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 27 % Grown

The README.md

Omnipay: Epay

ePay.bg 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 run:, (*3)

composer require gentor/omnipay-epay

The following gateways are provided by this package:

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

Basic Usage

Purchase

use Omnipay\Omnipay;

$provider = Epay; # Or Easypay
$gateway = Omnipay::create($provider);
$gateway->setMin('Epay Merchant Id');
$gateway->setSignature('Epay Signature');

$response = $gateway->purchase(
    [
        'amount' => '10.00', // BGN
        'transactionId' => 'Unique ID in your system',
        'returnUrl' => 'your.site.com/return',
        'cancelUrl' => 'your.site.com/cancel',
    ]
)->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();
}

Webhook

  • Listener for payment status
//Use only epay gateway
$gateway = Omnipay::create('Epay');
$gateway->setMin('Epay Merchant Id');
$gateway->setSignature('Epay Signature');

$response = $gateway->acceptNotification()->send();

if ($response->isSuccessful()) {
    $status = $response->getTransactionStatus();
    // Response is required for epay gateway to stop sending data
    echo $response->getData()['notify_text'];
} else {
    // Response is required for epay gateway to stop sending data
    echo $response->getData()['notify_text'];
}

ePay.bg Documentation

The Versions

01/06 2018

dev-master

9999999-dev https://github.com/gentor/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