koderia-creative-lab / laravel-xpresspay
A modern Laravel client and driver for the XpressPay payment gateway.
Package info
github.com/Koderia-Creative-Lab/laravel-xpresspay
pkg:composer/koderia-creative-lab/laravel-xpresspay
v1.0.0
2026-11-30 10:31 UTC
Requires
- php: ^8.1|^8.2|^8.3
- illuminate/http: ^9.0|^10.0|^11.0
- illuminate/support: ^9.0|^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.4
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A modern Laravel client for the XpressPay payment gateway supporting checkout initialization, transaction verification, split payments, metadata parsing, and fee calculation.
Installation
composer require koderia-creative-lab/laravel-xpresspay
Publish configuration:
php artisan vendor:publish --tag="xpresspay-config"
Configuration
Set the following environment variables in .env:
XPRESSPAY_API_KEY=your_public_key XPRESSPAY_MERCHANT_ID=your_merchant_id XPRESSPAY_PAYMENT_URL=https://api.xpresspayonline.com/api/Payments/Initialize XPRESSPAY_VERIFY_URL=https://api.xpresspayonline.com/api/Payments/VerifyPayment XPRESSPAY_REDIRECT_URL=https://your-app.com/payment/callback XPRESSPAY_SPLIT_MODE=false XPRESSPAY_TIMEOUT=30 XPRESSPAY_LOGGING=true
Usage
Initialize a Transaction
use Koderia\XpressPay\Facades\XpressPay; $response = XpressPay::initialize([ 'amount' => '15000', 'transactionId' => 'UNIQUE_TX_REF', 'email' => 'customer@example.com', 'payerName' => 'Ada Lovelace', 'productDescription' => 'Tuition Fee', 'metadata' => ['order_id' => 102], ]); if ($response->isSuccessful()) { return redirect($response->getPaymentUrl()); } $error = $response->getErrorMessage();
Verify a Transaction
use Koderia\XpressPay\Facades\XpressPay; $verification = XpressPay::verify($transactionId); if ($verification->isApproved()) { $amount = $verification->getAmount(); $metadata = $verification->getMetadata(); }
Testing
vendor/bin/phpunit