public Purchase CreatePurchase(PremiumProduct _product) { AndroidPurchase purchase = new AndroidPurchase(this); purchase.product = _product; this.currentPurchase = purchase; return(this.currentPurchase); }
private void EndPurchase(AndroidPurchase _purchase) { if ((_purchase.State == EPurchaseState.Commited) && (_purchase.GooglePurchase != null)) { GoogleIAB.consumeProduct(_purchase.GooglePurchase.productId); } else if (this.currentPurchase == _purchase) { this.currentPurchase = null; } }