コード例 #1
0
    private void OnPlayFabSignupError(PlayFabError obj)
    {
        LogMessage(obj.GenerateErrorReport());
        var sb = new System.Text.StringBuilder();

        foreach (var kv in obj.ErrorDetails)
        {
            sb.Append(kv.Key);
            sb.Append(": ");
            sb.Append(string.Join(", ", kv.Value.ToArray()));
            sb.Append(" | ");
        }

        usernameSignupText.text = "" + sb;
    }
コード例 #2
0
ファイル: DeviceLogin.cs プロジェクト: afarukcali/card-game
    private void OnTransferLinkError(PlayFabError error)
    {
        TextMeshProUGUI errorMessage = menuManager.infoPanels[2].transform.Find("Error Text").GetComponent <TextMeshProUGUI>();

        if (error.Error == PlayFabErrorCode.ServiceUnavailable)
        {
            menuManager.ShowPanel(menuManager.infoPanels[3]);
            menuManager.serverCover.DisableAnimations();
        }
        else
        {
            HideConnectingLayer();
            errorMessage.text = error.ErrorMessage;
        }
        Debug.LogError(error.GenerateErrorReport());
    }
コード例 #3
0
ファイル: NicknameUpdate.cs プロジェクト: kunana/AOS
    private void DisplayNameUpdateFailure(PlayFabError error)
    {
        //print("DisplayName 업데이트에 실패");
        print(error.GenerateErrorReport());

        if (error.ErrorMessage == "Invalid input parameters")
        {
            ErrorText.text = "소환사 이름을 다시 확인해주세요.";
        }
        else if (error.ErrorMessage == "Name not available")
        {
            ErrorText.text = "소환사 이름이 중복되었습니다.";
        }

        Input_nickname.ActivateInputField();
    }
コード例 #4
0
    public void PayForPurchase(Action <PayForPurchaseResult> onResult, Action <PlayFabError> onError)
    {
        if (!CanPayForPurchase())
        {
            Debug.LogWarning("Tried paying for purchase when state was " + state);
            return;
        }

        PaymentOption paypalPaymentOption = null;

        for (int i = 0, len = startPurchaseResult.PaymentOptions.Count; i < len; ++i)
        {
            if (startPurchaseResult.PaymentOptions[i].ProviderName == PAYPAL_PROVIDER)
            {
                paypalPaymentOption = startPurchaseResult.PaymentOptions[i];
                break;
            }
        }

        if (paypalPaymentOption == null)
        {
            state = PlayfabPurchaserState.MissingPaymentOptionError;
            return;
        }

        PlayFabClientAPI.PayForPurchase(new PayForPurchaseRequest()
        {
            OrderId      = startPurchaseResult.OrderId,
            ProviderName = paypalPaymentOption.ProviderName,
            Currency     = paypalPaymentOption.Currency
        },
                                        result =>
        {
            payForPurchaseResult = result;
            state   = PlayfabPurchaserState.ConfirmPurchase;
            orderId = result.OrderId;
            Debug.Log("Pay for purchase success, order Id" + result.OrderId);
            onResult(result);
        },
                                        error =>
        {
            this.error = error;
            state      = PlayfabPurchaserState.PayForPurchaseError;
            Debug.Log("Start purchase error\n" + error.GenerateErrorReport());
            onError(error);
        });
    }
コード例 #5
0
ファイル: IAPCore.cs プロジェクト: Skilled-Tech/Tactical-War
        void GoogleValidateResponseCallback(ValidateGooglePlayPurchaseResult result, PlayFabError error)
        {
            Google.Validate.OnResponse -= GoogleValidateResponseCallback;

            if (error == null)
            {
                Debug.Log("Successfully Validated IAP Purchase");

                ValidateAction();
            }
            else
            {
                Debug.LogError("Error Validating IAP, report: " + error.GenerateErrorReport());

                ErrorCallback(error.ErrorMessage);
            }
        }
