2017 © Pedro Peláez
 

library pospal

image

hanson/pospal

  • Wednesday, May 16, 2018
  • by hanson
  • Repository
  • 1 Watchers
  • 2 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 133 % Grown

The README.md

pospal

银豹收银系统 SDK, (*1)

安装

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 需要传入匿名函数, (*2)

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

The Versions

16/05 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Avatar hanson