cancel
Showing results for 
Search instead for 
Did you mean: 

PHP getTransactionsForDay()

I am trying to get some trasnactions for the 18th of this month and it returns nothing even though I can see them in the control panel.  I can successfully get the transactions from the 17th or even the 19th, just not the 18th.

 

Why is this happening?  Please help me fix this. 

 

Thanks.

 

EDIT: 

Just to add to the list the 11th also returns nothing and the 13th returns nothing and the 15th returns nothing.  It makes no sense to me.

RyeinGoddard
Contributor
6 REPLIES 6

Transactions don't necessarily settle on the same date that they're issued. You could have a transaction on the later part of the 18th and have it roll over to the 19th settlement batch.

TJPride
Expert

I have transactions usually within the 10s to 20s a day.

 

When you do a search in the admin console the settlement date is listed in the search so everyhting that shows up there should show up in my return from my function I use correct?

One would think so, unless there's something going on with the transactions or batch that I don't know about. Are you sure the function is making it to the end? Have you tried checking the batches before and after to see if somehow the transactions ended up there?

I successfully get the transaction details from other days and I am basically using the transactions example from the php SDK.

 

The function is making it to the end.  It does appear some of those batches on the day after have landed on the following day.

 

So the batches for the 18th landed on the 19th even though it is listed as being settled on the 18th when searching.  Very confusing, but at least we got them.

 

Thanks.  Is this the intended result?

I don't know why the batch date would be displayed incorrectly, but the function is probably working properly at least. Transactions run after the batch time each day wrap to the next batch.

Hi, I'm having some trouble with AuthorizeNetTD::getTransactionsForDay().

 

As it is it's always returning an empty array, the trouble seems to be coming from here

        foreach ($batches as $batch) {
            $batch_id = (string)$batch->batchId;
            $request = new AuthorizeNetTD;
            $tran_list = $request->getTransactionList($batch_id);
            $transactions = array_merge($transactions, $tran_list->xpath("transactions/transaction"));
        }

particularly

 

$tran_list = $request->getTransactionList($batch_id);

 

 if I change it to

$tran_list = $this->getTransactionList($batch_id);

it works fine.

 

Am I doing something wrong here?

 

Is there a reason for creating a new AuthorizeNetTD object for each batchId rather than just using $this?

whYME
Member