PHPackages                             ohansyah/jokul-php-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. ohansyah/jokul-php-library

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

ohansyah/jokul-php-library
==========================

Jokul PHP Library

v0.1.0(3y ago)13MITPHPPHP &gt;=7.2

Since Oct 18Pushed 3y agoCompare

[ Source](https://github.com/ohansyah/jokul-php-library)[ Packagist](https://packagist.org/packages/ohansyah/jokul-php-library)[ RSS](/packages/ohansyah-jokul-php-library/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

Jokul PHP Library
=================

[](#jokul-php-library)

This is fork of [Jokul PHP Library](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-php-library)

Table of Contents
-----------------

[](#table-of-contents)

- [Payment Channels Supported](#payment-channels-supported)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
    - [Setup Configuration](#setup-configuration)
    - [Virtual Account](#virtual-account)
    - [Handling HTTP Notification](#handling-http-notification)
- [Sample Project](#sample-project)
- [Help and Support](#help-and-support)

Payment Channels Supported
--------------------------

[](#payment-channels-supported)

Virtual Account =&gt; `Channel Name`

- BCA = `bca-virtual-account`
- Mandiri = `mandiri-virtual-account`
- Bank Syariah Indonesia (BSI)= `bsm-virtual-account`
- DOKU = `doku-virtual-account`
- BRI = `bri-virtual-account`
- CIMB = `cimb-virtual-account`
- Permata = `permata-virtual-account`
- BNI = `bni-virtual-account`
- Danamon = `danamon-virtual-account`

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

[](#requirements)

- PHP 7.2 or above

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

[](#installation)

If you are using [Composer](https://getcomposer.org), you can install via composer CLI:

```
composer require doku/jokul-php-library

```

**or**

add this require line to your `composer.json` file:

example

```
{
    "require": {
        "doku/jokul-php-library": "2.1.0"
    }
}
```

and run `composer install` on your terminal.

Usage
-----

[](#usage)

### Setup Configuration

[](#setup-configuration)

Get your Client ID and Shared Key from Jokul Back Office. [Sandbox Jokul Back Office (for testing purpose)](https://sandbox.doku.com/bo/login) / [Production Jokul Back Office (for real payments)](https://jokul.doku.com/bo/login)

Setup your configuration:

```
// Instantiate class
$DOKUClient = new DOKU\Client;
// Set your Client ID
$DOKUClient->setClientID('[YOUR_CLIENT_ID]');
// Set your Shared Key
$DOKUClient->setSharedKey('[YOUR_SHARED_KEY]');
// Call this function for production use
$DOKUClient->isProduction(true);
```

If you want to hit to Sandbox, change to `$DOKUClient->isProduction(false);`.

### Virtual Account

[](#virtual-account)

First prepare your payment request data:

```
// Setup VA payment request data
$params = array(
    'customerEmail' => $arr["email"],
    'customerName' => $arr["customerName"],
    'amount' => $arr["amount"],
    'invoiceNumber' => random_strings(20),
    'expiryTime' => $arr["expiredTime"],
    'info1' => $arr["info1"],
    'info2' => $arr["info2"],
    'info3' => $arr["info3"],
    'reusableStatus' => $arr["reusableStatus"]
);
```

For further details of each parameter, please refer to our [Jokul Docs](https://jokul.doku.com/docs/docs/jokul-direct/virtual-account/virtual-account-overview).

#### Virtual Account

[](#virtual-account-1)

After preparing the payment request above, call this function to generate BCA VA:

```
// Set channel Virtual Account
$DOKUClient->setChannelVA("bca-virtual-account");

// Call this function to generate Virtual Account
$DOKUClient->generateVA($params);
```

### Handling HTTP Notification

[](#handling-http-notification)

For async payment from these channels:

- Virtual Account

We will send the HTTP Notification after the payment made from your customers. Therefore, you will need to handle the notification to update the transaction status on your end. Here is the steps:

1. Create notification URL (endpoint) on your server to receieve HTTP POST notification from Jokul. The notification will be sent to you whenever the transaction status is updated on Jokul side. The sample code available in [Jokul Java Example](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-java-example).
2. Setup the notification URL that you made to the Payment Configuration on Jokul Back Office. [Sandbox Jokul Back Office (for testing purpose)](https://sandbox.doku.com/bo/login) / [Production Jokul Back Office (for real payments)](https://jokul.doku.com/bo/login)
3. Test the payment with our [Payment Simulator](https://sandbox.doku.com/integration/simulator) (for testing purpose)

Here is the sample of the notification endpoint that you need to setup:

```
// Mapping the notification received from Jokul
$notifyHeaders = getallheaders();
$notifyBody = json_decode(file_get_contents('php://input'), true); // You can use to parse the value from the notification body
$targetPath = '/payments/notifications'; // Put this value with your payment notification path
$secretKey = 'SK-xxxxxxx'; // Put this value with your Secret Key

// Prepare Signature to verify the notification authenticity
$signature = \DOKU\Common\Utils::generateSignature($notifyHeaders, $targetPath, file_get_contents('php://input'), $secretKey);

// Verify the notification authenticity
if ($signature == $notifyHeaders['Signature']) {
    http_response_code(200); // Return 200 Success to Jokul if the Signature is match
    // TODO update transaction status on your end to 'SUCCESS'
} else {
    http_response_code(401); // Return 401 Unauthorized to Jokul if the Signature is not match
    // TODO Do Not update transaction status on your end yet
}
```

For further reference, please refer to our [Jokul Docs](https://jokul.doku.com/docs).

Help and Support
----------------

[](#help-and-support)

Got any issues? Found a bug? Have a feature requests? You can [open new issue](https://github.com/PTNUSASATUINTIARTHA-DOKU/jokul-php-library/issues/new).

For further information, you can contact us on .

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity32

Early-stage or recently created project

 Bus Factor1

Top contributor holds 72.4% 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

1354d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43288867?v=4)[Ohansyah](/maintainers/ohansyah)[@ohansyah](https://github.com/ohansyah)

---

Top Contributors

[![dokudevex](https://avatars.githubusercontent.com/u/66766882?v=4)](https://github.com/dokudevex "dokudevex (21 commits)")[![ariefrizkyr](https://avatars.githubusercontent.com/u/9876270?v=4)](https://github.com/ariefrizkyr "ariefrizkyr (6 commits)")[![mirzadok](https://avatars.githubusercontent.com/u/183800940?v=4)](https://github.com/mirzadok "mirzadok (1 commits)")[![ohansyah](https://avatars.githubusercontent.com/u/43288867?v=4)](https://github.com/ohansyah "ohansyah (1 commits)")

### Embed Badge

![Health badge](/badges/ohansyah-jokul-php-library/health.svg)

```
[![Health](https://phpackages.com/badges/ohansyah-jokul-php-library/health.svg)](https://phpackages.com/packages/ohansyah-jokul-php-library)
```

###  Alternatives

[crisu83/php-conversion

Library for converting units and sizes.

133332.9k1](/packages/crisu83-php-conversion)[pugx/shortid-php

An implementation of shortid in PHP

52617.0k3](/packages/pugx-shortid-php)[yii2mod/yii2-editable

Yii2 editable field extension

55416.1k11](/packages/yii2mod-yii2-editable)[neos/form

Extensible and flexible API for building web forms

18892.2k55](/packages/neos-form)[squareetlabs/laravel-openvidu

Laravel client for controlling your videocalls from your Openvidu server.

2710.8k](/packages/squareetlabs-laravel-openvidu)

PHPackages © 2026

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