AtEx v0.20.21 AtEx.Gateway.Payments.Bank.Transfer View Source
This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Bank Transfer API
Link to this section Summary
Functions
Bank checkout validation APIs allow your application to validate bank checkout charge requests.
Process results from calling the gateway
Link to this section Types
Link to this type
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
Bank checkout validation APIs allow your application to validate bank checkout charge requests.
Config
add bank_transfer_product_name
key to your AtEx configs
Parameters
attrs: - a list of recipients each containing a map with currencyCode
, amount
, narration
and a map of metadata
(optional) see the docs at https://build.at-labs.io/docs/payments%2Fbank%2Ftransfer for how to use these keys
Example
iex>AtEx.Gateway.Payments.Bank.Transfer.bank_transfer([%{bankAccount: %{accountName: "KCB", accountNumber: "93892892", bankCode: 234001}, amount: 1000.00, currencyCode: "KES", narration: "Payment", metadata: %{detail: "A Bill"}}])
{:ok,
%{
"entries" => [
%{
"accountNumber" => "93892892",
"status" => "Queued",
"transactionId" => "ATPid_SampleTxnId",
"transactionFee" => "NGN 50.00"
}
]
}}
Process results from calling the gateway