AtEx v0.20.21 AtEx.Gateway.Payments.Query.FindTransaction View Source
Find a particular payment transaction by sending a HTTP GET request to the following endpoint
Link to this section Summary
Functions
Find a particular payment transaction by sending a HTTP GET request to the following endpoint
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
Find a particular payment transaction by sending a HTTP GET request to the following endpoint
Parameters
attrs: - a map containing:
transactionId
- ID of the transaction you would like to find. For more on how to use these keys https://build.at-labs.io/docs/payments%2Fquery%2Ffind_transaction
Example
iex>AtEx.Gateway.Payments.Query.FindTransaction.find_transaction(%{transactionId: "ATPid_a58b61dc2bf556ff9c4b16e9f6e40795"})
{:ok,
%{
"status" => "Success",
"data" => %{
"requestMetadata" => %{
"reason" => "Testing things..."
},
"sourceType" => "Wallet",
"source" => "PaymentWallet",
"provider" => "Mpesa",
"destinationType" => "PhoneNumber",
"description" => "The service request is processed successfully.",
"providerChannel" => "824879",
"transactionFee" => "KES 1.0000",
"providerRefId" => "SAMPLE_MPESA_CODE",
"providerMetadata" => %{
"recipientIsRegistered" => "true",
"recipientName" => "254724XXXYYY - John Doe"
},
"status" => "Success",
"productName" => "testing",
"category" => "MobileB2C",
"transactionDate" => "12.05.2018 21:46:13",
"destination" => "+254708663158",
"value" => "KES 2900.0000",
"transactionId" => "ATPid_b9379b671fee8ccf24b2c74f94da0ceb",
"creationTime" => "2018-05-12 18:46:12"
}
}}
Process results from calling the gateway