/// <summary> /// Called when the transaction status is updated /// </summary> public override void UpdatedTransactions(SKPaymentQueue queue, SKPaymentTransaction[] transactions) { Console.WriteLine("UpdatedTransactions"); foreach (SKPaymentTransaction transaction in transactions) { switch (transaction.TransactionState) { case SKPaymentTransactionState.Purchased: if (transaction.Downloads != null && transaction.Downloads.Length > 0) { // complete the transaction AFTER downloading SKPaymentQueue.DefaultQueue.StartDownloads(transaction.Downloads); } else { // complete the transaction now theManager.CompleteTransaction(transaction); } break; case SKPaymentTransactionState.Failed: theManager.FailedTransaction(transaction); break; case SKPaymentTransactionState.Restored: theManager.RestoreTransaction(transaction); break; default: break; } } }
// called when the transaction status is updated public override void UpdatedTransactions(SKPaymentQueue queue, SKPaymentTransaction[] transactions) { Console.WriteLine("UpdatedTransactions"); foreach (SKPaymentTransaction transaction in transactions) { switch (transaction.TransactionState) { case SKPaymentTransactionState.Purchased: theManager.CompleteTransaction(transaction); break; case SKPaymentTransactionState.Failed: theManager.FailedTransaction(transaction); break; case SKPaymentTransactionState.Restored: theManager.RestoreTransaction(transaction); break; default: break; } } }