Transaction() private method

private Transaction ( string productId, double amount, string currency ) : AnalyticsResult
productId string
amount double
currency string
return AnalyticsResult
コード例 #1
0
        public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature, bool usingIAPService)
        {
            if (string.IsNullOrEmpty(productId))
            {
                throw new ArgumentException("Cannot set productId to an empty or null string");
            }
            if (string.IsNullOrEmpty(currency))
            {
                throw new ArgumentException("Cannot set currency to an empty or null string");
            }
            UnityAnalyticsHandler unityAnalyticsHandler = GetUnityAnalyticsHandler();

            if (unityAnalyticsHandler == null)
            {
                return(AnalyticsResult.NotInitialized);
            }
            if (receiptPurchaseData == null)
            {
                receiptPurchaseData = string.Empty;
            }
            if (signature == null)
            {
                signature = string.Empty;
            }
            return(unityAnalyticsHandler.Transaction(productId, Convert.ToDouble(amount), currency, receiptPurchaseData, signature, usingIAPService));
        }
コード例 #2
0
        public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature)
        {
            UnityAnalyticsHandler unityAnalyticsHandler = Analytics.GetUnityAnalyticsHandler();

            if (unityAnalyticsHandler == null)
            {
                return(AnalyticsResult.NotInitialized);
            }
            return(unityAnalyticsHandler.Transaction(productId, Convert.ToDouble(amount), currency, receiptPurchaseData, signature));
        }
コード例 #3
0
        public static AnalyticsResult Transaction(string productId, decimal amount, string currency)
        {
            UnityAnalyticsHandler unityAnalyticsHandler = GetUnityAnalyticsHandler();

            if (unityAnalyticsHandler == null)
            {
                return(AnalyticsResult.NotInitialized);
            }
            return(unityAnalyticsHandler.Transaction(productId, Convert.ToDouble(amount), currency, null, null));
        }
コード例 #4
0
        public static AnalyticsResult Transaction(string productId, decimal amount, string currency, string receiptPurchaseData, string signature, bool usingIAPService)
        {
            UnityAnalyticsHandler unityAnalyticsHandler = Analytics.GetUnityAnalyticsHandler();
            AnalyticsResult       result;

            if (unityAnalyticsHandler == null)
            {
                result = AnalyticsResult.NotInitialized;
            }
            else
            {
                result = unityAnalyticsHandler.Transaction(productId, Convert.ToDouble(amount), currency, receiptPurchaseData, signature, usingIAPService);
            }
            return(result);
        }