After successful purchase my app sends the transactionReceipt to server so that it is validated using https://buy.itunes.apple.com/verifyReceipt. .
Now i does the following.
- store the key in db
- if the status received is 0 php script add the sucbscription to the
user. - expire the key.,up to this its ok but he problem now is
if the user somehow submit the transactionReceipt which he has used for some other purchase and sent to our server .it also validate true if posted to https://buy.itunes.apple.com/verifyReceipt so he gets another subscription for free .
please help to solve this issue
Apple has a documentation about this issue here.
basically the verifyReceipt respond holds a
receiptfield with data about the original transaction. you need to check this data if it belongs to the right purchase and make sure, the customer does not get the purchase twice.