koderia-creative-lab / laravel-upperlink
A modern Laravel client and driver for the Upperlink (PayChoice / Paygate) payment gateway.
Package info
github.com/Koderia-Creative-Lab/laravel-upperlink
pkg:composer/koderia-creative-lab/laravel-upperlink
v1.0.0
2026-11-20 22:33 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 Laravel package for integrating Upperlink Paygate payment services, supporting transaction initialization, checkout redirection, re-query verification, split settlements, and fee computation.
Installation
composer require koderia-creative-lab/laravel-upperlink
Publish configuration:
php artisan vendor:publish --tag="upperlink-config"
Configuration
Set the following environment variables in .env:
UPPERLINK_CHECKOUT_URL=https://paygate.upperlink.ng/paygate/checkout UPPERLINK_REQUERY_URL=https://paygate.upperlink.ng/paygate/requery UPPERLINK_CHECKOUT_USERNAME=your_username UPPERLINK_CHECKOUT_PASSWORD=your_password UPPERLINK_REF=your_merchant_id UPPERLINK_REDIRECT_URL=https://your-app.com/payment/callback UPPERLINK_SPLIT_MODE=false UPPERLINK_SPLIT_CODE=your_split_code UPPERLINK_CONVENIENCE_FEE=10000 UPPERLINK_TIMEOUT=30 UPPERLINK_LOGGING=true
Usage
Initializing a Payment
use Koderia\Upperlink\Facades\Upperlink; $response = Upperlink::initialize([ 'amount' => 15000, // Amount in Naira 'payGateRef' => 'UNIQUE_TX_REFERENCE', 'email' => 'customer@example.com', 'phone' => '08012345678', 'firstName' => 'Ada', 'lastName' => 'Lovelace', 'meta' => ['order_id' => 102], ]); if ($response->isSuccessful()) { // Redirect customer to Upperlink checkout return redirect($response->getCheckoutUrl()); } $error = $response->getErrorMessage();
Verifying a Transaction
use Koderia\Upperlink\Facades\Upperlink; $verification = Upperlink::verify($reference); if ($verification->isApproved()) { $amount = $verification->getAmount(); $meta = $verification->getMeta(); }
Calculating Payable Total (1.5% Cap + Convenience Fee)
use Koderia\Upperlink\Facades\Upperlink; // Input base amount in Kobo (e.g., ₦10,000 = 1,000,000 kobo) $totalKobo = Upperlink::calculatePayableAmount(1000000);
Testing
vendor/bin/phpunit