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; }
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); }