paypal-adaptive-hoops-0.8.0.0: Client for a limited part of PayPal's Adaptive Payments API

Safe HaskellNone
LanguageHaskell2010

Web.PayPal.Adaptive

Synopsis

Documentation

data PpClient Source

Constructors

PpClient 

Instances

data PpEnv Source

Constructors

PpSandbox 
PpProduction 

Instances

data AdaptiveErr Source

Text is an error message in all the below types.

AeShouldNotHappen is meant to cover PayPal responses to API requests that this library doesn't support sending in the first place. TODO: is this actually how we're using it?

Both AeInvalidCredentials and AeNoSuchEmail are just a convenient wrapper around certain AeErrCodes.

Constructors

AeConnectionErr Text 
AeDecodeFailed ByteString Text 
AeInvalidCredentials

AeInvalidCredentials just a wrapper around an AeErrCodes Int.

AeNoSuchEmail

AeNoSuchEmail is just a wrapper around an AeErrCodes Int. It's raised when the CreatePayment sender email doesn't exist.

AeErrCodes [Int] 
AePending PayResp 
AeRefused PayResp 
AeShouldNotHappen PayResp Text 

data SendPayment Source

Send a single payment from your account.

Pay operation docs: https://developer.paypal.com/docs/classic/api/adaptive-payments/Pay_API_Operation/

This is a "Simple Payment" which means there's a single sender and receiver (same as CreatePayment).

It uses the Implicit payment approval type, meaning the application making the API call must also be the sender of the payment.

data CreatePayment Source

Start the process of someone paying you. You have to redirect the payer's browser to PayPal to finish it.

Pay operation docs: https://developer.paypal.com/docs/classic/api/adaptive-payments/Pay_API_Operation/

This is a "Simple Payment" which means there's a single sender and receiver (same as SendPayment).

It uses the Explicit payment approval type, meaning the payer must go to PayPal in their browser to approve the payment. Here's an example payment approval URL with a PayKey of "foo":

https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey=foo

data PayExecStatus Source

This is "paymentExecStatus" in responses to sendPayment and createPayment. It's called "status" in responses to lookupPayment.

data PayInfo Source

All the API calls we support return a PayInfo along with three Justs, with two exceptions.

  1. toPayPal CreatePayment returns no PayInfo at all.
  2. toPayPal LookupPayment on such a payment does return a PayInfo, but with three Nothings.

NOTE: _piSenderTransactionId and _piTransactionStatus will be different, but both can be used to look up a payment.

data Money Source

Constructors

USD 

Fields

_usdCents :: Int
 

Instances