PHPackages                             minz/apple-pay - 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. minz/apple-pay

ActiveLibrary[Payment Processing](/categories/payments)

minz/apple-pay
==============

apple pay verify

1.0.0(5y ago)177↓92.3%1MITPHPPHP &gt;=5.4.0

Since Aug 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/minz/apple-pay)[ Packagist](https://packagist.org/packages/minz/apple-pay)[ RSS](/packages/minz-apple-pay/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

苹果内购
====

[](#苹果内购)

安装
--

[](#安装)

composer

```
$ php composer.phar require minz/apple-pay
```

使用
--

[](#使用)

```
// $receipt apple支付凭据
$receipt = request()->get('receipt');
// 内购商品id
$productId = request()->get('productId');
// notice 如果商品为续订类产品,password需要输入 提供的共享密码,否则无需传递参数
$applePay = new ApplePay($receipt, $password);
if ($applePay->verifyReceipt(true)) {
    $result = $applePay->query($productId, function ($tradeNo, $returnData) use ($productId) {
        // 检查此交易号是否被使用
        $transaction = Transaction::find($tradeNo);
        if ($transaction) {
            throw new Exception("此笔交易号已经被使用");
        }

        //进行本身业务操作
        DB::transaction(function () use ($tradeNo, $productId) {
            //.....
            //db操作
        });
        return true;
    });
    if (!$result) {
        throw new Exception("app上报productId与apple返回数据不统一");
    }
    // 验证成功...
    // return response
} else {
    throw new Exception("applePay验证异常,请关注");
}
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2151d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65171118862a58f868b5ddee97dbe50eb37ab8ed2835b81c2bdc1ddca67718ef?d=identicon)[minz](/maintainers/minz)

---

Top Contributors

[![minz](https://avatars.githubusercontent.com/u/15317432?v=4)](https://github.com/minz "minz (2 commits)")

---

Tags

Apple Pay

### Embed Badge

![Health badge](/badges/minz-apple-pay/health.svg)

```
[![Health](https://phpackages.com/badges/minz-apple-pay/health.svg)](https://phpackages.com/packages/minz-apple-pay)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[mollie/laravel-cashier-mollie

Laravel Cashier provides an expressive, fluent interface to Mollie's subscription billing services.

178204.3k1](/packages/mollie-laravel-cashier-mollie)

PHPackages © 2026

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