Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SKPaymentTransaction.originalTransaction.transactionReceipt is nil

I am developing an app which has a Auto-renewable in-app purchase subscriptions option. Also the app has a 'Restore' option, the purpose of it is to restore the previous transactions.

But I am facing an issue in restoring, I am getting the 'transactionReceipt' as nil for the originalTransaction for every restored transaction. i.e "SKPaymentTransaction.originalTransaction.transactionReceipt" is received as nil. There by my validation of transaction receipt against AppStore is not getting happened.

Is anybody facing the same issue?

Any inputs would help me greatly.

Please note that I am testing the In-App purchase in Sandbox environment.

Thanks in advance, Vasu N

like image 750
Vasu N Avatar asked Nov 16 '11 13:11

Vasu N


1 Answers

I was having the same issue, so what I did was test the [transaction transactionReceipt] and Apple verifies it. Not sure if this is the correct way or not, but at least I am getting it verified by Apple. That is really all I care about as long as I can verify it isn't a fraudulent transaction I am happy.

The documentation says you should be able to get orig receipt but I have not been able to do so, I always find it == nil.

like image 64
c0d3p03t Avatar answered Oct 10 '22 13:10

c0d3p03t