PHPackages                             danaid/dana-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. danaid/dana-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

danaid/dana-php
===============

API for doing operations in DANA Payment Gateway (Gapura), Widget, Merchant Management, and Disbursement

v2.2.0(2w ago)83.9k—1.4%4unlicensePHPPHP ^7.4 || ^8.0

Since Jun 11Pushed 1mo agoCompare

[ Source](https://github.com/dana-id/dana-php)[ Packagist](https://packagist.org/packages/danaid/dana-php)[ Docs](https://github.com/dana-id/dana-php)[ RSS](/packages/danaid-dana-php/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (42)Versions (55)Used By (0)

dana-php
========

[](#dana-php)

The official DANA PHP SDK provides a simple and convenient way to call DANA's REST API in applications written in PHP (based on )

⚠️ Run This First - Save Days of Debugging
------------------------------------------

[](#️-run-this-first---save-days-of-debugging)

Before writing any integration code, **run our automated test suite**. It takes **under 2 minutes** and shows you how the full flow works — **with your own credentials**.

Here is the link: .

### Why This Matters

[](#why-this-matters)

- 🧪 Validates your setup instantly
- 👀 **See exactly how each scenario flows**
- 🧾 Gives us logs to help you faster
- 🚫 Skipping this = guaranteed delays

### What It Does

[](#what-it-does)

✅ Runs full scenario checks for DANA Sandbox

✅ Installs and executes automatically

✅ Shows real-time results in your terminal

✅ Runs in a safe, simulation-only environment

> Don't fly blind. Run the test first. See the flow. Build with confidence.

.

.

Installation &amp; Usage
------------------------

[](#installation--usage)

### Requirements

[](#requirements)

PHP 7.4 and later. Should also work with PHP 8.0.

### Composer

[](#composer)

To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:

```
{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/dana-id/dana-php.git"
    }
  ],
  "require": {
    "danaid/dana-php": "^1.0"
  }
}
```

Then run `composer install`

Environment Variables
---------------------

[](#environment-variables)

Before using the SDK, please make sure to set the following environment variables (In .env):

NameDescriptionExample Value`ENV` or `DANA_ENV`Defines which environment the SDK will use. Possible values: `SANDBOX` or `PRODUCTION`.`SANDBOX``X_PARTNER_ID`Unique identifier for partner, provided by DANA, also known as `clientId`.1970010100000000000000`PRIVATE_KEY`Your private key string.`PRIVATE_KEY_PATH`Path to your private key file. If both are set, `PRIVATE_KEY_PATH` is used./path/to/your\_private\_key.pem`DANA_PUBLIC_KEY`DANA public key string for parsing webhook.`-----BEGIN PUBLIC KEY-----MIIBIjANBgkq...Do/QIDAQAB-----END PUBLIC KEY-----``DANA_PUBLIC_KEY_PATH`Path to DANA public key file for parsing webhook. If both set, `DANA\_PUBLIC\_KEY\_PATH is used./path/to/dana\_public\_key.pem`ORIGIN`Origin domain.`CLIENT_SECRET`Assigned client secret during registration. Must be set for DisbursementApiyour\_client\_secret`X_DEBUG`Set to 'true' to enable debug mode (showing reason of failed request in additionalInfo.debugMessage in response)trueYou can see these variables in .env.example, fill it, and change the file name to .env (remove the .example extension)

Then you can choose these following APIs based on the business solution you want to integrate:

API Endpoints
-------------

[](#api-endpoints)

APIDocs*PaymentGatewayApi*[**PaymentGatewayApi Docs**](docs/PaymentGatewayAPI.md)*WidgetApi*[**WidgetApi Docs**](docs/WidgetAPI.md)*DisbursementApi*[**DisbursementApi Docs**](docs/DisbursementAPI.md)*MerchantManagementApi*[**MerchantManagementApi Docs**](docs/MerchantManagementAPI.md)

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance92

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

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

Recently: every ~16 days

Total

54

Last Release

19d ago

Major Versions

v0.1.12 → v1.0.02025-08-03

v1.0.25 → v2.0.02026-02-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d49b31b47c5dacac1d3f0e4875a8dde37578389d12fabd0dd73a3fe2bbc3b13?d=identicon)[danaid](/maintainers/danaid)

---

Top Contributors

[![sre-dana-id](https://avatars.githubusercontent.com/u/205132488?v=4)](https://github.com/sre-dana-id "sre-dana-id (1 commits)")

---

Tags

client-librarydanadisbursementpayment-gatewayphpsdksdk-phpphpapisdkrestopenapiopenapitoolsopenapi-generator

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/danaid-dana-php/health.svg)

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

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

353.6k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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