PHPackages                             vmdevelopment/myfatoorah-laravel - 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. [API Development](/categories/api)
4. /
5. vmdevelopment/myfatoorah-laravel

ActiveLibrary[API Development](/categories/api)

vmdevelopment/myfatoorah-laravel
================================

Myfathoorah REST API package

1.0.0.x-dev(7y ago)61447[2 issues](https://github.com/vmdevelopment/myfatoorah-laravel/issues)[2 PRs](https://github.com/vmdevelopment/myfatoorah-laravel/pulls)MITPHPPHP ^7.1

Since Jan 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vmdevelopment/myfatoorah-laravel)[ Packagist](https://packagist.org/packages/vmdevelopment/myfatoorah-laravel)[ RSS](/packages/vmdevelopment-myfatoorah-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Package for Myfatoorah Payment Gateway REST API
=======================================================

[](#laravel-package-for-myfatoorah-payment-gateway-rest-api)

Myfatoorah Payment Gateway for Laravel 5\*

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

[](#installation)

Add `vmdevelopment/myfatoorah-laravel` to your `composer.json`.

```
"vmdevelopment/myfatoorah-laravel": "~1.0.*"

```

Run `composer update` to pull down the latest version of package.

OR simply run

```
composer require "vmdevelopment/myfatoorah-laravel"

```

Now open up `/config/app.php` and add the service provider to your `providers` array.

```
'providers' => [
	VMdevelopment\MyFatoorah\MyFatoorahServiceProfider::class,
]
```

Now add the alias.

```
'aliases' => [
	'MyFatoorah' => VMdevelopment\MyFatoorah\Facade\MyFatoorah::class,
]
```

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

[](#configuration)

To publish config run

```
php artisan vendor:publish --provider="VMdevelopment\MyFatoorah\MyFatoorahServiceProfider"

```

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

you can use this environment variables in your `.env` file

```
MYFATOORAH_MODE=test
MYFATOORAH_USERNAME=username
MYFATOORAH_PASSWORD=secret

```

Current version Functions
-------------------------

[](#current-version-functions)

- `Myfatoorah::requestAccessToken()` - Authorizing with your `username` and `password` and returns `AccessToken`
- `Myfatoorah::createApiInvoiceIso()` - Creating an ApiInvoice
- `Myfatoorah::findInvoice($id)` - Finding an ApiInvoice by ID
- `Myfatoorah::setAccessToken($token)` - Setting Run time `AccessToken`

Usage example
-------------

[](#usage-example)

### Requesting `AccessToken`

[](#requesting-accesstoken)

```
public function auth(  )
{
	try{

		$token = MyFatoorah::requestAccessToken();

	} catch( \Exception $exception ){
		// your handling of request failure
	}
	$token->isExpired() // check if token is expired
	$token->getToken()  // get token
}
```

### Creating ApiInvoice(make payment)

[](#creating-apiinvoicemake-payment)

```
public function pay()
{
	try{

		$payment = MyFatoorah::createApiInvoiceIso();

		$payment->setCustomerName( "John Doe" );

		$payment->setDisplayCurrencyIsoAlpha( "KWD" );

		$payment->setCountryCodeId( 1 );

		$payment->setCallBackUrl( "http://example.com/success" );

		$payment->setErrorUrl( "http://example.com/error" );

		$payment->addProduct( "test product", 10, 5 );

		$payment->make();

	} catch( \Exception $exception ){
		// your handling of request failure
	}

    	$payment->isSuccess() // check if MyFatoorah has successfully handled request.
}
```

### Find ApiInvoice `AccessToken`

[](#find-apiinvoice-accesstoken)

```
public function check( $id )
{
	try{

		 $invoice = MyFatoorah::findInvoice( $id );

	 } catch( \Exception $exception ){
		// your handling of request failure
	}
	$invoice->isPaid(); // check if invoice is paid
	$invoice->isUnpaid(); // check if invoice is unpaid
	$invoice->isFailed(); // check if invoice is failed
}
```

Available functions for found invoices

```
getInvoiceId()
getInvoiceReference()
getCreatedDate()
getExpireDate()
getInvoiceValue()
getComments()
getCustomerName()
getCustomerMobile()
getCustomerEmail()
getTransactionDate()
getPaymentGateway()
getReferenceId()
getTrackId()
getTransactionId()
getPaymentId()
getAuthorizationId()
getOrderId()
getInvoiceItems()
getTransactionStatus()
getError()
getPaidCurrency()
getPaidCurrencyValue()
getTransationValue()
getCustomerServiceCharge()
getDueValue()
getCurrency()
getApiCustomFileds()
getInvoiceDisplayValue()

```

You are able also set access token in run-time

```
public function check( $id )
{
	try{
		MyFatoorah::setAccessToken([
			"access_token" => "your token here",
			".expires" => "Tue, 21 Jan 2020 12:02:10 GMT",
		]);

		// your code goes here...

	 } catch( \Exception $exception ){
		// your handling of request failure
	}
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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

2664d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca86851c8ced859819ba7836b739dfa0d90cdb17613ee4e96711faba58e20de6?d=identicon)[vanandmkrtchyan](/maintainers/vanandmkrtchyan)

---

Top Contributors

[![vanandmkrtchyan](https://avatars.githubusercontent.com/u/10657871?v=4)](https://github.com/vanandmkrtchyan "vanandmkrtchyan (15 commits)")

### Embed Badge

![Health badge](/badges/vmdevelopment-myfatoorah-laravel/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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