nurfaizfy/mutasi-php-library

PHP Library Mutasi.co.id Codeigniter 4

1.0 2022-06-09 11:52 UTC

This package is auto-updated.

Last update: 2024-05-09 16:20:45 UTC


README

Latest Stable Version Total Downloads License

This library is unofficial, already compatible with Composer, for more details please visit Documentation.

IMPORTANT: Make sure you read the documentation and understand what these methods are used for!

Instalation

composer require nurfaizfy/mutasi-php-library

Configuration

you must define or import library

use Mutasi\Main;

after that configure token obtained from Dashboard

$main = new Main(
    'your-token',
);

Contents available

content method available so far

Method Contents Status
initUserInfo() User Info OK
initAccountList() Account List OK
initAccountDetail Account Detail OK
initTransaction() Transactions OK
initSearchAmount() Search Amount OK
initCallback() Callback OK

Request available

request can return the available content, the list of available methods is as follows

Method Description
getRequest(string $url) return return guzzle http client
getResponse() return response
getJson() return json decode
getStatus() return boolean
getData() return data response

User Info

This API is used to get user info

$main->initUserInfo()

the next method can be seen in the request method

Account List

This API is used to retrieve all bank account list

$init = $main->initAccountList($code)

the next method can be seen in the request method

Account Detail

This API is used to retrieve detail bank account

$data = ['account_id'=>id] // id retrieved from Account List or can be seen in dashboard
$init = $main->initAccountDetail();
$init->setForm($data);

the next method can be seen in the request method

Transactions

This API is used to obtain detailed transaction based on a specified date

$data = [
    'account_id'    =>  id, // Optional
    'from'          =>  date,
    'to'            =>  date,
]
$init = $main->initTransaction();
$init->setForm($data);

the next method can be seen in the request method

Search Amount

This API is used to Get a list of transactions by amount

$data = [
    'account_id'    =>  id, // Optional
    'from'          =>  date,
    'to'            =>  date,
    'nominal'       =>  amount,
    'type'          =>  type, // Optional (C = Credit, D = Debet)
]
$init = $main->initSearchAmount();
$init->setForm($data);
);

the next method can be seen in the request method

Callback

Callback is a method of sending transaction notifications from the Mutasi server to the user's server. When the payment from the customer is completed, the TriPay system will provide a notification containing transaction data which can then be further managed by the user's system.

please define the method below before starting

$init = $main->initCallback(); // return callback

Receive JSON

to get the json that was sent by tripay you can use the method below

$init->get(); // get all callback

Decode JSON

rather than wasting time on json_decode, this package provides that

$init->getJson(); // get json callback

Contribute

If you want to contribute this SDK, you can fork, edit and create pull request. And we will review your request and if we finish to review your request. We will merge your request to developemnt branch. Thanks