reactmore/qiospay-sdk
最新稳定版本:v2.0.1
Composer 安装命令:
composer require reactmore/qiospay-sdk
包简介
README 文档
README
This library provides QiosPay integration with the CodeIgniter 4 framework and standalone PHP projects. It helps manage data and APIs easily through Service Facade.
📑 Table of Contents
📦 Installation
- Install via Composer
composer require reactmore/qiospay-sdk
⚙️ ENV Configuration
Qiospay.merchantCode = '' Qiospay.apiKey = '' Qiospay.qrisString = '' # TODO For H2H: Qiospay.memberId = '' Qiospay.memberPin = '' Qiospay.memberPassword = ''
🚀 Usage
Get the service instance
$qiospay = service('qiospay'); $productsService = $qiospay->products();
Products Service
Get Products
$response = $productsService->getProduct([], 1); $data = $response->getData();
Example response:
array(
'kode' => 'BYRTSELQM',
'produk' => 'Telkomsel Omni',
'keterangan' => 'Bayar Telkomsel Combo Sakti',
'harga' => '2050',
'status' => '1',
...
)
Get Products with Filters
$filters = [ 'produk' => 'Telkomsel Omni', ]; $response = $productsService->getProduct($filters, 1); $data = $response->getData();
Example response:
| kode | produk | keterangan | harga | status |
|---|---|---|---|---|
| BYRTSELQM | Telkomsel Omni | Bayar Telkomsel Combo Sakti | 2050 | 1 |
| CEKTSELQM | Telkomsel Omni | Cek Harga Telkomsel Combo Sakti | 0 | 1 |
| LISTTSELQM | Telkomsel Omni | Cek List Telkomsel Combo Sakti | 0 | 1 |
Get Products with Callback
$dataFilter = function(array $products) { return array_filter($products, fn($item) => $item['harga'] > 0); }; $filters = [ 'produk' => 'Telkomsel Omni', ]; $response = $productsService->getProduct($filters, 1, $dataFilter); $data = $response->getData();
Filtered response:
| kode | produk | keterangan | harga | status |
|---|---|---|---|---|
| BYRTSELQM | Telkomsel Omni | Bayar Telkomsel Combo Sakti | 2050 | 1 |
Get Categories
$categoriesResponse = $productsService->getCategories(); $categories = $categoriesResponse->getData();
Other Methods
$response = $productsService->getProduct(); // Get product with optional page $response = $productsService->getAll(); // Get all products $response = $productsService->getCategories();// Get all categories
💳 Qris Service
Get Qris Mutation
$qrisService = $qiospay->qris(); $response = $qrisService->getMutation([], 1); $data = $response->getData();
Get Qris Mutation with Filters
$filters = [ 'amount' => 10000, ]; $response = $qrisService->getMutation($filters, 1); $data = $response->getData();
Generate Dynamic Qris
$response = $qrisService->generateDynamicQris([ 'amount' => 15000, 'note' => 'Order #12345' ]); $qrisData = $response->getData();
Accessing Qris Response
$data = $response->getData(); $fullArray = $response->toArray(); $asObject = $response->toObject(); $json = $response->toJson();
🌐 Usage in PHP (non CodeIgniter 4)
$qios = new QiosPayFacade([ 'merchantCode' => '', 'memberId' => '', 'memberPin' => '', 'memberPassword' => '', 'apiKey' => '', 'qrisString' => '', ]); $response = $qios->products()->getProduct([ 'produk' => 'Telkomsel Omni', ], 1);
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-23