AtEx v0.20.21 AtEx.Gateway.Payments.Card.Checkout View Source
This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Card Checkout API
Link to this section Summary
Functions
Card Checkout APIs allow your application to collect money into your Payment Wallet by initiating transactions that deduct money from a customers Debit or Credit Card.
Process results from calling the gateway
Link to this section Types
option()
View Sourceoption() :: {:method, Tesla.Env.method()} | {:url, Tesla.Env.url()} | {:query, Tesla.Env.query()} | {:headers, Tesla.Env.headers()} | {:body, Tesla.Env.body()} | {:opts, Tesla.Env.opts()}
Link to this section Functions
Card Checkout APIs allow your application to collect money into your Payment Wallet by initiating transactions that deduct money from a customers Debit or Credit Card.
Config
Add card_checkout_product_name
key to your AtEx configs
Parameters
attrs: - a map containing either paymentCard
(a map) or checkoutToken
, currencyCode
, amount
, narration
and a map of metadata
(optional) see the docs at https://build.at-labs.io/docs/payments%2Fcard%2Fcheckout for how to use these keys
Example
iex>AtEx.Gateway.Payments.Card.Checkout.card_checkout(%{amount: 1000.00, currencyCode: "KES", narration: "Payment", paymentCard: %{number: "10928873477387", cvvNumber: 253, expiryMonth: 12, expiryYear: 2020, countryCode: "NG", authToken: "jhdguyt6372gsu6q"}})
{:ok, %{
status: "PendingValidation",
description: "Waiting for user input",
transactionId: "ATPid_SampleTxnId123"
}}
Process results from calling the gateway