View Source AtEx.Gateway.Payments.Card.Validate (AtEx v0.20.23)

This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking Card Validation API

Summary

Functions

Card checkout validation APIs allow your application to validate card checkout charge requests.

Process results from calling the gateway

Functions

@spec card_validate(map()) :: {:ok, term()} | {:error, term()}

Card checkout validation APIs allow your application to validate card checkout charge requests.

Parameters

attrs: - a map containing transactionId and otp see the docs at https://build.at-labs.io/docs/payments%2Fcard%2Fvalidate for how to use these keys

Example

  iex>AtEx.Gateway.Payments.Card.Validate.card_validate(%{transactionId: "ATPid_SampleTxnId123", otp: "password"})
  {:ok,
  %{
      status: "Success",
      description: "Payment completed successfully",
      checkoutToken: "ATCdTkn_SampleCdTknId123"
  }}

Process results from calling the gateway