{"id":33977302,"url":"https://github.com/iamleehom/ios-iap-verification-php","last_synced_at":"2026-03-09T20:04:43.963Z","repository":{"id":62516691,"uuid":"64926237","full_name":"iamleehom/ios-iap-verification-php","owner":"iamleehom","description":"This PHP Class is help you to verification your Apple IAP receipt-data if your server is developed by PHP.","archived":false,"fork":false,"pushed_at":"2019-10-10T08:28:56.000Z","size":29,"stargazers_count":24,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"1.x","last_synced_at":"2025-12-14T14:58:29.634Z","etag":null,"topics":["apple","apple-iap","iap","iap-verification","ios-iap","ios-iap-verification","ios-php","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamleehom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-04T10:36:54.000Z","updated_at":"2024-09-27T07:16:51.000Z","dependencies_parsed_at":"2022-11-02T13:45:27.607Z","dependency_job_id":null,"html_url":"https://github.com/iamleehom/ios-iap-verification-php","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/iamleehom/ios-iap-verification-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamleehom%2Fios-iap-verification-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamleehom%2Fios-iap-verification-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamleehom%2Fios-iap-verification-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamleehom%2Fios-iap-verification-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamleehom","download_url":"https://codeload.github.com/iamleehom/ios-iap-verification-php/tar.gz/refs/heads/1.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamleehom%2Fios-iap-verification-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30310023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T17:35:44.120Z","status":"ssl_error","status_checked_at":"2026-03-09T17:35:43.707Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","apple-iap","iap","iap-verification","ios-iap","ios-iap-verification","ios-php","php"],"created_at":"2025-12-13T02:16:10.355Z","updated_at":"2026-03-09T20:04:43.931Z","avatar_url":"https://github.com/iamleehom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apple In App Purchase Verification With PHP\n[![Latest Stable Version](https://poser.pugx.org/leehom1988/ios-iap-verification-php/version)](https://packagist.org/packages/leehom1988/ios-iap-verification-php)\n[![Total Downloads](https://poser.pugx.org/leehom1988/ios-iap-verification-php/downloads)](https://packagist.org/packages/leehom1988/ios-iap-verification-php)\n[![Latest Unstable Version](https://poser.pugx.org/leehom1988/ios-iap-verification-php/v/unstable)](//packagist.org/packages/leehom1988/ios-iap-verification-php)\n[![License](https://poser.pugx.org/leehom1988/ios-iap-verification-php/license)](https://packagist.org/packages/leehom1988/ios-iap-verification-php) [![Join the chat at https://gitter.im/ios-iap-verification/Lobby](https://badges.gitter.im/ios-iap-verification/Lobby.svg)](https://gitter.im/ios-iap-verification/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThis PHP Class is help you to verification your Apple IAP receipt-data if your server is developed by PHP.\n\n## Installation\n\nIt's recommended that you use [Composer](https://getcomposer.org/) to install this library.\n\n```bash\n$ composer require leehom1988/ios-iap-verification-php\n```\n\nThis will install this library and all required dependencies. This library requires PHP 5.6.0 or newer.\n\n## Usage(English)\n\nCreate an Demo.php file with the following contents:\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\nuse LeeHom\\AppleInAppPurchaseVerification;\n\n// The receipt-data from apple\n$receiptData = 'MIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';\n// The password your own, if your IAP is not a subscription, let it empty string(like this:''), else use your own password\n$password = 'baXXXXXXXXXXXXXXXXXXXXXXXXX';\n\n$appleIAP = new AppleInAppPurchaseVerification($receiptData, $password, true);\n$result = $appleIAP-\u003evalidateReceipt();\necho $result;\n```\n\n## Usage(中文)\n\n创建一个名为Demo.php的文件，将以下内容拷贝至Demo.php文件中:\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\nuse LeeHom\\AppleInAppPurchaseVerification;\n\n// apple返回的支付参数 receipt-data\n$receiptData = 'MIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';\n// 如果产品类型为订阅型的，请使用校验需要的密码；如果不是订阅型的产品，请将其置为空字符串\n$password = 'baXXXXXXXXXXXXXXXXXXXXXXXXX';\n\n$appleIAP = new AppleInAppPurchaseVerification($receiptData, $password, true);\n$result = $appleIAP-\u003evalidateReceipt();\necho $result;\n```\n\n## View results:\n- Use PHP CLI, in the terminal windows, type the following contents:\n```bash\n$ php Demo.php start\n```\n- Directly access to your Demo.php file in your browser.\n\n## Status codes:\n- 21000\nThe App Store could not read the JSON object you provided.\n- 21002\nThe data in the receipt-data property was malformed or missing.\n- 21003\nThe receipt could not be authenticated.\n- 21004\nThe shared secret you provided does not match the shared secret on file for your account.\nOnly returned for iOS 6 style transaction receipts for auto-renewable subscriptions.\n- 21005\nThe receipt server is not currently available.\n- 21006\nThis receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response.\nOnly returned for iOS 6 style transaction receipts for auto-renewable subscriptions.\n- 21007\nThis receipt is from the test environment, but it was sent to the production environment for verification. Send it to the test environment instead.\n- 21008\nThis receipt is from the production environment, but it was sent to the test environment for verification. Send it to the production environment instead.\n\nFor Status codes more information, see [Apple Receipt Validation Programming Guide](https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html#//apple_ref/doc/uid/TP40010573-CH104-SW1).\n\n## Author:\nIf you have any question,Please be easy to contact me:\n- Name: [LeeHom](https://diandian.iamleehom.com/)\n- Email: lh411937409@gmail.com\n- [Website](https://diandian.iamleehom.com/)\n\nHope it can help You, Just Enjoy It! 😁😁😁😁\n- (If you like it, Star it!️⭐⭐️)\n- (喜欢就给个星星吧!⭐️⭐)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamleehom%2Fios-iap-verification-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamleehom%2Fios-iap-verification-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamleehom%2Fios-iap-verification-php/lists"}