Download the PHP package esyede/lara-dana without Composer
On this page you can find all versions of the php package esyede/lara-dana. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download esyede/lara-dana
More information about esyede/lara-dana
Files in esyede/lara-dana
Package lara-dana
Short Description Unofficial Dana Payment API package for Laravel
License MIT
Informations about the package lara-dana
lara-dana
Unofficial Dana Payment API package for Laravel. Visit https://dashboard.dana.id/api-docs for more detailed documentations.
Requirements
- Laravel >= 10.0
Installation
1. Install this package via composer:
2. Publish the config file:
Usage
Configs are stored in config/dana.php
. Customize those with your own credentials.
Functions
1. Create order
For more detailed documentation, visit https://dashboard.dana.id/api-docs/read/33
2. Get oAuth URL
For more detailed documentation, visit https://dashboard.dana.id/api-docs/read/47
3. Get Request & Refresh Token
You can get value of $authToken
from oAuth callback process.
From this function you will receive token
and refresh_token
.
Ref: https://dashboard.dana.id/api-docs/read/32
4. Get User Profile
Fill the $accessToken
with the response of DanaPayment::getToken()
, ref: https://dashboard.dana.id/api-docs/read/38
5. Unbinding Access Token
This method is used to revoke or unbind all access token registered from the merchant. ref: https://dashboard.dana.id/api-docs/read/46
6. Hnadling callback response
This function will generate valid response for Dana API. $status
is boolean.
6. Function for calculation MDR
This function will calculate MDR fee for dana. Fill the $payMethod
and $payAmount
from dana callback data.
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.