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

ActiveLibrary[Payment Processing](/categories/payments)

alsharie/floosak-payment
========================

Floosak payment gateway

2.2.1(2y ago)161179MITPHPPHP &gt;=7.4

Since Nov 6Pushed 2y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (2)Versions (7)Used By (0)

floosak-payment
===============

[](#floosak-payment)

[![img.png](img.png)](img.png)

laravel package for floosak payment getway

Floosak payment api after update to (p2mcl)

install the package `composer require alsharie/floosak-payment`

You can publish using the following command

`php artisan vendor:publish --provider="Alsharie\FloosakPayment\FloosakServiceProvider"`

When published, the `config/floosak.php` config file contains:

```
return [
    'auth' => [
        'phone' => env('FLOOSAK_MERCHANT_PHONE'),
        'short_code' => env('FLOOSAK_MERCHANT_SHORT_CODE'),
        'wallet_id' => env('FLOOSAK_MERCHANT_WALLET_ID'),
        'key' => env('FLOOSAK_MERCHANT_KEY'),
    ],
    'url' => [
        'base' => env('FLOOSAK_BASE_URL', 'https://staging.fintech-expert.net'),
    ]
];
```

***If you don't have the request\_id and key you must do the following:***

### 1. get request Id

[](#1-get-request-id)

```
 $floosak = new Floosak();
 $response = $floosak->requestKey();

 if ($response->isSuccess()) {
    $request_id = $response->getRequestId();
    ....
    ....
 }

```

### 2. verify request Id

[](#2-verify-request-id)

after getting the response ***YOU MUST*** store `key`,`request_id` in `config/floosak.php` or in your `.env`

```
$floosak = new Floosak();
$response = $floosak
    ->setOtp(/*otp*/)
    ->setRequestId(/*requestId*/)
    ->verifyKey();

if ($response->isSuccess()) {
    $key= $response->getKey();
    $wallet_id= $response->getWalletId();
    //todo:: store $key and $wallet_id

} else {

    return $response->body();
}
```

---

To purchase using Floosak payment

### 1. Purchase

[](#1-purchase)

```
 $floosak = new Floosak();
 $response = $floosak
     ->setRequestId(/*ref_id*/) // random number you generate most
     ->setAmount(/*amount*/)
     ->setCustomerPhone(/*phone*/)
     ->setPurpose(/*purpose*/)
     ->purchase();

 if ($response->isSuccess()) {
    $purchase_id = $response->getPurchaseId();
    ....
    ....
 }

```

### 2. Confirm purchase

[](#2-confirm-purchase)

```
 $floosak = new Floosak();
 $response = $floosak
      ->setPurchaseId(/*purchase_id*/) // you get it from the response of the above request `purchase()`
      ->setOtp(/*user_otp*/)
      ->confirmPurchase();
 if ($response->isSuccess()) {
    $tran_id = $response->getTransactionId();
    ....
    ....
 }

```

---

### Refund

[](#refund)

```
 $floosak = new Floosak();
 $response = $floosak
     ->setRequestId(/*ref_id*/) // the random number you generated
     ->setTransactionId(/*tran_id*/)
     ->setAmount(/*amount*/) // amount to refund
     ->refund();

 if ($response->isSuccess()) {
     return $response->getBalance();
 }
```

you can get the full **response body** using `$response->body()` for all requests

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

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

Every ~112 days

Total

5

Last Release

830d ago

Major Versions

v1.0 → v2.02023-01-24

### Community

Maintainers

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

---

Top Contributors

[![Alsharie](https://avatars.githubusercontent.com/u/39643416?v=4)](https://github.com/Alsharie "Alsharie (21 commits)")

---

Tags

floosaklaravelpaymentyemen

### Embed Badge

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

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

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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