public static Transaction ( string productId, decimal amount, string currency ) : AnalyticsResult | ||
productId | string | The id of the purchased item. |
amount | decimal | The price of the item. |
currency | string | Abbreviation of the currency used for the transaction. For example “USD” (United States Dollars). See http:en.wikipedia.orgwikiISO_4217 for a standardized list of currency abbreviations. |
return | AnalyticsResult |
public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature, bool usingIAPService) { bool flag = string.IsNullOrEmpty(productId); if (flag) { throw new ArgumentException("Cannot set productId to an empty or null string"); } bool flag2 = string.IsNullOrEmpty(currency); if (flag2) { throw new ArgumentException("Cannot set currency to an empty or null string"); } bool flag3 = !Analytics.IsInitialized(); AnalyticsResult result; if (flag3) { result = AnalyticsResult.NotInitialized; } else { bool flag4 = receiptPurchaseData == null; if (flag4) { receiptPurchaseData = string.Empty; } bool flag5 = signature == null; if (flag5) { signature = string.Empty; } result = Analytics.Transaction(productId, Convert.ToDouble(amount), currency, receiptPurchaseData, signature, usingIAPService); } return(result); }
public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature) { return(Analytics.Transaction(productId, amount, currency, receiptPurchaseData, signature, false)); }
public static AnalyticsResult Transaction(string productId, decimal amount, string currency) { return(Analytics.Transaction(productId, amount, currency, null, null, false)); }