iqomp / growinc-pga
GrowInc PGA API 处理器
1.0.1
2021-10-04 08:39 UTC
Requires
- guzzlehttp/guzzle: ^7.3
Requires (Dev)
This package is auto-updated.
Last update: 2024-09-04 14:54:35 UTC
README
用于处理 GrowInc PGA 的库。
安装
composer require iqomp/growinc-pga
使用方法
此模块添加了一个新类,可用于与 GrowInc PGA API 交互。
use Iqomp\GrowIncPGA\PGA; $pga = new PGA($merc_code, $merc_secret); // get all payment methods $payment_methods = $pga->getPaymentMethods(); // create new bill $body = [ 'invoice_no' => ::string, 'description' => ::string, 'amount' => ::int, 'customer_name' => ::string, 'customer_email' => ::string, 'customer_phone' => ::string, 'expire_in' => ::int, 'payment_method_code' => ::string ]; $bill = $pga->createBill($body); // check bill status $body = [ 'reference_no' => ::string ]; $status = $pga->checkBill($body); // get all exists transactions $body = [ 'start_date' => ::string, 'end_date' => ::string, 'show_per_page' => ::int ]; $trans = $pga->getTransactions($body);