예제 #1
0
    private WP8PurchseResponce GetPurchaseResponseFromString(string data)
    {
        string[] storeData;
        storeData = data.Split("|" [0]);

        WP8PurchaseCodes code      = (WP8PurchaseCodes)Enum.Parse(typeof(WP8PurchaseCodes), storeData[0]);
        string           info_str  = storeData[1];
        string           productID = storeData[2];

        if (code == WP8PurchaseCodes.SUCCSES)
        {
            foreach (WP8ProductTemplate product in _products)
            {
                if (product.ProductId == productID && product.Type == WP8PurchaseProductType.Durable)
                {
                    product.isPurchased = true;
                }
            }
        }

        WP8PurchseResponce recponce = new WP8PurchseResponce(code, info_str);

        recponce.productId = productID;

        return(recponce);
    }
    private void ProductPurchseDelegate(string data)
    {
        string[] storeData;
        storeData = data.Split("|" [0]);

        WP8PurchaseCodes code      = (WP8PurchaseCodes)Enum.Parse(typeof(WP8PurchaseCodes), storeData[0]);
        string           info_str  = storeData[1];
        string           productID = storeData[2];

        if (code == WP8PurchaseCodes.SUCCSES)
        {
            foreach (WP8ProductTemplate product in _products)
            {
                if (product.ProductId == productID && product.Type == WP8PurchaseProductType.Durable)
                {
                    product.isPurchased = true;
                }
            }
        }

        WP8PurchseResponce recponce = new WP8PurchseResponce(code, info_str);

        recponce.productId = productID;

        OnPurchaseFinished(recponce);
        dispatch(PRODUCT_PURCHASE_FINISHED, recponce);
    }
예제 #3
0
	public WP8PurchseResponce(WP8PurchaseCodes c, string val) {
		_code = c;
		if(IsSuccses) {
			_receipt = val;
		} else {
			_error = val;
		}
		
	}
예제 #4
0
 public WP8PurchseResponce(WP8PurchaseCodes c, string val)
 {
     _code = c;
     if (IsSuccses)
     {
         _receipt = val;
     }
     else
     {
         _error = val;
     }
 }
예제 #5
0
 public WP8PurchseResponce(WP8PurchaseCodes code, string id)
 {
     _code      = code;
     _productId = id;
 }