コード例 #6
0
    private void OnRegisterFailure(PlayFabError error)
    {
        Debug.LogWarning("PlayFab - Register Failed");
        Debug.LogError("Here's some debug information:");
        Debug.LogError(error.GenerateErrorReport());
        DebugText.text += "\nPlayFab - Register Failed || " + error;

        /*switch (error.HttpCode)
         * {
         *  case 1009:
         *      //UsernameNotAvailable
         *      errorText.GetErrorKey(0);
         *      break;
         *  case 1008:
         *      //InvalidPassword
         *      errorText.GetErrorKey(1);
         *      break;
         *  case 1007:
         *      //InvalidUsername
         *      errorText.GetErrorKey(2);
         *      break;
         *  default:
         *      break;
         * }*/
        switch (error.Error)
        {
        case PlayFabErrorCode.UsernameNotAvailable:
            errorText.GetErrorKey(0);
            break;

        case PlayFabErrorCode.InvalidParams:
            errorText.GetErrorKey(4);
            break;

        case PlayFabErrorCode.InvalidPassword:
            errorText.GetErrorKey(1);
            break;

        case PlayFabErrorCode.InvalidUsername:
            errorText.GetErrorKey(2);
            break;

        default:
            break;
        }
    }
コード例 #7
0
    private void onConfirmError(PlayFabError error)
    {
        //Debug.LogWarning("Something went wrong with your purchase call.  :(");
        Debug.Log("On Confirmation: Here's some debug information:");
        Debug.Log(error.GenerateErrorReport());


        if (iCountRetry <= iMaxCount)
        {
            StartCoroutine(CheckPurchaseCoroutine(5f));
        }
        else
        {
            uxPlayFab.UpdatePaymentText("When you have finished making payment through PayPal\n\nclick the button below");
            uxPlayFab.ShowTryAgainButton();
        }

        //error.ErrorMessage;
    }
コード例 #8
0
    public void OnLoginFailure(PlayFabError error)
    {
        Debug.Log(error.GenerateErrorReport());
        loginErrorMessage = "";
        var details = error.ErrorDetails;

        if (details != null)
        {
            foreach (var list in details.Values)
            {
                loginErrorMessage += list[0];
            }
        }
        else
        {
            loginErrorMessage = error.ErrorMessage;
        }
        SceneManager.LoadScene("LoginMenu");
    }
コード例 #9
0
ファイル: Auth.cs プロジェクト: deathsaber92/MavensTrip
    /// <summary>
    /// Happens when the login fails
    /// </summary>
    /// <param name="obj"></param>
    private void OnGoogleAccountLoginResultFailed(PlayFabError obj)
    {
        debugReporter.text = debugReporter.text + "\n" + "OnGoogleAccountLoginResultFailed() : Failed to create account with GPG: " + obj.ErrorMessage;
        connectingAnimation.SetActive(false);

        PlayGamesPlatform.Instance.GetAnotherServerAuthCode(true, code =>
        {
            authCode           = code;
            debugReporter.text = debugReporter.text + "\n" + "LinkGoogleAccount() : Refreshed auth code";
        });

        if (obj.GenerateErrorReport().Contains("destination host"))
        {
            FindObjectOfType <ShowErrorMessageController>().SetErrorMessage("NETWORK CONNECTION FAILED! PLEASE MAKE SURE YOU HAVE AN ACTIVE INTERNET CONNECTION!");
        }
        else
        {
            FindObjectOfType <ShowErrorMessageController>().SetErrorMessage("SyncCurrencyWhenOnline: " + obj.GenerateErrorReport());
        }
    }
コード例 #10
0
    private void OnPlayFaberror(PlayFabError error)
    {
        switch (error.Error)
        {
        case PlayFabErrorCode.InvalidEmailAddress:
        case PlayFabErrorCode.InvalidPassword:
        case PlayFabErrorCode.InvalidEmailOrPassword:
            Debug.Log("Invalid email or password");
            break;

        case PlayFabErrorCode.AccountNotFound:
            registerPanel.SetActive(true);
            return;

        default:
            Debug.Log(error.GenerateErrorReport());
            break;
        }

        Debug.Log(error.Error);
    }
