restugbk/qris-interactive
Composer 安装命令:
composer require restugbk/qris-interactive
包简介
PHP Class for fetching QRIS Interactive merchant transaction history (Un-official)
README 文档
README
[Un-Official] A lightweight, Un-Official PHP Library for automating transaction mutation retrieval from the QRIS Interactive Merchant Dashboard. Designed to be framework-agnostic, efficient, and easy to integrate.
📦 Installation
Install the package via Composer:
composer require restugbk/qris-interactive
1. Basic Initialization
By default, the library stores session data in a session.json file within the script's directory.
use Restugbk\QrisMerchantMutation; $username = 'YOUR_USERNAME'; $password = 'YOUR_PASSWORD'; // For Native PHP $qris = new QrisMerchantMutation($username, $password); // For Laravel (Recommended: store session in storage folder) // $qris = new QrisMerchantMutation($username, $password, storage_path('app/qris_session.json'));
2. Retrieve Merchant List (Outlets)
Before fetching transactions, you must identify the merchant_id for your specific outlet.
$response = $qris->getMerchant(); if ($response['status']) { foreach ($response['data'] as $merchant) { echo "Outlet Name: " . $merchant['merchant_name'] . "\n"; echo "Merchant ID: " . $merchant['merchant_id'] . "\n"; echo "Address : " . $merchant['address'] . "\n---\n"; } }
3. Fetch Transaction Mutations
Retrieve transaction data by providing the merchant_id and a date range (Format: DD/MM/YYYY).
$merchantId = '1234567890'; $startDate = '01/01/2026'; $endDate = '03/01/2026'; $result = $qris->getTransactionsByRange($merchantId, $startDate, $endDate); if ($result['status']) { $data = $result['data']; echo "Total Records: " . $data['total_records'] . "\n"; echo "Total Amount : Rp " . number_format($data['summary_amount']) . "\n"; foreach ($data['transactions'] as $trx) { echo "[{$trx['date']}] {$trx['customer']} - Rp " . number_format($trx['amount']) . " ({$trx['status']})\n"; } } else { echo "Error: " . $result['error']; }
4. Advanced Search (Custom Filtering)
You can search for specific transactions using RRN, Invoice ID, or Customer Name to filter results more accurately without fetching all data.
$merchantId = '123456789'; $startDate = '01/01/2026'; $endDate = '04/01/2026'; /** * Search Category ($item): * 'rrn' -> Search by Retrieval Reference Number * 'inv' -> Search by Invoice ID * 'nominal' -> Search by Transaction Amount * 'csname' -> Search by Customer Name * 'infoket' -> Search by Transaction Note/Description */ $filterBy = 'nominal'; // Search Category $keyword = '1000'; // The actual value you want to find $result = $qris->getTransactionsByCustom( $merchantId, $startDate, $endDate, $filterBy, $keyword ); if ($result['status']) { $data = $result['data']; echo "Total Records: " . $data['total_records'] . "\n"; echo "Total Amount : Rp " . number_format($data['summary_amount']) . "\n"; foreach ($data['transactions'] as $trx) { echo "[{$trx['date']}] {$trx['customer']} - Rp " . number_format($trx['amount']) . " ({$trx['status']})\n"; } } else { echo "Error: " . $result['error']; }
📋 Data Structure Reference
The transactions array returns the following keys:
| Key | Type | Description |
|---|---|---|
transaction_id |
Integer | Unique transaction ID from the server. |
invoice_id |
Integer | Associated Invoice number. |
date |
String | Transaction timestamp. |
amount |
Integer | Raw transaction nominal. |
amount_display |
String | Formatted nominal (e.g., Rp 50.000). |
status |
String | Transaction status (Success/Pending/Expired). |
payment_method |
String | Customer's payment source (e.g., ShopeePay, OVO). |
customer |
String | Customer name or identifier. |
📄 License
This open-source software is distributed under the MIT License. See LICENSE for more information.
🛠 Support
If you found this project helpful, please give it a ⭐ star!
For issues and questions, please create an issue in the GitHub repository.
restugbk/qris-interactive 适用场景与选型建议
restugbk/qris-interactive 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 10, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 restugbk/qris-interactive 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 restugbk/qris-interactive 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04