// Use this for initialization
    void OnEnable()
    {
        userId = um.getCurrentUserId();
        token  = um.getCurrentSessionToken();
        WithdrawButton.interactable = false;
        AcceptedIban = GameObject.Find("AcceptedIBAN").GetComponent <Image>();
        IBAN.onValueChanged.AddListener(delegate {
            Image DeclinedIban = GameObject.Find("DeclinedIBAN").GetComponent <Image>();
            Image LoaderIban   = GameObject.Find("LoaderIBAN").GetComponent <Image>();
            LoaderIban.transform.localScale = Vector3.one;
            validIban = wm.validateIBAN(IBAN.text);
            LoaderIban.transform.localScale = Vector3.zero;
            if (validIban)
            {
                AcceptedIban.transform.localScale = Vector3.one;
                DeclinedIban.transform.localScale = Vector3.zero;
            }
            else
            {
                AcceptedIban.transform.localScale = Vector3.zero;
                DeclinedIban.transform.localScale = Vector3.one;
            }
        });
        WithdrawButtonText.text = WithdrawPresenter.WithdrawMoney.ToString() + CurrencyManager.CURRENT_CURRENCY;
        string Id    = um.getCurrentUserId();
        string Token = um.getCurrentSessionToken();

        SceneManager.LoadScene("Loader", LoadSceneMode.Additive);
        UnityThreadHelper.CreateThread(() => {
            User user   = um.getUser(Id, Token);
            var account = wm.accountVerificationJSON(Token);
            UnityThreadHelper.Dispatcher.Dispatch(() => {
                SceneManager.UnloadScene("Loader");
                if (user != null)
                {
                    //Check Personel Info (Individual)
                    personelInfoVerification(user);
                    //Check Docs Verification (Document + additional document)
                    docsVerification(account);
                    //check Iban Upload
                    ibanVerification(user);
                    WithdrawButton.onClick.AddListener(() => {
                        Withdraw();
                    });
                    ContinueButtonIBAN.onClick.AddListener(() => {
                        InfoPersonnelWithdraw.currentIBAN = IBAN.text;
                        tokenizeAndAttach();
                    });
                }
                else
                {
                    try {
                        SceneManager.UnloadSceneAsync("ConnectionFailed");
                    } catch (ArgumentException ex) { }
                    ConnectivityController.CURRENT_ACTION = ConnectivityController.PERSONNEL_INFO_WITHDRAW_ACTION;
                    SceneManager.LoadScene("ConnectionFailed", LoadSceneMode.Additive);
                    try {
                        SceneManager.UnloadSceneAsync("Loader");
                    } catch (ArgumentException ex) { }
                }
            });
        });
    }
 //Button Confirm;
 // Use this for initialization
 void Start()
 {
     ContinuePopup.onClick.AddListener(() => {
         missingInfoContinue();
     });
     userId    = um.getCurrentUserId();
     userToken = um.getCurrentSessionToken();
     SceneManager.LoadScene("Loader", LoadSceneMode.Additive);
     UnityThreadHelper.CreateThread(() => {
         User user   = um.getUser(userId, userToken);
         var account = wm.accountVerificationJSON(userToken);
         UnityThreadHelper.Dispatcher.Dispatch(() => {
             SceneManager.UnloadSceneAsync("Loader");
             if (string.IsNullOrEmpty(user.birthday) || string.IsNullOrEmpty(user.adress) || string.IsNullOrEmpty(user.firstname) || string.IsNullOrEmpty(user.lastname) || string.IsNullOrEmpty(user.zipcode) || string.IsNullOrEmpty(user.city) || string.IsNullOrEmpty(user.phone))
             {
                 showMissingInfoPopup();
             }
             else
             {
                 string documentFrontID = null;
                 string documentBackID  = null;
                 string documentAddress = null;
                 var accountStatus      = account["account"]["individual"]["verification"]["status"].Value;
                 Debug.Log(accountStatus);
                 try {
                     documentFrontID = account["account"]["individual"]["verification"]["document"]["front"].Value;
                 }
                 catch (NullReferenceException ex) {}
                 try
                 {
                     documentBackID = account["account"]["individual"]["verification"]["document"]["back"].Value;
                 }
                 catch (NullReferenceException ex) { }
                 try
                 {
                     documentAddress = account["account"]["individual"]["verification"]["additional_document"]["front"].Value;
                 }
                 catch (NullReferenceException ex) { }
                 if (accountStatus.Equals(WithdrawManager.ACCOUNT_VERIFICATION_STATUS_VERIFIED))
                 {
                     show("IDAddressSuccess");
                     if (!string.IsNullOrEmpty(documentBackID))
                     {
                         show("IDFrontSuccess");
                         show("IDBackSuccess");
                         closeInteractable("IDPassport");
                         disable("IDPassport");
                     }
                     else
                     {
                         show("IDPassportSuccess");
                         closeInteractable("IDFront");
                         closeInteractable("IDBack");
                         disable("IDFront");
                         disable("IDBack");
                     }
                 }
                 if (accountStatus.Equals(WithdrawManager.ACCOUNT_VERIFICATION_STATUS_PENDING))
                 {
                     show("IDAddressSuccess");
                     if (!string.IsNullOrEmpty(documentBackID))
                     {
                         show("IDFrontWaiting");
                         show("IDBackWaiting");
                         closeInteractable("IDPassport");
                         disable("IDPassport");
                     }
                     else
                     {
                         show("IDPassportWaiting");
                         closeInteractable("IDFront");
                         closeInteractable("IDBack");
                         disable("IDFront");
                         disable("IDBack");
                     }
                 }
                 if (!string.IsNullOrEmpty(documentBackID) && user.id_proof_2_uploaded)
                 {
                     show("IDBackWaiting");
                     closeInteractable("IDPassport");
                     disable("IDPassport");
                 }
                 if (!string.IsNullOrEmpty(documentFrontID) && user.id_proof_1_uploaded)
                 {
                     show("IDFrontWaiting");
                     closeInteractable("IDPassport");
                     disable("IDPassport");
                 }
                 if (!string.IsNullOrEmpty(documentBackID) && user.passport_uploaded)
                 {
                     show("IDPassportWaiting");
                     closeInteractable("IDFront");
                     closeInteractable("IDBack");
                     disable("IDFront");
                     disable("IDBack");
                 }
             }
         });
     });
 }