Skip to content

ZeroSkye/pospal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pospal

银豹收银系统 SDK

安装

composer require hanson/pospal:dev-master

文档

实例化

$pospal = new \Hanson\Pospal\Pospal([
    'url' => 'your-url',
    'app_id' => 'your-app-id',
    'app_key' => 'your-app-key',
]);

销售单据 API

单据实例

$ticket = $pospal->ticket;

查询支付方式代码

$result = $ticket->allPayMethod();

根据单据序列号查询

$result = $ticket->query($sn);

分页查询所有单据

$result = $ticket->paginate([
   'startTime' => '2017-09-25 01:59:59',
   'endTime' => '2017-09-25 23:59:59',
]);

查询所有单据

此 API 需要传入匿名函数

// 默认查询昨天
$result = $ticket->all([], function ($tickets) {
    foreach($tickets as $ticket) {
        echo $ticket['sn'];
    }
});

About

银豹收银系统 SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%