Note that there are some explanatory texts on larger screens.

plurals
  1. POAuto renewable subscription on iOS7 with sandbox
    primarykey
    data
    text
    <p>&nbsp;&nbsp;&nbsp;&nbsp;In <code>iOS6</code>, when we purchase a product, we can get a receipt from transaction. Then we send this receipt to app store and verify. If verification result is <code>valid(status=0)</code>, a <code>base64-encoded</code> string named <code>latest_receipt</code> will be returned. Then we can store and use this new encoded receipt to do verification next time.</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;Everything is just fine until changing to <code>iOS7</code>. Receipt in transaction is deprecated, instead, we need to get receipt file path using <code>[[NSBundle MainBundle] appStoreReceiptURL]</code>. The same, I encode this receipt data and send it to app store for verifying. Of course, the <code>latest_receipt</code> is returned. Then I try to send this <code>latest_receipt</code> to app store for verify again, I got a very strange result without <code>latest_receipt_info</code> and <code>latest_receipt</code>. The most weird thing is that the status is 0. </p> <pre><code>{ "status": 0, "environment": "Sandbox", "receipt": { "receipt_type": "ProductionSandbox", "adam_id": 0, "bundle_id": "com.abcde.myapp", "application_version": "1.0", "download_id": 0, "request_date": "2013-10-02 02:51:45 Etc/GMT", "request_date_ms": "1380682305478", "request_date_pst": "2013-10-01 19:51:45 America/Los_Angeles", "in_app": [ ] } </code></pre> <p>Instead, if I always get receipt from <code>appStoreReceiptURL</code> and send it to app store, I can get the normal result. But when the subscription expired, status code <code>21006</code> will not be returned. This is another weird thing. Do I need to check all the receipts to confirm the validity of user?</p> <p>Could somebody know what happen? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload