Transaction() private méthode

private Transaction ( string productId, double amount, string currency ) : AnalyticsResult
productId string
amount double
currency string
Résultat AnalyticsResult
Exemple #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));
        }
Exemple #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));
        }
Exemple #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));
        }
Exemple #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);
        }