laranex / php-myanmar-payments
A framework-agnostic PHP SDK for Myanmar payment gateways with typed requests and results
v4.0.0-alpha.4
2026-10-10 06:58 UTC
Requires
- php: ^8.1
- ext-filter: *
- ext-hash: *
- ext-json: *
- php-http/discovery: ^1.9.1
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.0||^2.0
- psr/simple-cache: ^2.0||^3.0
Requires (Dev)
- guzzlehttp/guzzle: ^7.8
- laravel/pint: ^1.20||^1.29
- pestphp/pest: ^2.36||^3.0||^4.6
- pestphp/pest-plugin-type-coverage: ^2.8.7||^3.0||^4.0
- php-http/mock-client: ^1.6
- phpstan/phpstan: ^1.12.5||^2.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-10 07:05:56 UTC
README
Framework-agnostic PHP SDK for Myanmar payment gateways: KBZ Pay (PWA, QR, In-App), Wave Money, AYA Payment Gateway, Yoma MMQR and CyberSource Secure Acceptance.
Each gateway takes a typed request object and returns a typed result, so your IDE shows exactly what to pass and what comes back.
Using Laravel? Install laranex/laravel-myanmar-payments, which wraps this package.
Documentation: laranex.vercel.app
composer require laranex/php-myanmar-payments
Requires PHP 8.1+ and any PSR-18 HTTP client (for example guzzlehttp/guzzle).
use Laranex\PhpMyanmarPayments\Http\CallbackRequest; use Laranex\PhpMyanmarPayments\KbzPay\KbzPay; use Laranex\PhpMyanmarPayments\KbzPay\KbzPayConfig; use Laranex\PhpMyanmarPayments\KbzPay\KbzPayPaymentData; $kbzPay = new KbzPay(new KbzPayConfig(appId: '...', appKey: '...', merchantCode: '...', sandbox: true)); // Start a payment: a typed result per flow $payment = $kbzPay->pwa(new KbzPayPaymentData(orderId: 'ORDER_1', amount: 1000, callbackUrl: 'https://shop.test/kbz/callback')); header('Location: '.$payment->url); // Handle the callback: verified, with a gateway-independent status $callback = $kbzPay->handleCallback(CallbackRequest::fromGlobals()); if ($callback->isSuccessful()) { // compare $callback->amount with your order, then fulfil $callback->orderId } $callback->acknowledgement()->send();