I am currently testing my code to automatically renew my subscription. In most cases, it works as expected. But from time to time I see unexpected results.
I buy a new subscription, get a receipt (transaction_id = 1000000075229775). After receiving this receipt (before the expiration date), I send this receipt to sandbox.itunes.apple.com and return a new receipt with a different transaction identifier (last_receipt_info with transaction_id = 1000000075229779). I did not expect to receive this new receipt (with a different transaction identifier) ββbefore the first expiration date is reached. Here is an excerpt from both receipts. Please note that the expiration dates are very close (the difference is less than one second).
Could you help me understand what is happening?
Thanks.
["receipt"]=>object(stdClass)#14 (19) { ["original_purchase_date_pst"]=>string(39) "2012-12-03 08:20:49 America/Los_Angeles" ["unique_identifier"]=>string(40) "af430ef98d6bdbbf92ed34e4addec2e834bc25d6" ["original_transaction_id"]=>string(16) "1000000059708880" ["expires_date"]=>string(13) "1369421691100" ["transaction_id"]=>string(16) "1000000075229775" ["quantity"]=>string(1) "1" ["expires_date_formatted"]=>string(27) "2013-05-24 18:54:51 Etc/GMT" ["purchase_date"]=>string(27) "2013-05-24 18:49:51 Etc/GMT" ["purchase_date_ms"]=>string(13) "1369421391100" ["original_purchase_date"]=>string(27) "2012-12-03 16:20:49 Etc/GMT" ["original_purchase_date_ms"]=>string(13) "1354551649000" ... } ["latest_receipt_info"]=>object(stdClass)#12 (19) { ["original_purchase_date_pst"]=>string(39) "2012-12-03 08:20:49 America/Los_Angeles" ["unique_identifier"]=>string(40) "345fade172e62c805d0d354edda97575fc9b9d50" ["original_transaction_id"]=>string(16) "1000000059708880" ["expires_date"]=>string(13) "1369421691000" ["transaction_id"]=>string(16) "1000000075229779" ["quantity"]=>string(1) "1" ["expires_date_formatted"]=>string(27) "2013-05-24 18:54:51 Etc/GMT" ["purchase_date"]=>string(27) "2013-05-24 18:49:51 Etc/GMT" ["purchase_date_ms"]=>string(13) "1369421391000" ["original_purchase_date"]=>string(27) "2012-12-03 16:20:49 Etc/GMT" ["original_purchase_date_ms"]=>string(13) "1354551649000" ... } ["status"]=>int(0)
source share