mnpy / mnpy-laravel
Laravel wrapper for the PHP API SDK of MNPY.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/mnpy/mnpy-laravel
Requires
- php: >=7.0
- mnpy/mnpy-php-api-sdk: v0.1.0
This package is not auto-updated.
Last update: 2025-10-26 10:52:37 UTC
README
Laravel 5 wrapper around the MNPY SDK
Requirements
- PHP >= 7.0
- A MNPY account
Installation
Add the package to the requirements of your composer file.
composer require mnpy/mnpy-laravel
Add the Service Provider to your config/app.php (not applicable for Laravel 5.5 and higher)
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.
'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)
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.
Depency Injection
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
use MNPY\Laravel\Facades\MNPYTransaction; class Foo { protected $transaction; public function bar($transaction_id) { return MNPYTransaction::get($transaction_id); } }