Beispiel #1
0
 /// <summary>
 /// Constructor that initializes the members from the input parameters.
 /// </summary>
 /// <param name="productID"> The item's product identifier. </param>
 /// <param name="orderID"> The unique order identifier for the transaction. </param>
 /// <param name="packageName"> The package name of the app. </param>
 /// <param name="purchaseToken"> The token that uniquely identifies a purchase for a given item and user pair. </param>
 /// <param name="purchaseTime"> The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). </param>
 /// <param name="purchaseState"> The purchase state of the order. </param>
 public GooglePlayReceipt(string productID, string orderID, string packageName,
                          string purchaseToken, DateTime purchaseTime, GooglePurchaseState purchaseState)
 {
     this.productID     = productID;
     this.orderID       = orderID;
     this.packageName   = packageName;
     this.purchaseToken = purchaseToken;
     this.purchaseDate  = purchaseTime;
     this.purchaseState = purchaseState;
 }
Beispiel #2
0
        /// <summary>
        /// Constructor that initializes the members from the input parameters.
        /// </summary>
        /// <param name="productID"> The item's product identifier. </param>
        /// <param name="transactionID"> The ID  of the transaction. Obsolete. </param>
        /// <param name="orderID"> The unique order identifier for the transaction. </param>
        /// <param name="packageName"> The package name of the app. </param>
        /// <param name="purchaseToken"> The token that uniquely identifies a purchase for a given item and user pair. </param>
        /// <param name="purchaseTime"> The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). </param>
        /// <param name="purchaseState"> The purchase state of the order. </param>
        public GooglePlayReceipt(string productID, string transactionID, string orderID, string packageName,
                                 string purchaseToken, DateTime purchaseTime, GooglePurchaseState purchaseState)
        {
            this.productID = productID;
#pragma warning disable 618
            this.transactionID = transactionID;
#pragma warning restore 618
            this.orderID       = orderID;
            this.packageName   = packageName;
            this.purchaseToken = purchaseToken;
            this.purchaseDate  = purchaseTime;
            this.purchaseState = purchaseState;
        }
	public void SetState(string code) {
		int c = System.Convert.ToInt32(code);
		switch(c) {
		case 0:
			state = GooglePurchaseState.PURCHASED;
			break;
		case 1:
			state = GooglePurchaseState.CANCELED;
			break;
		case 2:
			state = GooglePurchaseState.REFUNDED;
			break;
		}
	}
    public void SetState(string code)
    {
        int c = System.Convert.ToInt32(code);

        switch (c)
        {
        case 0:
            state = GooglePurchaseState.PURCHASED;
            break;

        case 1:
            state = GooglePurchaseState.CANCELED;
            break;

        case 2:
            state = GooglePurchaseState.REFUNDED;
            break;
        }
    }
Beispiel #5
0
 public GooglePlayReceipt(string productID, string transactionID, string packageName,
                          string purchaseToken, DateTime purchaseTime, GooglePurchaseState purchaseState) :
     this(productID, transactionID, transactionID, packageName, purchaseToken, purchaseTime, purchaseState)
 {
 }
 public GooglePlayReceipt(string productID, string transactionID, string orderID, string packageName,
                          string purchaseToken, DateTime purchaseTime, GooglePurchaseState purchaseState)
 {
     throw new NotImplementedException();
 }