reactmore / qiospay-sdk
v1.2.0
2025-09-24 00:57 UTC
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- endroid/qr-code: ^6.0
- reactmore/support-adapter: ^1.0.3
Requires (Dev)
- codeigniter4/devkit: ^1.3
- codeigniter4/framework: ^4.6
This package is auto-updated.
Last update: 2025-09-24 00:58:07 UTC
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);