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

Description

 

Synopsis

Documentation

data UseHttpMethod Source #

HTTP method to use in the request (GET/POST).

data PayPalOperations :: * -> * where Source #

A monad composing multiple PayPal operations which are to be performed. The result can be executed using the execPayPal function.

execPayPal :: FromJSON a => EnvironmentUrl -> ClientID -> Secret -> PayPalOperations a -> IO (Either PayPalError a) Source #

Authenticate with PayPal and then interact with the service.

execPayPalOpers :: EnvironmentUrl -> ClientID -> Secret -> AccessTokenWithExpiration -> PayPalOperations a -> IO (Either PayPalError (a, AccessTokenWithExpiration)) Source #

Executes a PayPalOperations monad as IO. Because the access token can expire and needs to be renewed, this function returns the desired value and the most current access token when successful.