PHPackages                             gmbfgp/uabpayment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. gmbfgp/uabpayment

ActiveLibrary[Payment Processing](/categories/payments)

gmbfgp/uabpayment
=================

UAB Payment Integration Payment

v2.0.1(10mo ago)08MITPHP

Since Jun 5Pushed 10mo agoCompare

[ Source](https://github.com/GMBF-Group/uab-payment)[ Packagist](https://packagist.org/packages/gmbfgp/uabpayment)[ RSS](/packages/gmbfgp-uabpayment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

💳 UAB Payment Laravel Package
=============================

[](#-uab-payment-laravel-package)

A Laravel package to integrate UAB TransactEase v1.7 Payment Gateway.

---

📑 Table of Contents
-------------------

[](#-table-of-contents)

- [Features](#-features)
- [Installation](#-installation)
- [Configuration](#%EF%B8%8F-configuration)
- [Example Usage](#-example-usage)
- [Methods](#-methods)
- [Security Notes](#-security-notes)
- [License](#-license)
- [Credits](#-credits)

---

✅ Features
----------

[](#-features)

- Generate signed UAB payment form
- Secure callback and redirect signature verification
- Transaction status check
- Token-based login flow
- Designed for Laravel projects

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require gmbfgp/uabpayment
```

⚙️ Configuration
----------------

[](#️-configuration)

1. Publish Config File:

```
php artisan vendor:publish --tag=uabpayment-config
```

2. Add the following to your .env file:

```
UAB_MERCHANT_ID=your_merchant_id
UAB_MERCHANT_CHANNEL=your_channel
UAB_ACCESS_KEY=your_access_key
UAB_SECRET_KEY=your_secret_key
UAB_INS_ID=your_inst_id
UAB_CLIENT_SECRET=your_client_secret
UAB_PAYMENT_METHOD=your_payment_method
UAB_PAYMENT_URL=https://uat-uab.com/
UAB_PAYMENT_CALLBACK_URL=https://uat-uab.com/your-callback
UAB_PAYMENT_SUCCESS_URL=https://uat-uab.com/your-success
UAB_PAYMENT_FAILED_URL=https://uat-uab.com/your-fail
UAB_PAYMENT_EXPIRE=300
```

🚀 Example Usage
---------------

[](#-example-usage)

```
use App\Services\UabPaymentService;

$uab = new UabPaymentService();

$form = $uab->uab(15000, [
        'BillToForename' => 'John',
        'BillToSurname' => 'Depp',
        'BillToPhone' => '9591234567',
        'BillToEmail' => 'test@example.com',
]);

// Blade View

    {!! $form['values'] !!}
    Pay Now

```

🧰 Methods
---------

[](#-methods)

1. ### uab($amount, array $extraFields): array

    [](#uabamount-array-extrafields-array)

- Generates the URL and signed form fields to initiate a UAB payment.

Example:

```
//input
Uabpayment::uab(10000, [
        'BillToForename' => 'John',
        'BillToSurname' => 'Depp',
        'BillToPhone' => '9591234567',
        'BillToEmail' => 'test@example.com',
]);

//output
[
    'url' => 'https://{uab_url}/Payments/Request',
    'values' => [
        "

        ..."
    ]
]
```

2. ### checkCallbackSignature(array $data): bool

    [](#checkcallbacksignaturearray-data-bool)

- Validates the HMAC signature received from UAB in a callback.

Example:

```
//input
$isValid = $uabService->checkCallbackSignature($request);

//output
true or false
```

3. ### checkRedirectSignature(array $data): bool

    [](#checkredirectsignaturearray-data-bool)

- Validates the redirect signature (used in front-end return/cancel URLs).

Example:

```
//input
$isValid = $uabService->checkRedirectSignature('GET', $request->all(), true);

//status meaning
status = true for success, false for failure.
//output
true or false
```

4. ### getSignString(array $fields): string

    [](#getsignstringarray-fields-string)

- Generates the sign string used before hashing, based on sorted key-value pairs.

Example:

```
//input
$signString = Uabpayment::getSignString([
    'amount' => 10000,
    'merchant_id' => 'UAB123456',
    'timestamp' => '20250604140000',
]);

//output
"amount=10000,merchant_id=UAB123456,timestamp=20250604140000"
```

5. ### hashSignature(string $signString): string

    [](#hashsignaturestring-signstring-string)

- Creates an HMAC hash using your app’s secret key.

Example:

```
//input
$signString = "amount=10000,merchant_id=UAB123456,timestamp=20250604140000";
$signature = Uabpayment::hashSignature($signString);

//output
"f3a1a8a6d8b4f5c29e10b02c3d56cabc09ff2f7d"
```

6. ### generateMsgInfo(string $msgType): array

    [](#generatemsginfostring-msgtype-array)

- Generates a standard message information structure for UAB API requests.

```
//input
$info = $uabService->generateMsgInfo('LOGIN');

//output
[
    'VersionNo' => '1.0.0',
    'MsgID'     => 'MUAB1234567890123456000012', // Unique message ID
    'TimeStamp' => '20250605123045',
    'MsgType'   => 'LOGIN',
    'InsID'     => 'UAB123456',
]
```

7. ### getLoginToken(): ?string

    [](#getlogintoken-string)

- Makes an API request to UAB's login endpoint to retrieve an access token using client credentials.

```
//input
$token = $uabService->getLoginToken();

//output
'eyJhbGciOi...dXNzIn0.abc123' or null
```

8. ### getTransactionStatus(string $requestId): ?array

    [](#gettransactionstatusstring-requestid-array)

- Fetches transaction status from UAB by RequestID.

```
//input
$status = $uabService->getTransactionStatus('your_requestId');
```

🔒 Security Notes
----------------

[](#-security-notes)

-Always use checkCallbackSignature() on UAB’s callback endpoint.

-Ensure system time is synced to avoid signature mismatch errors.

-Never expose your secret key or credentials in frontend code.

📝 License
---------

[](#-license)

MIT License — See the LICENSE file for more information.

👨‍💻 Credits
-----------

[](#‍-credits)

Made by Pyae Sone Phyo for GMBF Tech.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance54

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Total

2

Last Release

306d ago

Major Versions

v1.0.0 → v2.0.12025-07-08

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd4f6a38f5cae3e800d31c03d4d97646ccfa5728e548ad6b9ff66afcbe7a1200?d=identicon)[GMBF Group](/maintainers/GMBF%20Group)

---

Top Contributors

[![psone-phyo](https://avatars.githubusercontent.com/u/176220180?v=4)](https://github.com/psone-phyo "psone-phyo (6 commits)")

### Embed Badge

![Health badge](/badges/gmbfgp-uabpayment/health.svg)

```
[![Health](https://phpackages.com/badges/gmbfgp-uabpayment/health.svg)](https://phpackages.com/packages/gmbfgp-uabpayment)
```

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

768.0M9](/packages/chargebee-chargebee-php)[imdhemy/google-play-billing

Google Play Billing

491.3M5](/packages/imdhemy-google-play-billing)[bitpay/sdk

Complete version of the PHP library for the new cryptographically secure BitPay API

42337.5k4](/packages/bitpay-sdk)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
