@Gops90 : No, the IAP code has not been tested in the production environment.
The validation logic for each IAP receipt is as follows: if the cancellation date (1712) is newer than its purchase date (1704), then the content is blocked.
For the purchase-refund-purchase scenario (in the Xcode test environment), there is no second IAP receipt. I would expect the original IAP receipt to be updated to something like:
• 1703 (transaction ID): Shows the ID of the second purchase
• 1704 (purchase date): Shows the date of the second purchase
• 1712 (cancellation date field): Shows the refund date
This may well be an Xcode test issue. I also found that Ask-to-Buy can trigger multiple IAP receipts - https://developer.apple.com/forums/thread/676580 (and customer charges?) for the same non-consumable.
Topic:
App & System Services
SubTopic:
StoreKit
Tags: