PHPackages                             aadshalshihry/larahyp - 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. aadshalshihry/larahyp

ActiveLibrary[Payment Processing](/categories/payments)

aadshalshihry/larahyp
=====================

Laravel package for Hyperpay payment gateway in MENA.

0892PHP

Since Mar 11Pushed 3y agoCompare

[ Source](https://github.com/aadshalshihry/larahyp)[ Packagist](https://packagist.org/packages/aadshalshihry/larahyp)[ RSS](/packages/aadshalshihry-larahyp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Laravel Hyperpay](/art/socialcard.png)](/art/socialcard.png)

Laravel HyperPay
================

[](#laravel-hyperpay)

[![tests](https://github.com/aadshalshihry/larahyp/actions/workflows/tests.yml/badge.svg)](https://github.com/aadshalshihry/larahyp/actions/workflows/tests.yml)[![StyleCI Shield](https://camo.githubusercontent.com/063d3abd39df228ba83625be95c08223247299cd2106cdffa2eb30e3f82041cd/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3334373130343730342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/347104704)[![Latest Version on Packagist](https://camo.githubusercontent.com/c3dcd14ba768e97ea7c17422470ebb969739a303f64d6140b4a114c08867c8ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6161647368616c7368696872792f6c6172616879702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aadshalshihry/larahyp)[![Total Downloads](https://camo.githubusercontent.com/17f1984419de18c758f96022ab126b5e171b0185cbb1f7c705f4b729b1b999d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6161647368616c7368696872792f6c6172616879702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aadshalshihry/larahyp)

Laravel HyperPay provides an easy way to handle all the transactions with different states.

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

[](#installation)

You can install the package via composer:

```
composer require aadshalshihry/larahyp
```

Database migration
------------------

[](#database-migration)

`larahyp` provides a migration to handle its own transaction, don't forget to publish the migration after installation

```
php artisan vendor:publish --tag="hyperpay-migrations"
```

Then migrate

```
php artisan migrate
```

This migration has a model named `Transaction`, if your app use [multi-tenancy](https://tenancy.dev/docs/hyn/5.5/installation), you can create a new transaction model based on the `hyperpay transaction` model.

```
use Hyn\Tenancy\Traits\UsesTenantConnection;
use AadshalshihryLaravelHyperpay\Models\Transaction as ModelsTransaction;

class Transaction extends ModelsTransaction
{
    use UsesTenantConnection;
}
```

then don't forget the update the `transaction_model` path in the config file `app/hyperpay.php`

```