コード例 #11
0
    private void OnPlayFabLoginError(PlayFabError obj)
    {
        LogMessage(obj.GenerateErrorReport());

        if (usernameLoginText.text != "" && passwordLoginText.text != "")
        {
            usernameLoginText.text = obj.ErrorMessage;
        }
        else
        {
            var sb = new System.Text.StringBuilder();

            foreach (var kv in obj.ErrorDetails)
            {
                sb.Append(string.Join(", ", kv.Value.ToArray()));
                sb.Append(" | ");
            }

            usernameLoginText.text = "" + sb;
        }
    }
コード例 #12
0
        private void OnLoginFailure(PlayFabError error)
        {
            isLoggedIn = false;
            error.GenerateErrorReport();
            string errorMessage = string.Empty;

            switch (error.Error)
            {
            // Recognize and handle the error
            case PlayFabErrorCode.InvalidTitleId:
                // Handle invalid title id error
                errorMessage = "User already logged in";
                break;

            case PlayFabErrorCode.AccountNotFound:
                // Handle account not found error
                errorMessage = "Email address not found, Do you need to register for an account?";
                break;

            case PlayFabErrorCode.InvalidEmailOrPassword:
                // Handle invalid email or password error
                errorMessage = "Email address or Password is incorrect";
                break;

            case PlayFabErrorCode.RequestViewConstraintParamsNotAllowed:
                // Handle not allowed view params error
                errorMessage = "Invalid login parameters";
                break;

            default:
                // Handle unexpected error
                break;
            }
            // Show error message
            onLoginFail.Invoke(errorMessage);
            if (onSOLoginFail != null)
            {
                onSOLoginFail.Raise(errorMessage);
            }
        }
コード例 #13
0
    private void OnRegisterFailure(PlayFabError error)
    {
        string errorStr = error.Error.ToString();

        Debug.Log(errorStr);
        //Debug.LogError(error.GenerateErrorReport());
        //registerStatus.text = error.GenerateErrorReport();
        switch (errorStr)
        {
        case "EmailAddressNotAvailable":
            registerStatus.text = "Failed to register. Email address already in use.";
            break;

        case "UsernameNotAvailable":
            registerStatus.text = "Failed to register. Display name already in use.";
            break;

        default:
            registerStatus.text = error.GenerateErrorReport();
            break;
        }
    }
コード例 #14
0
 void OnError(PlayFabError error)
 {
     if (Application.internetReachability == NetworkReachability.NotReachable)
     {
         messageText.text = "انترنت تان را وصل نمایید!".faConvert();
         return;
     }
     if (PlayFabErrorCode.EmailAddressNotAvailable == error.Error || PlayFabErrorCode.InvalidEmailAddress == error.Error || PlayFabErrorCode.DuplicateEmail == error.Error)
     {
         messageText.text = "ایمیل آدرس در دسترس نیست".faConvert();
         return;
     }
     if (PlayFabErrorCode.InvalidParams == error.Error || PlayFabErrorCode.InvalidEmailOrPassword == error.Error || PlayFabErrorCode.InvalidContentType == error.Error)
     {
         messageText.text = "ایمیل یا پسورد درست نیست".faConvert();
         return;
     }
     if (PlayFabErrorCode.AccountNotFound == error.Error)
     {
         messageText.text = "ایمیل در سیستم ثبت نیست!".faConvert();
         return;
     }
     Debug.Log("Error while login" + error.GenerateErrorReport());
 }
コード例 #15
0
 public void OnError(PlayFabError error)
 {
     showDebug("Error: " + error.GenerateErrorReport());
 }
コード例 #16
0
 /// <summary>
 /// Gets called when updating user statictics fails
 /// </summary>
 /// <param name="error"></param>
 private void OnFailure(PlayFabError error)
 {
     Debug.Log(error.GenerateErrorReport());
 }
コード例 #17
0
 private void OnPlayFabError(PlayFabError obj)
 {
     LogMessage(obj.GenerateErrorReport());
 }
コード例 #18
0
 private static void OnErrorShared(PlayFabError error)
 {
     Debug.Log(error.GenerateErrorReport());
 }
