Download the PHP package crushjs/aba-payway without Composer
On this page you can find all versions of the php package crushjs/aba-payway. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package aba-payway
ABA PayWay for Laravel
Pay as You Wish in Cambodia. A Laravel package for the ABA PayWay payment gateway. It covers every API in the PayWay developer docs:
- Checkout: cards, ABA Pay, KHQR, WeChat, Alipay and Google Pay
- Transactions: status, details, lists, closing a transaction, exchange rates
- Money back: refunds, plus completing and cancelling pre-authorisations
- ABA QR API: KHQR codes for your own UI
- Payment links
- Payouts: and the beneficiary whitelist
- Credentials on file: saving ABA accounts and cards, charging a saved token, and subscriptions
This is a community package. It isn't made by or affiliated with ABA Bank.
Installation
Laravel finds the service provider and the PayWay facade on its own. To publish the config file:
Add the credentials ABA sent you to .env. Sandbox and production use different keys:
PayWay only accepts API calls from domains and IPs it has whitelisted. Ask the PayWay integration team to add yours, or every call fails with 6: wrong domain.
Responses
Every API call returns a Crushjs\AbaPayway\Response:
The package sets req_time/request_time and merchant_id, computes the hash, and does the base64 and RSA encoding each endpoint requires. You pass plain values: arrays for items, custom_fields, payout and return_deeplink, and plain URLs for return_url and callback_url. A failed HTTP request throws Crushjs\AbaPayway\Exceptions\PayWayException.
Checkout
1. Build the signed form (controller)
PayWay::purchaseFields([...]) returns the signed fields as an array if you'd rather build the form yourself. PayWay::checkoutUrl() returns the URL the form posts to.
2. Open the PayWay sheet (Blade)
To show the QR or deeplink in your own UI instead, call PayWay from the server. This works with abapay_khqr_deeplink:
3. Confirm the payment (callback)
PayWay POSTs to your return_url once the payment finishes. The posted body can't be verified, so ask PayWay for the real status:
PayWay doesn't send a CSRF token, so exclude this route from CSRF checks in bootstrap/app.php:
Transactions
Refunds and pre-auth
These calls need PAYWAY_RSA_PUBLIC_KEY.
ABA QR API
Payment links
These calls need PAYWAY_RSA_PUBLIC_KEY.
Payouts
These calls need PAYWAY_RSA_PUBLIC_KEY.
Credentials on file
PayWay has to enable the token flags you need on your merchant profile first. Until it does, these calls answer 104: Merchant not enabled token flag.
Subscriptions (scheduled payments) start with a normal checkout that carries the token fields:
Without Laravel
Testing
License
MIT
All versions of aba-payway with dependencies
ext-curl Version *
ext-json Version *
illuminate/support Version ^10.0|^11.0|^12.0|^13.0