PHPackages                             simplephp/iap-service - 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. simplephp/iap-service

ActiveLibrary[Payment Processing](/categories/payments)

simplephp/iap-service
=====================

IAP-Service 组件集成了苹果(apple)、华为(huawei)应用内支付服务(IAP)，统一封装 IAP 服务器 REST API，封装 IAP 服务端通知，方便开发者快速集成支付功能，专注业务开发。

v1.0.4(1y ago)294↓94.4%1MITPHPPHP ^7.1

Since Nov 13Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/simplephp/iap-service)[ Packagist](https://packagist.org/packages/simplephp/iap-service)[ RSS](/packages/simplephp-iap-service/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (6)Used By (0)

介绍
--

[](#介绍)

---

IAP-Service 组件集成了苹果(apple)、华为(huawei)应用内支付服务(IAP)，统一封装 IAP 服务器 REST API，封装 IAP 服务端通知，方便开发者快速集成支付功能，专注业务开发。

环境依赖
----

[](#环境依赖)

---

- PHP &gt;= 7.1.2
- ext-json
- ext-curl
- ext-openssl
- guzzlehttp/guzzle: ^6.5 || ^7.0
- phpseclib/phpseclib: ^3.0
- firebase/php-jwt: ^6.10

安装
--

[](#安装)

---

1、通过命令行下安装：

```
composer require "simplephp/iap-service:1.0.*"
```

2、通过项目下composer.json文件配置方式安装：

```
"require": {
    "simplephp/iap-service": "1.0.*"
}
```

食用
--

[](#食用)

---

1、配置详解

```
$config = [
    'apple' => [
        'default' => [
            'leaf_cert_oid' => '1.2.***.6.11.1',
            'kid' => 'D37***2LT',
            'bundle_id' => 'com.****.bundler',
            'issuer_id' => '69a6-***-a4d1',
            'private_key_path' => __DIR__ . '/cert/SubscriptionKey_****.p8',
        ]
    ],
];
```

2、集成示例 (示例详情请查看examples目录)

```
├── examples
│   ├── ....
│   ├── app_store_notify.php      // apple iap 事件通知示例
│   ├── app_store_server_api.php  // apple iap rest api 示例
│   └── huawei_server_api.php     // huawei iap rest api 示例
│   └── huawei_server_notify.php  // huawei iap 事件通知示例
├── ...
```

说明
--

[](#说明)

---

- [App Store IAP-事件通知](./apple_storekit2_readme.md)
- [Huawei IAP-事件通知](./huawei_iap_readme.md)
- 大自然的搬运工,相关接口文档请查看官方文档
    - [App Store-服务器通知](https://developer.apple.com/documentation/AppStoreServerNotifications)
    - [App Store-应用商店服务器 API](https://developer.apple.com/documentation/appstoreserverapi)
    - [华为-服务器通知](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/iap-key-event-notifications-V5)
    - [华为-应用商店服务器 API](https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/iap-rest-V5)
- 有问题请提issues, 有能力的朋友请提交PR, 谢谢！

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance46

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 73.3% 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

Every ~9 days

Total

5

Last Release

562d ago

### Community

Maintainers

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

---

Top Contributors

[![simplephp](https://avatars.githubusercontent.com/u/5026959?v=4)](https://github.com/simplephp "simplephp (11 commits)")[![seekcx](https://avatars.githubusercontent.com/u/8244814?v=4)](https://github.com/seekcx "seekcx (4 commits)")

---

Tags

appleIn App Purchaseiaphuawei

### Embed Badge

![Health badge](/badges/simplephp-iap-service/health.svg)

```
[![Health](https://phpackages.com/badges/simplephp-iap-service/health.svg)](https://phpackages.com/packages/simplephp-iap-service)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M889](/packages/laravel-socialite)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6544.0M13](/packages/aporat-store-receipt-validator)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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