nusagates / larapay
Laravel helper for iPaymu integration
Requires
- guzzlehttp/guzzle: ^7.8
This package is auto-updated.
Last update: 2025-04-23 12:58:28 UTC
README
Laravel package for easy integration with payment gateways. Developed using the Laravel 11 environment.
WARNING This package is still in development and may contain bugs. Please use it at your own risk.
Api Payment Gateway Used
Installation
The best way to use this package is using composer
composer require nusagates/larapay=dev-master
Then copy config file from vendor to your project config with simple run command bellow:
php artisan vendor:publish --tag=larapay-config
Requirement
Create an account on iPaymu and then get va Number and API Key from dashboard.
Config
From your project at config/larapay.php
, set virtual account and api key corresponds to your iPaymu account at dashboard.
return [ 'va' => env('LARAPAY_VA', '000000XXXXXXXXXX'), 'api_key' => env('LARAPAY_API_KEY', 'SANDBOXXXX-XXXX-XXX'), 'mode' => env('LARAPAY_MODE', 'sandbox'), // sandbox | production ... ];
Logging
Larapay allows saving request data to your log file. To enable this, simply set LARAPAY_LOG=true
.
Every time a request is made to an API, the request data payload will be saved.
Usage
With simple put class of iPaymu to your method of controller.
use Nusagates\Larapay\Vendors\iPaymu\Ipaymu; public function index(Ipaymu $iPaymu) { return $iPaymu->getBalance(); }
or fluently
use Nusagates\Larapay\Facades\Ipaymu; Ipaymu::getBalance();
Retrieve Balance Information
$iPaymu->getBalance();
Retrieve Transaction History
$iPaymu->getHistory();