public SW_VerifyPurchaseJob WaitForPurchaseComplete() { SW_VerifyPurchaseJob j = new SW_VerifyPurchaseJob(); AddJob(j); return(j); }
void DoPurchase() { // Set the state m_State = PurchaseState.PurchasingProduct; // Open the purchase confirmation PurchaseSystem.Instance.Display(Happiness.Game.AccountId, m_Products[m_iSelectedProduct].ProductID); // Querry the server for the credits/vip m_VerifyPurchase = Happiness.Game.ServerWriter.WaitForPurchaseComplete(); }
void DoPurchase() { // Set the state m_State = PurchaseState.PurchasingProduct; // Open the browser #if DEBUG string host = "localhost:8080"; #else string host = "www.ronzgames.com/braintree"; #endif string url = string.Format("http://{0}/purchase?uid={1}&pid={2}", host, Happiness.Game.AccountId, m_Products[m_iSelectedProduct].ProductID); System.Diagnostics.Process.Start(url); // Querry the server for the credits/vip m_VerifyPurchase = Happiness.Game.ServerWriter.WaitForPurchaseComplete(); }
public void Update(GameTime gameTime) { if (m_State == PurchaseState.FetchingProducts) { if (m_ProductsRequest != null && m_ProductsRequest.Finished) { SetupProducts(m_ProductsRequest.Products); m_ProductsRequest.Destroy(); m_ProductsRequest = null; } } if (m_State == PurchaseState.PurchasingProduct) { if (m_VerifyPurchase != null && m_VerifyPurchase.Finished) { m_State = PurchaseState.PurchaseComplete; m_CancelButton.Text = "Close"; m_VerifyPurchase.Destroy(); m_VerifyPurchase = null; } } }