hak/gateway-myanmar

Myanmar payment gateway integration package

v1.1.1 2023-07-01 12:38 UTC

This package is auto-updated.

Last update: 2024-04-14 11:31:25 UTC


README

Testing

Installation

composer require hak/gateway-myanmar

Usage

use Illuminate\Http\Request;
use Hak\GatewayMyanmar\Facades\Gateway;

public function store(Request $request)
{
    // Request for paymentToken and Redirect Url
    $token = Gateway::process([
        'amount' => $request->amount,
        'invoice_no' => time(), 
        'description' => $request->description,
        'name' => $request->name,
        'email' => $request->email
    ]);

    return $token; // that will return array of webPaymentUrl, paymentToken, respCode, respDesc 

    // Request for paymentInquiry
    $inquiry = Gateway::complete([
        'invoice_no' => 1684666236,
    ]);

    return $inquiry; // that will return as an array of payment inquiry data
}

Publish config file

php artisan vendor:publish --provider="Hak\GatewayMyanmar\GatewayServiceProvider" --tag="gateway"

ENVIROMENT VARIABLES

You can get config variables from developer.2c2p.com