PHPackages                             esyede/lara-dana - 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. esyede/lara-dana

AbandonedArchivedLibrary[Payment Processing](/categories/payments)

esyede/lara-dana
================

Unofficial Dana Payment API package for Laravel

v1.0.0(2y ago)1138[1 issues](https://github.com/esyede/lara-dana/issues)MITPHP

Since Sep 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/esyede/lara-dana)[ Packagist](https://packagist.org/packages/esyede/lara-dana)[ RSS](/packages/esyede-lara-dana/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

lara-dana
=========

[](#lara-dana)

Unofficial Dana Payment API package for Laravel. Visit  for more detailed documentations.

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

[](#requirements)

- Laravel &gt;= 10.0

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

[](#installation)

#### 1. Install this package via composer:

[](#1-install-this-package-via-composer)

```
composer require esyede/lara-dana
```

#### 2. Publish the config file:

[](#2-publish-the-config-file)

```
php artisan vendor:publish --provider="Esyede\Dana\DanaCoreServiceProvider"
```

Usage
-----

[](#usage)

Configs are stored in `config/dana.php`. Customize those with your own credentials.

Functions
---------

[](#functions)

### 1. Create order

[](#1-create-order)

```
$orderData = [
    [
    'order' => [
        'orderTitle' => 'Dummy product',
        'orderAmount' => [
            'currency' => 'IDR',
            'value' => 100
        ],
        'merchantTransId' => '201505080001',
        'merchantTransType' => 'dummy transaction type',
        'orderMemo' => 'Memo',
        'goods' => [
            [
                'merchantGoodsId' => '24525635625623',
                'description' => 'dummy description',
                'category' => 'dummy category',
                'price' => [
                    'currency' => 'IDR',
                    'value' => 100,
                ],
                'unit' => 'Kg',
                'quantity' => '3.2',
                'merchantShippingId' => '564314314574327545',
                'snapshotUrl' => '[http://snap.url.com]',
                'extendInfo' => [
                    'myInvoiceId' => 'T12345678ASDFG', // optional
                    'remark' => 'DEBIT', // optional
                ]
            ]
        ]
    ],
    'merchantId' => '216820000000006553000',
    'subMerchantId' => '12345678',
    'productCode' => '51051000100000000001',
];

DanaPayment::createOrder($orderData);
```

For more detailed documentation, visit

### 2. Get oAuth URL

[](#2-get-oauth-url)

```
$terminalType = 'WEB';
$redirectUrl  = 'https://your-app-url.com/oauth/callback';
DanaPayment::generateOauthUrl($terminalType, $redirectUrl);
```

For more detailed documentation, visit

### 3. Get Request &amp; Refresh Token

[](#3-get-request--refresh-token)

```
$authToken = 'your-auth-token';
DanaPayment::getToken($authToken);
```

You can get value of `$authToken` from oAuth callback process.
From this function you will receive `token` and `refresh_token`.
Ref:

### 4. Get User Profile

[](#4-get-user-profile)

```
$accessToken = 'your_user_profile_access_token';
DanaPayment::profile($accessToken);
```

Fill the `$accessToken` with the response of `DanaPayment::getToken()`, ref:

### 5. Unbinding Access Token

[](#5-unbinding-access-token)

```
DanaPayment::unbindAllAccount();
```

This method is used to revoke or unbind all access token registered from the merchant. ref:

### 6. Hnadling callback response

[](#6-hnadling-callback-response)

```
$status = true;
DanaPayment::handleFinishNotifyCallback($status);
```

This function will generate valid response for Dana API. `$status` is boolean.

### 6. Function for calculation MDR

[](#6-function-for-calculation-mdr)

```
$payAmount = 100000;
$payMethod = 'BALANCE';
DanaCalculation::calculateMDR($payAmount, $payMethod);
```

This function will calculate MDR fee for dana. Fill the `$payMethod` and `$payAmount` from dana callback data.

Contribution
============

[](#contribution)

This project is far from perfect. many of dna APIs isn't implemented yet. I would be really happy if any of you could contribute to implement it.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

970d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10582583?v=4)[Suyadi](/maintainers/esyede)[@esyede](https://github.com/esyede)

---

Top Contributors

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

---

Tags

paymentpayment gatewayDANA Laravelesyedelara-danadana payment api

### Embed Badge

![Health badge](/badges/esyede-lara-dana/health.svg)

```
[![Health](https://phpackages.com/badges/esyede-lara-dana/health.svg)](https://phpackages.com/packages/esyede-lara-dana)
```

###  Alternatives

[shetabit/payment

Laravel Payment Gateway Integration Package

944330.1k5](/packages/shetabit-payment)[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[ssheduardo/redsys-laravel

Package redsys for laravel

100129.5k1](/packages/ssheduardo-redsys-laravel)[tzsk/payu

PayU India Payment Gateway Integration with Laravel

47108.8k6](/packages/tzsk-payu)[tsaiyihua/laravel-ecpay

ecpay library for laravel

6416.3k](/packages/tsaiyihua-laravel-ecpay)

PHPackages © 2026

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