2017 © Pedro Peláez
 

library laravel-walletone

Laravel integration walletone.com

image

pdazcom/laravel-walletone

Laravel integration walletone.com

  • Saturday, March 25, 2017
  • by pdazcom
  • Repository
  • 2 Watchers
  • 2 Stars
  • 167 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 22 % Grown

The README.md

Laravel WalletOne

Latest Version on Packagist ![Software License][ico-license] ![Total Downloads][ico-downloads], (*1)

Implementation of WalletOne payments for laravel 5. There are form of payment and a middleware for processing requests for confirmation of payments from the walletone service. Based on two events - SuccessPayment and FailedPayment., (*2)

Install

Via Composer, (*3)

``` bash $ composer require pdazcom/laravel-walletone, (*4)


Then in config/app.php add service-provider and facade alias:

'providers' => [ ... Pdazcom\LaravelWalletOne\Providers\WalletoneServiceProvider::class, ... ];, (*5)

'aliases' => [ ... 'WalletOne' => Pdazcom\LaravelWalletOne\Facades\WalletOne::class, ... ];, (*6)


## Usage First of all you need to run:

php artisan vendor:publish --provider='Pdazcom\LaravelWalletOne\Providers\WalletoneServiceProvider', (*7)


and then fill `config/wallet-one.php` file. Then you can use `\WalletOne` facade. To add options use `\WalletOne::addWalletOptions($options)`

$options = [ 'WMI_DESCRIPTION' => 'Pay for account balance', 'WMI_PAYMENT_AMOUNT' => 100, ];, (*8)

\WalletOne::addWalletOptions($options), (*9)


To get fields for payment form use `\WalletOne::getFields()`. And send it to your view: ```$xslt $fields = \WalletOne::getFields()

To include payment form to your page just include it to view:, (*10)

@include('wallet-one:form', $fields)

To process requests of WalletOne payment notifications just create listeners of two events: Pdazcom\LaravelWalletOne\Events\FailedPayment and Pdazcom\LaravelWalletOne\Events\SuccessPayment, (*11)

// FailedPaymentListener
public function handle(FailedPayment $event)
{
    $postData = $event->postData;
    $exception = $event->exception
}

``` // SuccessPaymentListener public function handle(SuccessPayment $event) { $postData = $event->postData; }, (*12)


## Testing ``` bash $ composer test

Security

If you discover any security related issues, please email kostya.dn@gmail.com instead of using the issue tracker., (*13)

Credits

License

The MIT License (MIT). Please see License File for more information., (*14)

The Versions

25/03 2017

dev-master

9999999-dev http://github.com/pdazcom/laravel-walletone

Laravel integration walletone.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin A.

25/03 2017

1.0.1

1.0.1.0 http://github.com/pdazcom/laravel-walletone

Laravel integration walletone.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin A.

25/03 2017

dev-dev

dev-dev http://github.com/pdazcom/laravel-walletone

Laravel integration walletone.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin A.

25/03 2017

1.0

1.0.0.0 http://github.com/pdazcom/laravel-walletone

Laravel integration walletone.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Konstantin A.