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

1.0.1(2mo ago)04MITPHPPHP ^7.4|^8.0

Since Feb 26Pushed 2mo 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 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)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

35

—

LowBetter than 79% of packages

Maintenance85

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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

Total

2

Last Release

76d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a25175ab4734a378c47f0730ed04eec71ebb747e0fdff7f5ec76b126e364da8?d=identicon)[BagoesPantera](/maintainers/BagoesPantera)

---

Top Contributors

[![BagoesPantera](https://avatars.githubusercontent.com/u/60493335?v=4)](https://github.com/BagoesPantera "BagoesPantera (3 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

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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