Exemplo n.º 1
0
    public async Task <bool> updateStripeAccount(string key, string value)
    {
        bool            success = false;
        WithdrawManager wm      = new WithdrawManager();

        Debug.Log("Key:" + key);
        switch (key)
        {
        case "firstname":
            return(await wm.attachInfoToAccount(token, value, "first_name"));

            break;

        case "lastname":
            return(await wm.attachInfoToAccount(token, value, "last_name"));

            break;

        case "address":
            return(await wm.attachInfoToAccount(token, value, "address", "line1"));

            break;

        case "zipcode":
            return(await wm.attachInfoToAccount(token, value, "address", "postal_code"));

            break;

        case "city":
            return(await wm.attachInfoToAccount(token, value, "address", "city"));

            break;

        case "phone":
            return(await wm.attachInfoToAccount(token, value, "phone"));

            break;

        case "birthdate":
            Debug.Log("case birthdate");
            char[]   spearator = { '-' };
            String[] birth     = value.Split(spearator);
            return(wm.attachDOBToAccount(token, int.Parse(birth[2]), int.Parse(birth[1]), int.Parse(birth[0])));

            break;

        default: return(false);
        }
    }