yesod-paypal-rest-0.1.0: Yesod plugin to use PayPal with the paypal-rest-client library.

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

Yesod.Payments.PayPal

Description

 

Synopsis

Documentation

type PayPalCredentials = (EnvironmentUrl, ClientID, Secret) Source #

All credentials needed to log into PayPal's API.

data YesodPayPalState Source #

State needed over multiple PayPal requests.

mkYesodPayPalState :: PayPalCredentials -> IO (Maybe YesodPayPalState) Source #

Create a PayPal state for a site.

class Yesod site => YesodPayPal site where Source #

Typeclass for Yesod sites which use PayPal.

Minimal complete definition

yesodPayPalCredentials, yesodPayPalState

Methods

yesodPayPalCredentials :: site -> PayPalCredentials Source #

The PayPal API credentials for a site.

yesodPayPalState :: site -> YesodPayPalState Source #

State needed over multiple PayPal requests for a site.

yesodExecPayPal :: (YesodPayPal site, FromJSON a) => PayPalOperations a -> HandlerT site IO (Either PayPalError a) Source #

Execute PayPal operations in the context of Yesod.