예제 #1
0
파일: Buyiap.cs 프로젝트: Gamepie/Split.Up
 private void OnDidFinishTransaction(BillingTransaction _transaction)
 {
     if (_transaction != null)
     {
         if (_transaction.VerificationState == eBillingTransactionVerificationState.SUCCESS)
         {
             if (_transaction.TransactionState == eBillingTransactionState.PURCHASED)
             {
                 Adsbought = true;
                 theFSM.FsmVariables.GetFsmBool("Adsboughtfsm").Value = Adsbought;
             }
         }
     }
 }
		protected void DidFinishBillingTransaction (BillingTransaction[] _finishedTransactions, string _error)
		{
			Console.Log(Constants.kDebugTag, "[Billing] Billing transaction finished");
		
			// Backward compatibility event support
#pragma warning disable
			if (TransactionFinishedEvent != null)
				TransactionFinishedEvent(_finishedTransactions == null ? null : new List<BillingTransaction>(_finishedTransactions));
#pragma warning restore

			// Event triggered
			if (DidReceiveTransactionInfoEvent != null)
				DidReceiveTransactionInfoEvent(_finishedTransactions, _error);
		}
 private void OnDidFinishProductPurchase(BillingTransaction _transaction)
 {
     if (_transaction.VerificationState == eBillingTransactionVerificationState.FAILED)
     {
         OnProductPurchaseFailed(_transaction);
     }
     else
     {
         if (_transaction.TransactionState == eBillingTransactionState.PURCHASED)
         {
             OnProductPurchased(_transaction);
         }
         else
         {
             OnProductPurchaseFailed(_transaction);
         }
     }
 }
        private void OnDidFinishProductPurchase(BillingTransaction _transaction)
        {
            string _productID = _transaction.ProductIdentifier;

            // Based on receipt verification, report event
            if (_transaction.VerificationState == eBillingTransactionVerificationState.SUCCESS)
            {
                if (_transaction.TransactionState == eBillingTransactionState.PURCHASED)
                {
                    BillingProduct _productInfo = NPBinding.Billing.GetStoreProduct(_productID);

                    if (_productInfo == null)
                    {
                        DebugUtility.Logger.Log(Constants.kDebugTag, "[SoomlaGrow] The operation could not be completed because product information is not available.");
                    }
                    else
                    {
                        ReportOnBillingPurchaseFinished(_productID, (long)(_productInfo.Price * 1000000), _productInfo.CurrencyCode);
                    }
                }
                else if (_transaction.TransactionState == eBillingTransactionState.FAILED)
                {
                    if (_productID == null)
                    {
                        DebugUtility.Logger.Log(Constants.kDebugTag, "[SoomlaGrow] The operation could not be completed because product identifier information is not available.");
                    }
                    else
                    {
                        ReportOnBillingPurchaseFailed(_productID);
                    }
                }
            }
            else if (_transaction.VerificationState == eBillingTransactionVerificationState.FAILED)
            {
                ReportOnBillingPurchaseVerificationFailed();

                return;
            }
        }
예제 #5
0
        private IList GetFinishedTransactionIdentifiers(BillingTransaction[] _transactions)
        {
            int _count = _transactions.Length;

            List <string> _transactionIDs = new List <string>(_count);

            for (int _iter = 0; _iter < _count; _iter++)
            {
                BillingTransaction _transaction = _transactions[_iter];

                if (string.IsNullOrEmpty(_transaction.TransactionIdentifier))
                {
                    continue;
                }

                if (_transaction.VerificationState == eBillingTransactionVerificationState.SUCCESS)
                {
                    _transactionIDs.Add(_transaction.TransactionIdentifier);
                }
            }

            return(_transactionIDs);
        }
예제 #6
0
 protected override void ParseTransactionData(IDictionary _transactionDict, out BillingTransaction _transaction)
 {
     _transaction = new AndroidBillingTransaction(_transactionDict);
 }
 public abstract void OnProductPurchaseFailed(BillingTransaction _transaction);
		protected override void ParseTransactionData (IDictionary _transactionDict, out BillingTransaction _transaction)
		{
			_transaction	= new iOSBillingTransaction(_transactionDict);
		}
예제 #9
0
 public override void CustomVerificationFinished(BillingTransaction _transaction)
 {
     //Nothing to do here. Not supporting external validation for android. //TODO - This needs original payload to verify
     Console.Log(Constants.kDebugTag, "[Billing] Android has done its validation already internally after purchase. so this call have no effect on Android");
 }
예제 #10
0
 public override void CustomVerificationFinished(BillingTransaction _transaction)
 {
     customVerificationFinished(_transaction.ProductIdentifier, (int)_transaction.TransactionState, (int)_transaction.VerificationState);
 }
예제 #11
0
		/// <summary>
		/// This adds the specified billing transaction to the inventory of purchased products.
		/// </summary>
		///	<remarks>
		///	\note	iOS has external validation option. So once external validation is done, this should be called with the transaction details.
		///	On Android this call has no effect as the products are internally verified and products will be updated internally right after the purchase.
		///	</remarks>
		/// <param name="_transaction">Transaction instance thats updated with verification state after custom verification.</param>
		public virtual void CustomVerificationFinished (BillingTransaction _transaction)
		{}
		public override void CustomVerificationFinished (BillingTransaction _transaction)
		{
			//Nothing to do here. Not supporting external validation for android. //TODO - This needs original payload to verify
			Console.Log(Constants.kDebugTag, "[Billing] Android has done its validation already internally after purchase. so this call have no effect on Android");
		}
예제 #13
0
 public override void CustomVerificationFinished(BillingTransaction _transaction)
 {
     EditorStore.CustomVerificationFinished(_transaction);
 }
예제 #14
0
 public void CustomVerificationFinished(BillingTransaction _transaction)
 {
 }
예제 #15
0
		protected virtual void ParseTransactionData (IDictionary _transactionDict, out BillingTransaction _transaction)
		{
			_transaction	= null;
		}
		public override void CustomVerificationFinished (BillingTransaction _transaction)
		{
			EditorStore.CustomVerificationFinished(_transaction);
		}
예제 #17
0
		public override void CustomVerificationFinished (BillingTransaction _transaction)
		{
			customVerificationFinished(_transaction.ProductIdentifier, (int)_transaction.TransactionState, (int)_transaction.VerificationState);
		}