Beispiel #1
0
        public UserResponse GetUser(string accessToken)
        {
            UserRequest req = new UserRequest { accessToken = accessToken };
            UserResponse response;
            try
            {
                response = new WePayClient().Invoke<UserRequest, UserResponse>(req, req.actionUrl, accessToken);
            }
            catch (WePayException ex)
            {
                response = new UserResponse { state = "error", Error=ex };
            }

            return response;
        }
Beispiel #2
0
        public UserResponse GetUser(string accessToken)
        {
            UserRequest req = new UserRequest {
                accessToken = accessToken
            };
            UserResponse response;

            try
            {
                response = new WePayClient().Invoke <UserRequest, UserResponse>(req, req.actionUrl, accessToken);
            }
            catch (WePayException ex)
            {
                response = new UserResponse {
                    state = "error", Error = ex
                };
            }

            return(response);
        }