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)); }
private void BuyProductID(string productId) { ShopThingDataReal prod = GetProductById(productId); if (prod != null) { prod.PurchaseEvent?.Invoke(); GoodPurchaseMessage(productId, prod.name); } else { FailedPurchaseMessage(productId, prod.name); } }
public ShopThingDataReal(ShopThingDataReal prod) : base(prod) { shopType = prod.shopType; PurchaseEvent = prod.PurchaseEvent; }