2017 © Pedro Peláez
 

library epay

Epay API Payment Wrapper

image

escapeboy/epay

Epay API Payment Wrapper

  • Saturday, April 23, 2016
  • by escapeboy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Epay API Payment Wrapper Laravel 5.* Package

Installation

"escapeboy/epay": "1.*"

In config/app.php

Escapeboy\Epay\EpayServiceProvider::class,

```php 'Epay' => Escapeboy\Epay\EpayServiceProvider::class,, (*1)


## Publish config file ```bash php artisan vendor:publish --provider="Escapeboy\Epay\EpayServiceProvider" --tag="config"

--, (*2)

Usage

Edit config/epay.php, (*3)

return [
    'submit_url' => 'https://devep2.datamax.bg/ep2/epay2_demo/', // test submit url
    // 'submit_url' => 'https://www.epay.bg/', // production submit url
    'secret' => REQUIRED, // client secret
    'client_id' => REQUIRED, // client id
    'expire_days' => 1 // expire time for transations in days
    'success_url' => 'epay/success', // return url for success
    'cancel_url' => 'epay/cancel', // return url for cancel
];

Generate hidden input fields to submit to Epay, (*4)

echo \Epay::generateInputFields([
                'invoice' => '000001', // invoice ID
                'amount' => 100, // amount
                'descr' => 'Some info about order' // info about order
]);

Receive epay notification (url is filled in merchant's profile), (*5)

Route::post('epay/notification', function(){

    $notification_data = \Epay::receiveNotification(request()->all());
        /**
        * $notification_data contains array with data:
        *
        *    array (
        *      'invoice' => 'your_order_id',
        *      'status' => 'PAID',
        *      'pay_date' => '20162304154530',
        *      'stan' => '045138',
        *      'bcode' => '045138'
        *    ),
        *
        **/
    return response()->make($notification_data['response']);
});

The Versions

23/04 2016

dev-master

9999999-dev https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

epay

23/04 2016

1.0.4

1.0.4.0 https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

epay

23/04 2016

1.0.5

1.0.5.0 https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

epay

23/04 2016

1.0.2

1.0.2.0 https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

epay

23/04 2016

1.0.3

1.0.3.0 https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

epay

23/04 2016

1.0.1

1.0.1.0 https://github.com/escapeboy/epay

Epay API Payment Wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

bnp