Copyright | (C) 2016 Braden Walters |
---|---|
License | MIT (see LICENSE file) |
Maintainer | Braden Walters <vc@braden-walters.info> |
Stability | experimental |
Portability | ghc |
Safe Haskell | None |
Language | Haskell2010 |
- type URL = String
- type PaymentID = String
- data Intent
- data RedirectUrls = RedirectUrls {}
- data ReturnLinkParams = ReturnLinkParams {}
- data CreateRequest = CreateRequest {}
- data CreateResponse = CreateResponse {}
- data ExecuteRequest = ExecuteRequest {
- executeReqPayerId :: String
- executeReqTransactions :: [ExecuteTransaction]
- data ExecuteResponse = ExecuteResponse {}
- data FindResponse = FindResponse {
- findResIntent :: Intent
- findResPayer :: Payer
- findResTransactions :: [Transaction]
- findResRedirectUrls :: Maybe RedirectUrls
- findResPayId :: PaymentID
- findResCreateTime :: UTCTime
- findResPayState :: PaymentState
- findResUpdateTime :: Maybe UTCTime
- data ListResponse = ListResponse {}
- createPayment :: CreateRequest -> PayPalOperations CreateResponse
- approvalUrlFromCreate :: CreateResponse -> Maybe URL
- executePayment :: PaymentID -> ExecuteRequest -> PayPalOperations ExecuteResponse
- findPaymentById :: PaymentID -> PayPalOperations FindResponse
- listPayments :: Maybe PagingRequest -> PayPalOperations ListResponse
- returnLinkParams :: Map ByteString ByteString -> Maybe ReturnLinkParams
Documentation
Payment intent.
data RedirectUrls Source #
data CreateResponse Source #
Contains a parsed response from PayPal after making a create payment request.
data ExecuteRequest Source #
Request to execute a payment.
ExecuteRequest | |
|
data FindResponse Source #
Contains a parsed response from a find payment request.
FindResponse | |
|
createPayment :: CreateRequest -> PayPalOperations CreateResponse Source #
Creates a new payment using payment data.
approvalUrlFromCreate :: CreateResponse -> Maybe URL Source #
Extracts an approval URL, if there is one, from a create response
executePayment :: PaymentID -> ExecuteRequest -> PayPalOperations ExecuteResponse Source #
Execute (or complete) a payment that has been approved by the payer.
findPaymentById :: PaymentID -> PayPalOperations FindResponse Source #
Looks up a payment by ID.
listPayments :: Maybe PagingRequest -> PayPalOperations ListResponse Source #
Lists payments, possibly with paging.
returnLinkParams :: Map ByteString ByteString -> Maybe ReturnLinkParams Source #
Use this function to parse GET parameters passed from PayPal to the return URL. Takes a map of query parameters (name to value) and returns a structure containing these parameters if possible. Otherwise PayPal didn't give you required data.