mirror of
https://github.com/plutov/paypal.git
synced 2025-01-23 10:21:03 +01:00
SetAccessToken
This commit is contained in:
parent
01a9cc8bc9
commit
5fa983e86a
|
@ -23,6 +23,15 @@ func NewClient(clientID string, secret string, APIBase string) (*Client, error)
|
|||
}, nil
|
||||
}
|
||||
|
||||
// SetAccessToken sets saved token to current client
|
||||
func (c *Client) SetAccessToken(token string) error {
|
||||
c.Token = &TokenResponse{
|
||||
Token: token,
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Send makes a request to the API, the response body will be
|
||||
// unmarshaled into v, or if v is an io.Writer, the response will
|
||||
// be written to it without decoding
|
||||
|
|
Loading…
Reference in New Issue
Block a user