Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 2.36 KB

README.md

File metadata and controls

65 lines (54 loc) · 2.36 KB

The Payment Gateway Integration For Laravel

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

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. Larapay

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();