Search by

koderia-creative-lab / laravel-upperlink

xenabyte

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

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-20 22:33 UTC

This package is auto-updated.

Last update: 2026-11-20 22:41:56 UTC


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