View Source AtEx.Gateway.Payments.Bank.Transfer (AtEx v0.20.23)

This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Bank Transfer API

Summary

Functions

Bank checkout validation APIs allow your application to validate bank checkout charge requests.

Process results from calling the gateway

Functions

@spec bank_transfer(list()) :: {:ok, term()} | {:error, term()}

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