Beispiel #1
0
        public void OnPurchaseFailed(Product product, PurchaseFailureReason failureReason)
        {
            ShopThingDataReal prod = GetProductById(product.definition.id);

            if (prod != null)
            {
                FailedPurchaseMessage(prod.kProductID, prod.name);
            }

            // A product purchase attempt did not succeed. Check failureReason for more detail. Consider sharing this reason with the user.
            Debug.Log(string.Format("OnPurchaseFailed: FAIL. Product: '{0}', PurchaseFailureReason: {1}", product.definition.storeSpecificId, failureReason));
        }
Beispiel #2
0
        private void BuyProductID(string productId)
        {
            ShopThingDataReal prod = GetProductById(productId);

            if (prod != null)
            {
                prod.PurchaseEvent?.Invoke();
                GoodPurchaseMessage(productId, prod.name);
            }
            else
            {
                FailedPurchaseMessage(productId, prod.name);
            }
        }
Beispiel #3
0
 public ShopThingDataReal(ShopThingDataReal prod) : base(prod)
 {
     shopType      = prod.shopType;
     PurchaseEvent = prod.PurchaseEvent;
 }