Exemplo n.º 1
0
        public void RestoreTransaction(SKPaymentTransaction transaction)
        {
            var productId = transaction.OriginalTransaction.Payment.ProductIdentifier;

            AdViewController.Purchase(productId);
            FinishTransaction(transaction, true);
        }
Exemplo n.º 2
0
 public override void PaymentQueueRestoreCompletedTransactionsFinished(SKPaymentQueue queue)
 {
     if (queue.Transactions.Count() > 0)
     {
         InvokeOnMainThread(() => {
             AdViewController.Purchase(AdViewController.adRemovalProductId);
             UIAlertView alert = new UIAlertView("Note!",
                                                 "It may take a few moments for the ad removal to register as purchased.",
                                                 null, "OK", null);
             alert.Show();
         });
     }
     else
     {
         InvokeOnMainThread(() => {
             UIAlertView alert = new UIAlertView("Error",
                                                 "No prior purchase to restore.",
                                                 null, "Ok", null);
             alert.Show();
         });
     }
 }