PHPackages                             bagoespantera/doku-laravel-library - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bagoespantera/doku-laravel-library

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bagoespantera/doku-laravel-library
==================================

DOKU PHP Library for Laravel

2.0.0(3w ago)016MITPHPPHP ^7.4|^8.0

Since Feb 26Pushed 3w agoCompare

[ Source](https://github.com/BagoesPantera/doku-laravel-library)[ Packagist](https://packagist.org/packages/bagoespantera/doku-laravel-library)[ RSS](/packages/bagoespantera-doku-laravel-library/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Doku Laravel Library
====================

[](#doku-laravel-library)

A Laravel wrapper for the DOKU Payment Gateway API. This library simplifies the integration of DOKU payment services into your Laravel application.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- Laravel &gt;= 8.0
- `ext-curl`
- `ext-json`

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

[](#installation)

You can install the package via composer:

```
composer require bagoespantera/doku-laravel-library
```

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

[](#configuration)

You can use the library directly by instantiating the client or using the provided classes.

Usage
-----

[](#usage)

### 1. Initialize the Client

[](#1-initialize-the-client)

First, you need to initialize the `DOKU\Client` with your Client ID and Shared Key. You can obtain these from the DOKU Dashboard.

```
use DOKU\Client;

$client = new Client;

// Set your credentials
$client->setClientID('YOUR_CLIENT_ID');
$client->setSharedKey('YOUR_SHARED_KEY');

// Set environment (true for production, false for sandbox)
$client->isProduction(false);
```

### 2. Generate Payment Code (Virtual Account)

[](#2-generate-payment-code-virtual-account)

Here is an example of how to generate a Mandiri Virtual Account:

```
$params = [
    'customerEmail' => 'johndoe@example.com',
    'customerName' => 'John Doe',
    'amount' => 10000,
    'invoiceNumber' => 'INV-' . time(),
    'expiryTime' => 60, // in minutes
    'reusableStatus' => false, // false for one-time use
    'info1' => 'Payment Info 1',
    'info2' => 'Payment Info 2',
    'info3' => 'Payment Info 3',
];

try {
    $response = $client->generateMandiriVa($params);

    // Process the response
    if (isset($response['virtual_account_info'])) {
        $vaNumber = $response['virtual_account_info']['virtual_account_number'];
        return response()->json([
            'status' => 'success',
            'va_number' => $vaNumber,
            'data' => $response
        ]);
    } else {
        return response()->json([
            'status' => 'error',
            'message' => 'Failed to generate VA'
        ], 400);
    }
} catch (\Exception $e) {
    return response()->json([
        'status' => 'error',
        'message' => $e->getMessage()
    ], 500);
}
```

### Available Services

[](#available-services)

The library supports various payment methods including:

- **Virtual Accounts**:

    - `generateMandiriVa($params)`
    - `generateBcaVa($params)`
    - `generateBriVa($params)`
    - `generateBsiVa($params)`
    - `generateDokuVa($params)`
- **E-Wallets**:

    - `generateOvo($params)`
    - `generateShopeePay($params)`
    - `generateDokuWallet($params)`
- **Credit Card**:

    - `generateCreditCard($params)`

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance95

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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 ~76 days

Total

3

Last Release

21d ago

Major Versions

1.0.1 → 2.0.02026-07-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60493335?v=4)[pantera](/maintainers/BagoesPantera)[@BagoesPantera](https://github.com/BagoesPantera)

---

Top Contributors

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

---

Tags

dokularavephp

### Embed Badge

![Health badge](/badges/bagoespantera-doku-laravel-library/health.svg)

```
[![Health](https://phpackages.com/badges/bagoespantera-doku-laravel-library/health.svg)](https://phpackages.com/packages/bagoespantera-doku-laravel-library)
```

###  Alternatives

[illuminate/pagination

The Illuminate Pagination package.

12234.6M1.1k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9350.2M312](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.8M410](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

224.7M146](/packages/illuminate-cookie)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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