paypal-rest-client-0.1.0: A client to connect to PayPal's REST API (v1)

Copyright(C) 2016 Braden Walters
LicenseMIT (see LICENSE file)
MaintainerBraden Walters <vc@braden-walters.info>
Stabilityexperimental
Portabilityghc
Safe HaskellNone
LanguageHaskell2010

Network.Payments.PayPal.Auth

Description

 

Synopsis

Documentation

type ClientID = String Source #

PayPal client ID with which to execute actions.

type Secret = String Source #

PayPal secret of user with which to execute actions.

type Seconds = Integer Source #

Number representing seconds of time.

type AccessTokenWithExpiration = (AccessToken, UTCTime) Source #

An access token from OAuth together with its UTC expiration time.

type AccessTokenResult = Either AccessTokenError AccessToken Source #

Either an access token or the error encountered while fetching it.

fetchAccessToken :: EnvironmentUrl -> ClientID -> Secret -> IO AccessTokenResult Source #

Use a PayPal environment and login credentials to get an OAuth access token.

fetchAccessTokenWithExpiration :: EnvironmentUrl -> ClientID -> Secret -> IO AccessTokenWithExpirationResult Source #

Use a PayPal environment and login credentials to get an OAuth access token with an expiration time.

safeExpirationTime :: UTCTime -> AccessToken -> UTCTime Source #

Time at which the token should be considered expired. This is a few seconds before the time that PayPal gives us. Parameters are the time at which the access token was retrieved and the access token.