2017 © Pedro Peláez
 

library mnpy-laravel

Laravel wrapper for the PHP API SDK of MNPY.

image

mnpy/mnpy-laravel

Laravel wrapper for the PHP API SDK of MNPY.

  • Sunday, March 18, 2018
  • by mnpy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

MNPY SDK Laravel Wrapper

Laravel 5 wrapper around the MNPY SDK, (*1)

Requirements

  • PHP >= 7.0
  • A MNPY account

Installation

Add the package to the requirements of your composer file., (*2)

composer require mnpy/mnpy-laravel

Add the Service Provider to your config/app.php (not applicable for Laravel 5.5 and higher), (*3)

MNPY\Laravel\MNPYServiceProvider::class

If you wish to use Facades instead of Dependency Injection you should add the following to your config/app.php file., (*4)

'MNPYTransaction' => MNPY\Laravel\Facades\MNPYTransaction::class,
'MNPYPrice' => MNPY\Laravel\Facades\MNPYPrice::class
'MNPYToken' => MNPY\Laravel\Facades\MNPYToken::class

Now publish the config (or add MNPY_API_KEY to your .env file), (*5)

php artisan vendor:publish --provider="MNPY\Laravel\MNPYServiceProvider"

Usage

This package serves as wrapper for mnpy/mnpy-php-api-sdk. Please refer to the original package for documentation regarding usage., (*6)


Depency Injection, (*7)

use MNPY\SDK\Transaction;

class Foo {
    protected $transaction;

    public function __construct(Transaction $transaction) {
        $this->transaction = $transaction;
    }

    public function bar($transaction_id) {
        return $this->transaction->get($transaction_id);
    }
}

Facades, (*8)

use MNPY\Laravel\Facades\MNPYTransaction;

class Foo {
    protected $transaction;

    public function bar($transaction_id) {
        return MNPYTransaction::get($transaction_id);
    }
}

The Versions

18/03 2018

dev-master

9999999-dev

Laravel wrapper for the PHP API SDK of MNPY.

  Sources   Download

The Requires

 

18/03 2018

v0.1.0

0.1.0.0

Laravel wrapper for the PHP API SDK of MNPY.

  Sources   Download

The Requires

 

18/03 2018

dev-release/0.1.0

dev-release/0.1.0

Laravel wrapper for the PHP API SDK of MNPY.

  Sources   Download

The Requires