PHPackages                             hanson/pospal - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. hanson/pospal

ActiveLibrary[Payment Processing](/categories/payments)

hanson/pospal
=============

181.4k10PHP

Since May 16Pushed 8y ago2 watchersCompare

[ Source](https://github.com/HanSon/pospal)[ Packagist](https://packagist.org/packages/hanson/pospal)[ RSS](/packages/hanson-pospal/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

pospal
======

[](#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

[](#销售单据-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'];
    }
});
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10583423?v=4)[hanson](/maintainers/hanson)[@Hanson](https://github.com/Hanson)

---

Top Contributors

[![Hanson](https://avatars.githubusercontent.com/u/10583423?v=4)](https://github.com/Hanson "Hanson (6 commits)")

### Embed Badge

![Health badge](/badges/hanson-pospal/health.svg)

```
[![Health](https://phpackages.com/badges/hanson-pospal/health.svg)](https://phpackages.com/packages/hanson-pospal)
```

###  Alternatives

[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)[oxid-esales/amazon-pay-module

AmazonPay module for OXID

1824.3k](/packages/oxid-esales-amazon-pay-module)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
