diff --git a/Runtime/GuruCore/Runtime/Analytics/Analytics.TemplateDefine.cs b/Runtime/GuruCore/Runtime/Analytics/Analytics.TemplateDefine.cs index 8cbec11..9f11fae 100644 --- a/Runtime/GuruCore/Runtime/Analytics/Analytics.TemplateDefine.cs +++ b/Runtime/GuruCore/Runtime/Analytics/Analytics.TemplateDefine.cs @@ -469,24 +469,18 @@ namespace Guru /// public static void FBPurchase(float revenue, string currency, string type, string platfrom) { - FBService.LogPurchase(revenue, currency, new Dictionary() + var data = new Dictionary() { { AppEventParameterName.Currency, USD }, { AppEventParameterName.ContentType, type }, - { ParameterAdPlatform, platfrom}, - }); + { ParameterAdPlatform, platfrom }, + }; + FBService.LogPurchase(revenue, currency, data); } - - /// - /// Facebook 支付上报 - /// - /// - /// - /// - /// - public static void FBPurchase(double value, string currency, string type, string platfrom) - => FBPurchase(value, currency, type, platfrom); + public static void FBPurchase(double revenue, string currency, string type, string platfrom) + => FBPurchase((float)revenue, currency, type, platfrom); + /// /// Google ARO买量点 /// diff --git a/Runtime/GuruCore/Runtime/IPM/Scripts/Requests/RefreshFirebaseTokenRequest.cs b/Runtime/GuruCore/Runtime/IPM/Scripts/Requests/RefreshFirebaseTokenRequest.cs index d750745..ce31327 100644 --- a/Runtime/GuruCore/Runtime/IPM/Scripts/Requests/RefreshFirebaseTokenRequest.cs +++ b/Runtime/GuruCore/Runtime/IPM/Scripts/Requests/RefreshFirebaseTokenRequest.cs @@ -14,6 +14,7 @@ namespace Guru var request = new UnityWebRequest(RequestURL, "POST"); //request.uploadHandler = new UploadHandlerRaw(); request.downloadHandler = new DownloadHandlerBuffer(); + Debug.Log($"[SDK] --- RefreshFirebaseTokenRequest :: contentTYpe: {IPMConfig.Header_Value_ContentType} AppID: {IPMConfig.IPM_X_APP_ID} UID: {IPMConfig.IPM_UID} AccessToken: {IPMConfig.IPM_TOKEN}"); request.SetRequestHeader(IPMConfig.Header_Param_ContentType, IPMConfig.Header_Value_ContentType); request.SetRequestHeader(IPMConfig.Header_Param_APPID, IPMConfig.IPM_X_APP_ID); request.SetRequestHeader(IPMConfig.Header_Param_UID, IPMConfig.IPM_UID); diff --git a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs index 91aa81c..fe0e266 100644 --- a/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs +++ b/Runtime/GuruIAP/Runtime/Code/IAPServiceBase.cs @@ -613,6 +613,7 @@ namespace Guru Analytics.LogCrashlytics(new Exception(msg)); } + LogI($"{Tag} --- Call OnBuyEnd [{productName}] :: {OnBuyEnd}"); OnBuyEnd?.Invoke(productName, success); OnPurchaseOver(success, productName); // 支付成功处理逻辑 ClearCurPurchasingProduct(); // 清除购买缓存 @@ -881,7 +882,7 @@ namespace Guru /// public static void SetIsIAPUser(bool value = true) { - if (Instance != null && Instance._model != null) + if (Instance != null && Instance._model != null && value) { Instance._model.SetIsIapUser(value); // 用户属性 }