PHPackages                             femlabs/laravel-dpo - 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. femlabs/laravel-dpo

ActiveLibrary[Payment Processing](/categories/payments)

femlabs/laravel-dpo
===================

Package to make online payment using DPO Group

V1.0.0(3y ago)1321MITPHP

Since Sep 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/filbertmsaki/Laravel-dpo)[ Packagist](https://packagist.org/packages/femlabs/laravel-dpo)[ RSS](/packages/femlabs-laravel-dpo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

DPO (Direct Pay Online) Laravel Package
---------------------------------------

[](#dpo-direct-pay-online-laravel-package)

Femlabs DPO package will help you add DPO Payment API to your Laravel Application in easy way and simple.

How the package work
====================

[](#how-the-package-work)

```
1. Create payment token
2. Verify payment token
3. Redirect to payment page
4. Fetch response

```

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

[](#installation)

```
composer require femlabs/laravel-dpo

```

Publish the required file
-------------------------

[](#publish-the-required-file)

```
php artisan vendor:publish --provider="Femlabs\Dpo\DpoServiceProvider"

```

Run Migration
-------------

[](#run-migration)

```
php artisan migrate

```

Environment variables
---------------------

[](#environment-variables)

```
DPO_COMPANY_TOKEN ="9F416C11-127B-4DE2-AC7F-D5710E4C5E0A"
DPO_SERVICE_TYPE = "3854"
DPO_SERVICE_DESCRIPTION = "Test Product"
DPO_LIVE_MODE = true
DPO_DEFAULT_CURRENCY = "TZS"
DPO_DEFAULT_COUNTRY = "Tanzania"
DPO_BACK_URL ="/cancel"
DPO_REDIRECT_URL =  "/callback"

```

Usage
-----

[](#usage)

use the below dependancy in your controller

```
use Femlabs\Dpo\Dpo;

```

How the package work
--------------------

[](#how-the-package-work-1)

=&gt; Create array data of your order in the controller

```
$data['companyRef'] = 'ORD' . '' . time(); //$params['invoiceid']; (On this line you can put uniq id of your service)
$data['paymentAmount'] = 100;
$data['customerFirstName'] = 'Filbert';
$data['customerLastName'] = 'Msaki';
$data['customerAddress'] = 'Ubungo Kibangu';
$data['customerCity'] = 'Dar Es Salaam';
$data['customerPhone'] = '07********';
$data['customerEmail'] =  'filymsaki@gmail.com';
$data['customerCountry'] = 'TZ'; //ISO 2 letter code
$data['customerZip'] = '0000';
$data['serviceDescription'] =  'Test Order';

```

=&gt; Call the DPO function

```
$dpo =new Dpo();

```

You can choose either to save the response in the database or to make direct payment in the DPO package

=&gt; Go Direct to DPO payment page

```
return $dpo->directPaymentPage($data);

```

=&gt; If you preffer to save details the follow the steps below.

1.Create payment token first and the redirect to payment page

```
$token = $dpo->createToken($data);

```

2. Check token response and save to database

    ```
     if ($token['success'] === true) {
         $data['TransToken'] = $token['TransToken'];

         //Here you can save token details to database

         $verify = $dpo->verifyToken($data);
         if ($verify['success'] === true) {
             //Here you can save token details and verified data to database

             //Get payment url
             $payment_url = $dpo->getPaymentUrl($token);
             //redirect to payment page
             return redirect()->$payment_url;
         }
     }

    ```

License
-------

[](#license)

This project is licensed under the MIT license.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

1334d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f6bb0b83e892e6d157a30d7d834c7ce8582933fd1035b8b6ce82676bfcf1328?d=identicon)[filbertmsaki](/maintainers/filbertmsaki)

---

Top Contributors

[![filbertmsaki](https://avatars.githubusercontent.com/u/36415186?v=4)](https://github.com/filbertmsaki "filbertmsaki (8 commits)")

### Embed Badge

![Health badge](/badges/femlabs-laravel-dpo/health.svg)

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

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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