View Source AtEx.Gateway.Payments.Query.FetchProductTransactions (AtEx v0.20.23)
Fetch transactions of a particular payment product by sending a HTTP GET request to the following endpoint
Summary
Functions
Fetch transactions of a particular payment product by sending a HTTP GET request to the following endpoint
Process results from calling the gateway
Functions
Fetch transactions of a particular payment product by sending a HTTP GET request to the following endpoint
Parameters
attrs: - a map containing:
productName- The name of the payment product whose transactions you’d like to fetch.pageNumber- The number of the page you’d like to read results from. Please Note: This STARTS from1and NOT0count- The number of transaction results you would like for this query. Must be> 1and< 1,000- and optional parameters
startDate,endDate,category,provider,status,source,destinationandproviderChannelFor more on how to use these keys https://build.at-labs.io/docs/payments%2Fquery%2Ffetch_product_transactions
Example
iex>AtEx.Gateway.Payments.Query.FetchProductTransactions.fetch_product_transactions(%{productName: "AtEx", pageNumber: 1, count: 10})
{:ok,
%{
"status" => "Success",
"responses" => %{
"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