PHPackages                             sn01615/apple-iap-php - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. sn01615/apple-iap-php

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

sn01615/apple-iap-php
=====================

iOS iap verify

v1.0.7(3y ago)121.4k—0%7MITPHP

Since Sep 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sn01615/apple-iap-php)[ Packagist](https://packagist.org/packages/sn01615/apple-iap-php)[ RSS](/packages/sn01615-apple-iap-php/feed)WikiDiscussions master Synced 1mo ago

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

ios-iap-php
===========

[](#ios-iap-php)

iOS支付验证

install
-------

[](#install)

```
composer require sn01615/apple-iap-php
```

use
---

[](#use)

```
use sn01615\iap\ios\Verify;

include "../vendor/autoload.php";

$cc = new Verify();
$receipt = ".."; // 凭据
$cc->endpoint(true);// 可选，切换到沙盒环境
$cc->setPassword('123');// 可选，如果是连续订阅需要密码
$cc->setExcludeOldTransactions(true);// 可选，将此值设置为，true以使响应仅包括任何订阅的最新续订交易。
                                     // 仅对包含自动续订的应用收据使用此字段。

$vv = $cc->query($receipt);

// 打印结果
var_dump($vv);

/**
// 返回示例
object(stdClass)#648 (3) {
  ["receipt"]=>
  object(stdClass)#666 (18) {
    ["receipt_type"]=>
    string(10) "Production"
    ["adam_id"]=>
    int(902861234)
    ["app_item_id"]=>
    int(902861234)
    ["bundle_id"]=>
    string(17) "com.xx.xxx"
    ["application_version"]=>
    string(3) "722"
    ["download_id"]=>
    int(75072419401234)
    ["version_external_identifier"]=>
    int(836721234)
    ["receipt_creation_date"]=>
    string(27) "2020-07-22 02:26:01 Etc/GMT"
    ["receipt_creation_date_ms"]=>
    string(13) "1595384761000"
    ["receipt_creation_date_pst"]=>
    string(39) "2020-07-21 19:26:01 America/Los_Angeles"
    ["request_date"]=>
    string(27) "2020-07-22 03:31:59 Etc/GMT"
    ["request_date_ms"]=>
    string(13) "1595388719760"
    ["request_date_pst"]=>
    string(39) "2020-07-21 20:31:59 America/Los_Angeles"
    ["original_purchase_date"]=>
    string(27) "2020-07-21 13:18:24 Etc/GMT"
    ["original_purchase_date_ms"]=>
    string(13) "1595337504000"
    ["original_purchase_date_pst"]=>
    string(39) "2020-07-21 06:18:24 America/Los_Angeles"
    ["original_application_version"]=>
    string(3) "722"
    ["in_app"]=>
    array(1) {
      [0]=>
      object(stdClass)#647 (11) {
        ["quantity"]=>
        string(1) "1"
        ["product_id"]=>
        string(24) "com.xx.xx.xx.xx"
        ["transaction_id"]=>
        string(15) "350000687123456"
        ["original_transaction_id"]=>
        string(15) "350000687123456"
        ["purchase_date"]=>
        string(27) "2020-07-22 02:25:25 Etc/GMT"
        ["purchase_date_ms"]=>
        string(13) "1595384725000"
        ["purchase_date_pst"]=>
        string(39) "2020-07-21 19:25:25 America/Los_Angeles"
        ["original_purchase_date"]=>
        string(27) "2020-07-22 02:25:25 Etc/GMT"
        ["original_purchase_date_ms"]=>
        string(13) "1595384725000"
        ["original_purchase_date_pst"]=>
        string(39) "2020-07-21 19:25:25 America/Los_Angeles"
        ["is_trial_period"]=>
        string(5) "false"
      }
    }
  }
  ["status"]=>
  int(0)
  ["environment"]=>
  string(10) "Production"
}

**/
```

参考链接
----

[](#参考链接)

#### Validating Receipts with the App Store

[](#validating-receipts-with-the-app-store)

[https://developer.apple.com/documentation/storekit/in-app\_purchase/validating\_receipts\_with\_the\_app\_store](https://developer.apple.com/documentation/storekit/in-app_purchase/validating_receipts_with_the_app_store)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

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

Every ~889 days

Total

2

Last Release

1193d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fd6cb8950d77fdebcef7c1cd1eac849e5610deddf19aa539f76b371ccaee152?d=identicon)[sn01615](/maintainers/sn01615)

---

Top Contributors

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

---

Tags

apple-iapiapiap-verificationiosios-iap

### Embed Badge

![Health badge](/badges/sn01615-apple-iap-php/health.svg)

```
[![Health](https://phpackages.com/badges/sn01615-apple-iap-php/health.svg)](https://phpackages.com/packages/sn01615-apple-iap-php)
```

###  Alternatives

[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)[rahul900day/laravel-captcha

Different types of Captcha implementation for Laravel Application.

10715.9k](/packages/rahul900day-laravel-captcha)[simplesamlphp/simplesamlphp-module-oidc

A SimpleSAMLphp module adding support for the OpenID Connect protocol

5016.9k1](/packages/simplesamlphp-simplesamlphp-module-oidc)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)[descope/descope-php

Descope SDK for PHP

3814.0k](/packages/descope-descope-php)[njoguamos/laravel-turnstile

A laravel wrapper for https://developers.cloudflare.com/turnstile/

2315.9k2](/packages/njoguamos-laravel-turnstile)

PHPackages © 2026

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