Popularity
2.1
Declining
Activity
0.0
Stable
5
2
0

Monthly Downloads: 8
Programming language: Haskell
License: GNU Affero General Public License v3.0 only
Tags: Web    
Latest version: v0.1.0.0

cielo alternatives and similar packages

Based on the "Web" category.
Alternatively, view cielo alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of cielo or a related project?

Add another 'Web' Package

README

haskell-cielo

Haskell bindings to the Cielo API v3. AGPLv3 licensed.

Hackage Link

All endpoints are wrapped; and smoke tested. A lot of the code was generated from Java bindings; the types aren't properly specified, sometimes the Cielo API uses different request/response types so some things are just set to the Value aeson type, since we can only type it as being JSON.

Official API documentation

Basic Usage

{-# LANGUAGE OverloadedStrings #-}
import           Web.Payments.Cielo

main :: IO ()
main = do
    cnf <- cieloConfigFromEnv
    runCielo cnf $ do
        uuid <- getMerchantOrderId
        let customer = def { customerName = "Pedro Tacla Yamada"
                           }
            payment = def { paymentCreditCard =
                                Just def { creditCardCardNumber = "0000000000000001"
                                         , creditCardHolder = "Pedro Tacla Yamada"
                                         , creditCardExpirationDate = "12/2023"
                                         , creditCardSecurityCode = Just "123"
                                         , creditCardBrand = "visa"
                                         }
                          , paymentAmount = Just 10000
                          }
        sale <- createSale Sale { saleMerchantOrderId = uuid
                                , saleCustomer = customer
                                , salePayment = payment
                                }
        liftIO $ print sale

License

AGPLv3


*Note that all licence references and agreements mentioned in the cielo README section above are relevant to that project's source code only.