コード例 #1
0
ファイル: AdManager.cs プロジェクト: mfouquet/Gamebit
        public void RestoreTransaction(SKPaymentTransaction transaction)
        {
            var productId = transaction.OriginalTransaction.Payment.ProductIdentifier;

            AdViewController.Purchase(productId);
            FinishTransaction(transaction, true);
        }
コード例 #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();
         });
     }
 }