Download the PHP package laranex/php-myanmar-payments without Composer
On this page you can find all versions of the php package laranex/php-myanmar-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laranex/php-myanmar-payments
More information about laranex/php-myanmar-payments
Files in laranex/php-myanmar-payments
Package php-myanmar-payments
Short Description PHP SDK for Myanmar payment gateways: KBZ Pay, Wave Money, AYA Pay, Yoma MMQR and CyberSource. Framework-agnostic, typed requests and results, works with any PSR-18 HTTP client.
License MIT
Homepage https://laranex.vercel.app/php-myanmar-payments
Informations about the package php-myanmar-payments
PHP Myanmar Payments
PHP SDK for Myanmar payment gateways: KBZ Pay, Wave Money, AYA Pay, Yoma MMQR and CyberSource. Typed requests and results, exact amounts, works with any PSR-18 HTTP client. Built for humans and AI agents.
Every Myanmar payment gateway signs its requests and callbacks its own way, reports its own status codes and has its own rules for amounts. PHP Myanmar Payments handles all of that behind one typed API for plain PHP and any framework: build the payment data, start the payment, then verify the callback the gateway sends back.
Why PHP Myanmar Payments
- Five gateways, one pattern. KBZ Pay (PWA, QR and in-app), Wave Money, AYA Pay, Yoma MMQR and CyberSource, each with its own class and the same three steps.
- One typed result per flow.
RedirectPayment,FormPayment,QrPaymentorAppPaymentholds exactly what the next step needs: a URL to redirect to, an auto-submitting form, a QR code or the signed order for the KBZ Pay mobile SDK. See Payment Flows. - Exact amounts, checked against each gateway's rules. Amounts are kept as decimal text and never pass through a float. Decimals, currency and limits follow each gateway's official documentation and are checked before any request is sent. See Amounts.
- Verified callbacks.
handleCallback()checks the gateway's signature without a network call, maps its status onto onePaymentStatusenum and gives you the acknowledgement the gateway expects. When a callback is late, ask KBZ Pay, AYA Pay or Yoma MMQR withstatus(). See Callbacks & Status. - Errors that say what went wrong. A missing setting, an invalid field, a gateway error and a bad signature each throw their own exception, with a message that names the setting, the field or the gateway's code.
- Any PSR-18 client, any PSR-16 cache. The HTTP client is discovered automatically (Guzzle, Symfony HttpClient, …) or passed in, and Yoma MMQR tokens go in the cache you choose. Use it in plain PHP, Symfony, Slim or any PSR-15 framework; Laravel apps use Laravel Myanmar Payments, which wraps this package.
- Same behavior in every language. The PHP, Go, Node.js and Python SDKs pass one shared set of test vectors for signing and callback verification, and read the same environment variables, so one
.envfile and one Yoma MMQR token cache serve them all. - Nothing stored for you. The package keeps no tables and no webhook log. Handling Webhooks shows the recommended flow as code you copy: verify, store, acknowledge, then process each call once.
- Easy to test. Every gateway call goes through the client you pass, so your tests fake the responses, replay signed callbacks and never touch the network. See Testing.
Installation
Requires PHP 8.1+ and any PSR-18 HTTP client, which sends the gateway requests.
Documentation
The full documentation lives at laranex.vercel.app/php-myanmar-payments:
- Introduction: why the package exists and what it covers
- Installation: requirements, install command and a quick start
- AI Agent Skill: the skill that teaches coding agents to use the package
- Configuration: credentials, environment variables, endpoints, UAT, HTTP client and token cache
- Amounts: exact amounts and each gateway's amount rules
- Payment Flows: redirect, form, QR and in-app payments
- Callbacks & Status: verified callbacks, payment statuses and status checks
- Handling Webhooks: the recommended verify, store, acknowledge, process-once flow
- Framework Integration: Symfony, Slim and any PSR-7 / PSR-15 framework
- Testing: faking gateway calls and replaying signed callbacks in your tests
- KBZ Pay: PWA redirect, QR and in-app payments, status checks and callbacks
- Wave Money: redirect payments with line items and verified callbacks
- AYA Pay: hosted checkout for AYA Pay, other wallets and cards, with status checks
- Yoma MMQR: QR images, QR renewal, status checks and verified callbacks
- CyberSource: Secure Acceptance card payments through a signed hosted checkout form
- Results: every property of the payment result types
- PaymentCallback & Status: callbacks, status results, acknowledgements and the PaymentStatus values
- Errors: validation, API, signature and configuration errors
License
MIT. See LICENSE.
All versions of php-myanmar-payments with dependencies
ext-filter Version *
ext-hash Version *
ext-json Version *
php-http/discovery Version ^1.9.1
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.0||^2.0
psr/simple-cache Version ^2.0||^3.0