hak / gateway-myanmar
Myanmar payment gateway integration package
v1.1.1
2023-07-01 12:38 UTC
Requires
- firebase/php-jwt: ^6.5
- guzzlehttp/guzzle: ^7.6
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^8.5
- pestphp/pest: ^2.6
- pestphp/pest-plugin-laravel: ^2.0
README
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
- MERCHANT_ID // JT02
- SECRET_KEY // SHA256 key
- BASE_URL // https://sandbox-pgw.2c2p.com/payment/4.1/ for ( Sandbox )
- RESULT_URL_1 // https://example.com/fronend-result-url
- RESULT_URL_2 // https://example.com/backend-result-url