PHPackages                             hesham.tarek/ibtdi-myfatoorah - 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. hesham.tarek/ibtdi-myfatoorah

ActiveLibrary

hesham.tarek/ibtdi-myfatoorah
=============================

ibtdi myfatoorah integration apis

14PHP

Since Sep 19Pushed 3y ago1 watchersCompare

[ Source](https://github.com/HishamTarek74/HishamTarek74-IbtdiMyFatoorah)[ Packagist](https://packagist.org/packages/hesham.tarek/ibtdi-myfatoorah)[ RSS](/packages/heshamtarek-ibtdi-myfatoorah/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Myfatoorah
==================

[](#laravel-myfatoorah)

laravel myfatoorah is a php package written by [Hisham Tarek](https://github.com/HishamTarek74) with laravel to handle myfatoorah functionality by making it's api more easy .

Features
--------

[](#features)

- Creating invoices
- Returning payments
- Check that payment is success or not
- Change the token on the fly

Installation Guide
==================

[](#installation-guide)

At laravel project install package using composer

```
composer require hesham.tarek/ibtdi-myfatoorah

```

The package is compatible with laravel ^6.0|^7.0|^8.0|^9.0 so you don't need to set providers or aliases for the package

Configuration
-------------

[](#configuration)

To publish config run

```
php artisan vendor:publish --provider="HishamTarek\IbtdiMyFatoorah\IbtdiMyFatoorahServiceProvider"

```

and modify the config file with your own information. File is located in `/config/ibtdimyfatoorah.php`

Get Your Credentials From Myfatoorah
------------------------------------

[](#get-your-credentials-from-myfatoorah)

- Go to [My fatorah](https://www.myfatoorah.com/)
- You will get access token
- Go to your .env file and paste your credentials to be like this

```
IBTDI_MYFATOORAH_MODE=test
IBTDI_MYFATOORAH_TOKEN=token

```

or you can add it using `setAccessToken($token?)->setMode($mode?)`

You are now ready to use the package

### Test cards page

[](#test-cards-page)

You can get test cards from [DOCS](https://myfatoorah.readme.io/docs/test-cards)

### Usage examples

[](#usage-examples)

Create payment page

```
Route::get('payment', [\App\Http\Controllers\MyFatoorahController::class, 'index']);
Route::get('payment/callback', [\App\Http\Controllers\MyFatoorahController::class, 'callback']);
Route::get('payment/error', [\App\Http\Controllers\MyFatoorahController::class, 'error']);

```

At the controller, you can get the data from payment page at [DOCS](https://myfatoorah.readme.io/docs)

```
use HishamTarek\IbtdiMyFatoorah\Facades\IbtdiMyFatoorah;

public function index() {
     $data = [
       'CustomerName' => 'New user',
       'NotificationOption' => 'all',
       'MobileCountryCode' => '+966',
       'CustomerMobile' => '0000000000',
       'DisplayCurrencyIso' => 'SAR',
       'CustomerEmail' => 'test@test.test',
       'InvoiceValue' => '100',
       'Language' => 'en',
       'CallBackUrl' => 'https://yourdomain.test/callback',
       'ErrorUrl' => 'https://yourdomain.test/error',
   ];

// If you want to set the credentials and the mode manually.
//    $myfatoorah = IbtdiMyFatoorah::setAccessToken($token)->setMode('test')->createInvoice($data);

// And this one if you need to access token from config
   $myfatoorah = IbtdiMyFatoorah::createInvoice($data);

 // when you got a response from myFatoorah API, you can redirect the user to the myfatoorah portal
 return response()->json($myfatoorah);
}

```

Get callback to check if success payment
----------------------------------------

[](#get-callback-to-check-if-success-payment)

```
public function callback(Request $request) {
   $myfatoorah = IbtdiMyFatoorah::payment($request->paymentId);

   // It will check that payment is success or not
   // return response()->json($myfatoorah->isSuccess());

   // It will return payment response with all data
   return response()->json($myfatoorah->get());
}

```

Authors
-------

[](#authors)

- [Hisham Tarek](https://github.com/HishamTarek74)

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

Note
----

[](#note)

- If yo have any questions, issues or PRs feel free to contact me.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fc680565ff8b2598a5d01d29c7bd455541dce387cc2a0a1e32f5ba45cff793d?d=identicon)[HishamTarek74](/maintainers/HishamTarek74)

---

Top Contributors

[![HishamTarek74](https://avatars.githubusercontent.com/u/64424586?v=4)](https://github.com/HishamTarek74 "HishamTarek74 (7 commits)")

### Embed Badge

![Health badge](/badges/heshamtarek-ibtdi-myfatoorah/health.svg)

```
[![Health](https://phpackages.com/badges/heshamtarek-ibtdi-myfatoorah/health.svg)](https://phpackages.com/packages/heshamtarek-ibtdi-myfatoorah)
```

PHPackages © 2026

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