cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Transaction Details API

I guess this is a general question, I have one account I'm working with but there are many different forms that are using the account for trasnactions. The people who are managing each of the forms want a report that only pulls their form information. The easiest way I figure is to build a report for each of them that pulls ONLY their information based on the description element. If anyone could help and point me on the right path, I'd appreciate it, thanks!

 

How would I go about filtering this? I'm not sure if the bottom would be the correct way of acheiving this, because .NET does things by batch its a bit ocnfusing to break this down, so I apologize. I'll post an example here of how I think it would work:

 

<?php
require_once
"anet_php_sdk/AuthorizeNet.php";
define
("AUTHORIZENET_API_LOGIN_ID", "YOURLOGIN");
define
("AUTHORIZENET_TRANSACTION_KEY", "YOURKEY");

// Get Settled Batch List
$request
= new AuthorizeNetTD;
$response
= $request->getSettledBatchList();
echo count
($response->xml->batchList->batch) . " batches\n";
foreach ($response->xml->batchList->batch as $batch) {
    echo
"Batch ID: " . $batch->batchId . "\n";

//Get transactions and filter based on description
$response2 = $request->getTransactionListRequest($batch->batchId);
foreach ($response2->xml->transactions as $transactions) {
if ($transactions->transaction->description) = "DESCRIPTION" {
display/do something;
}
}
}
?>
ahowell
Member
1 REPLY 1

 

Hi ahowell,

 

From just looking at your code, it seems like the logic is sound and that it should work for you. We do not have an option of searching through the API, so this type of filtering is the best method to get what you want.

 

Thanks,

Joy

Joy
Administrator Administrator
Administrator