Repository navigation
1.0.0
Pre-release
Pre-release
Added
iTunes\Validator: constantsENDPOINT_PRODUCTIONandENDPOINT_SANDBOX;
__construct($endpoint)(throwsRunTimeExceptionfor any other URL);
setReceiptData()/getReceiptData(), accepting either base64 or raw JSON (JSON is base64-encoded
for you);setEndpoint()/getEndpoint(); andvalidate($receiptData = null), which POSTs to
Apple's verifyReceipt endpoint with Guzzle 3 and returns aniTunes\Response. When the production
endpoint answers 21007 (sandbox receipt sent to production, as during App Review) the request is
automatically retried against the sandbox. A non-200 HTTP reply throwsRunTimeException.iTunes\Response: constantsRESULT_OK(0),RESULT_APPSTORE_CANNOT_READ(21000),
RESULT_DATA_MALFORMED(21002),RESULT_RECEIPT_NOT_AUTHENTICATED(21003),
RESULT_SHARED_SECRET_NOT_MATCH(21004),RESULT_RECEIPT_SERVER_UNAVAILABLE(21005),
RESULT_RECEIPT_VALID_BUT_SUB_EXPIRED(21006),RESULT_SANDBOX_RECEIPT_SENT_TO_PRODUCTION
(21007),RESULT_PRODUCTION_RECEIPT_SENT_TO_SENDBOX(21008, sic); methodsgetResultCode(),
setResultCode(),getReceipt(),isValid(),parseJsonResponse().GooglePlay\Validator:__construct(array $options)takingclient_id,client_secretand
refresh_token, caching the OAuth access token in/tmp/google_access_token.txt; chainable
setPackageName(),setPurchaseToken(),setProductId(); andvalidate(), returning the
Android Publisherinapppurchases->get()result, ornull(with the error echoed to stdout) on
failure.ReceiptValidator\RunTimeException, extending\Exception.- composer: package
aporat/store-receipt-validatorrequiring PHP>=5.4,guzzle/guzzle 3.8.*
andgoogle/apiclient 1.0.4-beta, with PSR-0 autoloading of theReceiptValidatornamespace from
src/.
Notes written from the code diff for this release; see CHANGELOG.md.