frankyso/ipaymu
最新稳定版本:1.0.3
Composer 安装命令:
composer require frankyso/ipaymu
包简介
iPaymu-PHP API Package Library
README 文档
README
The easiest way to integrate your website into iPaymu payment gateway.
Installation
The best way to use this package is using composer
composer require frankyso/ipaymu
Usage
Initialization
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key', ['ureturn','unotify','ucancel']);
Set UReturn URL
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->setUreturn('https://your-website');
Set Unotify URL
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->setUnotify('https://your-website');
Set UCancel URL
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->setUcancel('https://your-website');
Check Balance
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->checkBalance();
Check API Key Validity
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->isApiKeyValid();
Add Product to Cart
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $cart = $iPaymu->cart()->add("id","product-name", 'product-quantity','product-price');
Remove Product From Cart
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $cart = $iPaymu->cart(); $cart->remove('product-id');
Checkout Transaction
in this package we use cart type transaction so you must checkout after adding your product
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $cart = $iPaymu->cart()->add("id","product-name", 'product-quantity','product-price'); $cart->checkout();
Check Transaction Status - @deprecated
To checking your account transaction status (deposit, transfer, send money).
to be honest, this endpoint still working, but somehow i cannot find transaction-id from any other endpoint.
<?php use frankyso\iPaymu\iPaymu; $iPaymu = new iPaymu('your-api-key'); $iPaymu->checkTransaction("transaction-id");
Authors
- Franky So - Initial work - Konnco
See also the list of contributors who participated in this project.
统计信息
- 总下载量: 383
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2019-11-24