mattt/CargoBay — pull request #7 by lxcid (2012-11-19 06:34:12+00:00)
Title: Receipt verification overhaul

This pull request is related to Issue #5.

Hi mattt,

For bb9695f, I think it should be a POST request instead of a GET request.

Under [Verifying a Receipt with the App Store](http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html%23//apple_ref/doc/uid/TP40008267-CH104-SW3),

> 3\. Post the JSON object to the App Store using an HTTP POST request. The URL for the store is https://buy.itunes.apple.com/verifyReceipt.

For 9ee5aa3, I was thinking of providing the interface (as oppose to storing it as a property) to allow verifying of receipt with password (shared secret) for auto-renewable subscription.

Under [Verifying an Auto-renewable Subscription Receipt](http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/RenewableSubscriptions/RenewableSubscriptions.html%23//apple_ref/doc/uid/TP40008267-CH4-SW5),

> Verifying a receipt for an auto-renewable subscription is almost identical to the process described in “Verifying Store Receipts.” Your application creates a JSON object and posts it to the App Store. The JSON object for an auto-renewable subscription receipt must include a second parameter — the shared secret you created earlier on iTunes Connect:
>
> {
> "receipt-data" : "(receipt bytes here)",
> "password" : "(shared secret bytes here)"
> }

They are not tested yet though. I will get back soon (By tonight or tomorrow) if there's any more issue.

Cheers! :D