Download the PHP package protonlabs/ios-receipt-parser without Composer
On this page you can find all versions of the php package protonlabs/ios-receipt-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download protonlabs/ios-receipt-parser
More information about protonlabs/ios-receipt-parser
Files in protonlabs/ios-receipt-parser
Package ios-receipt-parser
Short Description Utility to parse Apple-issued PKCS#7 container with receipts
License MIT
Informations about the package ios-receipt-parser
Apple StoreKit receipt parser for PHP
This library is forked from cthulhu/ios-receipt-parser and mantained by Proton.
Description
This library can be used to parse Apple billing receipts without calling Apple servers. The parser is built in accordance with the official Apple documentation. More information can be found at the following links:
This parser is required, in particular, when you use the latest XCode features to test your billing flow since receipts generated using this method are signed by your local special-purpose certificate and can not be validated via Apple's own servers. In all other cases you should strongly prefer to validate all receipts against Apple servers.
Installation
You can install this library via Composer:
Usage
The main use case is to parse receipt generated by StoreKit locally. There is no need to validate the signatures.
Verifying signatures
It is possible to verify the signatures by passing to Parser
an instance of OpenSslProcessPkcs7Reader
(PKCS#7 reader).
At the momenr only this type of reader is implemented which requires you to:
- install
symfony/process
; - have
openssl
installed in your system; - set your PHP configuration to allow the execution of shell scripts.
The use of parseUsingOnlyTrustedCerts
guarantees that the signature in PKCS#7 has been validated against one of the certificates you have provided. The certificates are considered trusted (their own signatures are not verified). That means it is strongly suggested to pass to this function only trusted certificates.
Documentation
Check out the documentation for the library here.
Code coverage
Check out the code coverage for the library here.
Contributing
All contributions are welcome. Please see this page before you get started.
License
Project License can be found here.