PHPackages                             tabapay/payment - 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. tabapay/payment

ActiveLibrary[Payment Processing](/categories/payments)

tabapay/payment
===============

A flexible payment package for TabaPay integration in Laravel

v1.0.0(1y ago)11PHPPHP &gt;=7.4

Since Mar 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/tabapayco/laravel-tabapay-payment)[ Packagist](https://packagist.org/packages/tabapay/payment)[ RSS](/packages/tabapay-payment/feed)WikiDiscussions stable Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Tabapay Payment Package for Laravel
===================================

[](#tabapay-payment-package-for-laravel)

A flexible payment integration package for TabaPay API in Laravel.

Installation
------------

[](#installation)

1. Install via Composer: composer require tabapay/payment
2. Publish the configuration (optional): php artisan vendor:publish --tag=config
3. Add your merchant code to `.env`: TABAPAY\_MERCHANT\_CODE=your-merchant-code TABAPAY\_SANDBOX=false

Usage
-----

[](#usage)

```
### Create a Transaction

use Tabapay\Payment\Facades\Payment;

$data = [
    'amount' => 10000,
    'callbackURL' => 'https://your-site.com/verify',
    'mobile' => '09123456789', // optional
    'email' => 'user@example.com', // optional
    'name' => null,
    'sms' => 0, // True or False
    'cardNumber' => null,
    'nationalCode' => null,
    'description' => null,
    'additionalData' => null,

];
$response = TabaPay::createTransaction($data);

if ($response['status'] === 'success') {
    return redirect($response['url']);
}

### Verify a Transaction

The `verifyTransaction` method sends a verification request to the TabaPay API and retries up to 3 times if needed. Use it for manual verification after a GET callback. Automatic verification by TabaPay requires separate handling in your controller.

use Tabapay\Payment\Facades\Payment;

public function verifyCallback(Request $request)
{
	if (!empty($request->header('HTTP_AUTHORIZE')) && md5(config('payment.merchant_code')) === $request->header('HTTP_AUTHORIZE')) {
        $responseData = $request->all(); // Data from TabaPay POST
        if ($responseData['status'] === 'success' && $responseData['responseCode'] == 1) {
            // Transaction verified successfully
            return response()->json($responseData);
        }
    }elseif ($request->query('status') === 'success' && $request->query('responseCode') == 1) {
		$token = $request->query('token');
		$amount = $request->query('amount');
        $response = TabaPay::verifyTransaction($token, $amount);
        return response()->json($response);
    }

#Response
	$responseData = array(
		"status" => $responseData['status'] ?? null,
		"responseCode" => $responseData['responseCode'] ?? null,
		"message" => $responseData['message'] ?? null,
		"token" => $responseData['token'] ?? null,
		'trackingCode' => $responseData['trackingCode'] ?? null,
		"shaparakRefNumber" => $responseData['shaparakRefNumber'] ?? null,
		"cardNumber" => $responseData['cardNumber'] ?? null,
		"hashedCardNumber" => $responseData['hashedCardNumber'] ?? null,
		"amount" => $responseData['amount'] ?? null,
		"finalAmount" => $responseData['finalAmount'] ?? null,
		"ip" => $responseData['ip'] ?? null,
		"date" => $responseData['date'] ?? null,
		"additionalData" => !empty($responseData['additionalData']) ? $responseData['additionalData'] : null
	);
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance42

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

484d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/199792816?v=4)[TabaPay](/maintainers/tabapayco)[@tabapayco](https://github.com/tabapayco)

---

Top Contributors

[![tabapayco](https://avatars.githubusercontent.com/u/199792816?v=4)](https://github.com/tabapayco "tabapayco (9 commits)")

### Embed Badge

![Health badge](/badges/tabapay-payment/health.svg)

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

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.6k](/packages/duncanmcclean-statamic-cargo)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[glennraya/xendivel

A Laravel package to easily integrate Xendit payment gateway. It supports credit and debit cards, and e-wallet payments and custom invoices, queued notifications, webhook listeners and more.

442.7k](/packages/glennraya-xendivel)

PHPackages © 2026

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