Download the PHP package rielpays/laravel without Composer
On this page you can find all versions of the php package rielpays/laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel
RielPay for Laravel
Official Laravel SDK for RielPay — accept KHQR payments from ABA, ACLEDA, Wing and every Bakong bank in Cambodia. Money settles straight to your own ABA account.
- One call creates a payment with a KHQR, an ABA Mobile deeplink and a hosted checkout page
- Webhooks verified for you and turned into Laravel events
- Safe automatic retries (idempotency keys), clear exceptions, a ready-made KHQR Blade component
Requires PHP 8.1+ and Laravel 10, 11, 12 or 13.
Installation
Then run the installer — it shows the RielPay logo, publishes the config, asks for your keys (hidden while
typing), saves them to .env and tests the connection:
Check your setup at any time with php artisan rielpay:check.
Or add your keys to .env yourself (Dashboard → Stores → your store):
Optionally publish the config: php artisan vendor:publish --tag=rielpay-config.
Create a payment
Or show the KHQR on your own page:
It renders the red KHQR card with the QR, the amount and — on phones — an Open in ABA Mobile button.
$payment exposes every field of the API (id, status, amount, currency, qr_string, deeplink,
checkout_url, metadata, …) plus helpers: isPaid(), isPending(), isExpired(), metadata('order_id'),
amountValue(), paidAt(), expiresAt().
Confirm payment with webhooks
The package registers POST /rielpay/webhook. In the dashboard set your store's webhook URL to
https://your-shop.com/rielpay/webhook. Signatures are verified (with replay protection) and duplicate
deliveries are ignored. Listen for the events:
| Event | When |
|---|---|
PaymentSucceeded |
The customer paid — fulfil the order here |
PaymentExpired |
The QR expired unpaid |
PaymentFailed |
The payment failed |
PaymentCreated |
A payment was created |
WebhookReceived |
Every verified webhook, including the dashboard's "Send test" |
Always fulfil orders from the webhook, not from the redirect — customers can close the browser before being redirected. If a listener throws, the endpoint returns 500 and RielPay retries later.
Want your own route? Set RIELPAY_WEBHOOK_PATH=null and verify manually:
Other calls
Errors
Every API error throws a subclass of RielPay\Laravel\Exceptions\RielPayException with ->errorCode,
->httpStatus and ->details:
| Exception | Meaning |
|---|---|
AuthenticationException |
Wrong/revoked key (401) or suspended account (403) |
PlanException |
trial_ended, plan_expired or plan_limit (402) — renew in the dashboard |
CurrencyMismatchException |
The store's ABA link charges in the other currency |
InvalidRequestException |
Invalid parameters (400/409/422) |
NotFoundException |
Unknown payment (404) |
ServiceUnavailableException / ApiConnectionException |
Temporary problem — retried automatically (2×) |
Test mode
Stores start in test mode: payments get a demo QR and the hosted checkout shows a Simulate payment
button, which fires the real payment.succeeded webhook. Switch the store to Live when you're ready.
ភាសាខ្មែរ — ការណែនាំខ្លី
- ដំឡើង៖
composer require rielpays/laravelហើយរត់php artisan rielpay:install - ដាក់
RIELPAY_API_KEYនិងRIELPAY_WEBHOOK_SECRETក្នុង.env(យកពី Dashboard → Stores) - បង្កើត Payment៖
RielPay::createPayment([...])ហើយ Redirect ទៅ$payment->checkout_urlឬបង្ហាញ QR ក្នុងទំព័ររបស់អ្នក៖<x-rielpay-khqr :payment="$payment" /> - ដាក់ Webhook URL
https://your-shop.com/rielpay/webhookក្នុង Dashboard ហើយស្ដាប់ EventPaymentSucceededដើម្បីបញ្ជាក់ការបញ្ជាទិញ (Signature ត្រូវបាន Verify ដោយស្វ័យប្រវត្តិ) - ប្រើ
idempotencyKey(ឧ.order-1024) ដើម្បីកុំឲ្យបង់ប្រាក់ពីរដង
ឯកសារ API ពេញ៖ https://rielpays.com/docs · Telegram៖ @RielPay2bot
License
MIT
All versions of laravel with dependencies
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0