コード例 #19
0
ファイル: PlayFabApiTest.cs プロジェクト: yen-igaw/UnitySDK
 private void ExpectedLoginErrorCallback(PlayFabError error)
 {
     var errorReport = error.GenerateErrorReport().ToLower();
     var testContext = (UUnitTestContext)error.CustomData;
     testContext.False(errorReport.Contains("successful"), errorReport);
     testContext.True(errorReport.Contains("password"), errorReport);
     testContext.EndTest(UUnitFinishState.PASSED, null);
 }
コード例 #20
0
 // Função para caso de erro, listar qual foi o erro.
 void OnErrorLeaderboard(PlayFabError error)
 {
     Debug.LogError(error.GenerateErrorReport());
 }
コード例 #21
0
ファイル: PlayFabApiTest.cs プロジェクト: yen-igaw/UnitySDK
 private void SharedErrorCallback(PlayFabError error)
 {
     // This error was not expected.  Report it and fail.
     ((UUnitTestContext)error.CustomData).Fail(error.GenerateErrorReport());
 }
コード例 #22
0
 /**
  *  @brief      회원가입 실패시 불리는 콜백함수입니다.
  *
  *  @param      error      회원가입 실패 결과에 대한 error 정보
  */
 private void RegisterFailed(PlayFabError error)
 {
     // 플레이팹 회원가입 실패 Text 출력
     progressLabel.text = error.GenerateErrorReport();
 }
コード例 #23
0
ファイル: PlayFabApiTest.cs プロジェクト: yen-igaw/UnitySDK
        private void ExpectedRegisterErrorCallback(PlayFabError error)
        {
            var expectedEmailMsg = "email address is not valid.";
            var expectedPasswordMsg = "password must be between";

            var errorReport = error.GenerateErrorReport().ToLower();
            var testContext = (UUnitTestContext)error.CustomData;
            testContext.True(errorReport.Contains(expectedEmailMsg), errorReport);
            testContext.True(errorReport.Contains(expectedPasswordMsg), errorReport);
            testContext.EndTest(UUnitFinishState.PASSED, null);
        }
コード例 #24
0
 public void OnPlayFabError(PlayFabError error)
 {
     Debug.LogError("PlayFab Error: " + error.GenerateErrorReport());
 }
コード例 #25
0
 private void OnRegisterFailure(PlayFabError error)
 {
     Debug.LogError(error.GenerateErrorReport());
 }
コード例 #26
0
 private void SharedErrorCallback(PlayFabError error)
 {
     // This error was not expected.  Report it and fail.
     ((UUnitTestContext)error.CustomData).Fail(error.GenerateErrorReport());
 }
コード例 #27
0
 /**
  *  @brief      로그인 실패시 불리는 콜백함수입니다.
  *
  *  @param      error      로그인 실패에 대한 error 정보
  */
 private void OnLoginFailed(PlayFabError error)
 {
     // 로그인 실패 text 출력
     progressLabel.text = error.GenerateErrorReport();
 }
コード例 #28
0
ファイル: EventTest.cs プロジェクト: yen-igaw/UnitySDK
 private void SharedErrorCallback(PlayFabError error)
 {
     ((UUnitTestContext)error.CustomData).Fail(error.GenerateErrorReport());
 }
コード例 #29
0
 void fail(PlayFabError error)
 {
     Debug.LogError(error.GenerateErrorReport());
 }
コード例 #30
0
 void OnError(PlayFabError error)
 {
     Debug.Log(error.GenerateErrorReport());
 }
コード例 #31
0
 private static void OnGatherFail(PlayFabError error)
 {
     Debug.Log("OnGatherFail: " + error.GenerateErrorReport());
 }
コード例 #32
0
 private void OnRegisterFailure(PlayFabError error)
 {
     Debug.LogError(error.GenerateErrorReport());
     ActivateText(textNotification[1]);
 }
コード例 #33
0
 /// <summary>
 /// Callback to handle unsuccessful server interaction.
 /// </summary>
 /// <param name="response">Server response</param>
 private void EventSentErrorCallback(PlayFabError response)
 {
     Debug.LogWarning("Failed to send session data. Error: " + response.GenerateErrorReport());
 }
コード例 #34
0
 void elol(PlayFabError error)
 {
     Debug.Log("No More Satoshi");
     Debug.LogError(error.GenerateErrorReport());
 }