Download the PHP package danaid/dana-php without Composer
On this page you can find all versions of the php package danaid/dana-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download danaid/dana-php
More information about danaid/dana-php
Files in danaid/dana-php
Package dana-php
Short Description API for doing operations in DANA Payment Gateway (Gapura), Widget, Merchant Management, and Disbursement
License unlicense
Homepage https://github.com/dana-id/dana-php
Informations about the package 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 https://dashboard.dana.id/api-docs-v2/)
โ ๏ธ 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: https://github.com/dana-id/uat-script.
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
โ 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 & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json:
Then run composer install
Environment Variables
Before using the SDK, please make sure to set the following environment variables (In .env):
| Name | Description | Example 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. | https://yourdomain.com |
CLIENT_SECRET |
Assigned client secret during registration. Must be set for DisbursementApi | your_client_secret |
X_DEBUG |
Set to 'true' to enable debug mode (showing reason of failed request in additionalInfo.debugMessage in response) | true |
You 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 | Docs |
|---|---|
| PaymentGatewayApi | PaymentGatewayApi Docs |
| WidgetApi | WidgetApi Docs |
| DisbursementApi | DisbursementApi Docs |
| MerchantManagementApi | MerchantManagementApi Docs |
All versions of dana-php with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.3
guzzlehttp/psr7 Version ^1.7 || ^2.0
vlucas/phpdotenv Version ^5.5
ramsey/uuid Version ^4.0