PHPackages                             sn01615/i-os-receipt-validator-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. [Payment Processing](/categories/payments)
4. /
5. sn01615/i-os-receipt-validator-php

ActiveLibrary[Payment Processing](/categories/payments)

sn01615/i-os-receipt-validator-php
==================================

iOS ios in app purchase php class

v0.0.6(8y ago)0404PHP

Since Aug 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sn01615/iOS-Receipt-Validator-PHP)[ Packagist](https://packagist.org/packages/sn01615/i-os-receipt-validator-php)[ RSS](/packages/sn01615-i-os-receipt-validator-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Install
=======

[](#install)

```
composer require sn01615/i-os-receipt-validator-php
```

Usage
=====

[](#usage)

```
$data = new \stdClass();
$data->receipt = $_POST['receipt-data'];
$data->sandbox = $_POST['sandbox'];

$endpoint = $data->sandbox ? \itunesReceiptValidator::SANDBOX_URL : \itunesReceiptValidator::PRODUCTION_URL;

try {
    $rv = new \itunesReceiptValidator($endpoint, $data->receipt);

    $data->environment = ($rv->getEndpoint() === \itunesReceiptValidator::SANDBOX_URL) ? 'Sandbox' : 'Production';

    $data->info = $rv->validateReceipt();
    # TODO 业务逻辑处理

    $data->result = 'Success';
} catch (\Exception $ex) {
    $data->result = 'Fail';
}

print_r($data);
```

In App Purchase Receipt Validator - PHP
=======================================

[](#in-app-purchase-receipt-validator---php)

Host this on any box which is running PHP and has direct outbound web access and it will be able to validate iOS IAP receipts for you (Sandbox or Production environment configurable).

Feel free to use this code in anything you make, with the standard disclaimer that if it doesn't work / blows up the universe, you're on your own.

Alternatively, the latest version is hosted at:

This points to production.

There is a Sandbox version embedded here:

The PHP is rough, but it works - any forks / pull requests are more than welcome!!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3196d ago

### Community

Maintainers

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

---

Top Contributors

[![letharion](https://avatars.githubusercontent.com/u/494592?v=4)](https://github.com/letharion "letharion (6 commits)")[![sn01615](https://avatars.githubusercontent.com/u/7794149?v=4)](https://github.com/sn01615 "sn01615 (4 commits)")[![chrismaddern](https://avatars.githubusercontent.com/u/1068437?v=4)](https://github.com/chrismaddern "chrismaddern (3 commits)")[![DaveWoodCom](https://avatars.githubusercontent.com/u/1012467?v=4)](https://github.com/DaveWoodCom "DaveWoodCom (1 commits)")

### Embed Badge

![Health badge](/badges/sn01615-i-os-receipt-validator-php/health.svg)

```
[![Health](https://phpackages.com/badges/sn01615-i-os-receipt-validator-php/health.svg)](https://phpackages.com/packages/sn01615-i-os-receipt-validator-php)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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