Search by

koderia-creative-lab / laravel-xpresspay

xenabyte

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

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-30 10:31 UTC

This package is auto-updated.

Last update: 2026-11-30 10:36:11 UTC


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