Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SKPaymentTransaction: what is transactionDate exactly?

In Apple's documentation the transactionDate is:

The date the transaction was added to the App Store’s payment queue. (read-only)

I just want to clarify what the transactionDate will be in the following case:

  1. purchased something at time T1 (transactionDate is T1?)
  2. restored purchase at time T2 (transactionDate is T2 or T1?)
  3. originalTransaction of restored transaction, is its transactionDate T1 or T2?

Thanks!

like image 708
hzxu Avatar asked Jan 14 '13 22:01

hzxu


1 Answers

  1. purchased something at time T1 (transactionDate is T1?)

Yes. transactionDate is T1. Following apple's documentation:

transactionDate : The date the transaction was added to the App Store’s payment queue.


  1. restored purchase at time T2 (transactionDate is T2 or T1?)

Doesn't matter. If transactionState is set to SKPaymentTransactionStateRestored, you should read originalTransaction. Following apple's documentation:

originalTransaction : The contents of this property are undefined except when transactionState is set to SKPaymentTransactionStateRestored. When a transaction is restored, the current transaction holds a new transaction identifier, receipt, and so on. Your application will read this property to retrieve the restored transaction.


  1. originalTransaction of restored transaction, is its transactionDate T1 or T2?

T1.

like image 188
gbuzogany Avatar answered Dec 08 '22 17:12

gbuzogany