cancel
Showing results for 
Search instead for 
Did you mean: 

Oddball Integration Question

Hey Folks;

 

Just trying to get a ball rolling here on integration, I've worked with the API for a bit but I'm currently looking for a way to download a batch of transactions into a text or csv file to integrate with a back-end server.

 

I was told that the API can do this but I'm at a loss as to how to go about it, any clues?

 

Aaron

Aaron_at_Gasp
Member
7 REPLIES 7

Is this something you're trying to implement on your website?

 

If not, you can sign into your account (https://sandbox.authorize.net/) and transactions to a text file (tab delimited, comma separated). Just sign in click on reports at the top and run a report for a particular day and click on the download to file button in the top right of the table. I'm kind of new as well so I'm not sure if there's a way to download everything or if it's only possible to download daily reports.

jdallen88
Contributor

Not quite... It needs to be an automated script that runs every evening to put data back to our local server for our production systems and accounting calculations.

 

In other words, no I can't just use the web interface because it's a waste of my time when a program can do the job without any added input because it's just downloading the data to a file that the local server then automatically picks up and applies to it's own internal database.

Take a look at Transaction Details API.

http://developer.authorize.net/api/transaction_details/

Ok, so I've managed to fandangle a way to get the data we need with one little, itty-bitty, miniscule hitch...

 

I'm trying to pull the data using getTransactionsForDay; however, there's no bloody documentation (that I've seen) on the XML structure or accessing data from other data draw types other than Batch...

 

I'm thinking it's something like this:

 

$response = $request->getTransactionsForDay($month, $day, $year);        var_dump(simpleXMLToArray($response->xml->transaction->transactionStatus));

 

Obviously that's wrong because I'm not getting XML data...

 

(Just a heads up, that XML to Array function works correctly, tested with the batch program but it's only being used to generate output to the screen using var_dump)

 

Another point is that this software is running through a CLI so I don't have the usual tools (aka Firebug) to tell me what kind of return my server call is getting.

 

 

I think the getTransactionsForDay is a merge of getSettledBatchListRequest and getTransactionListRequest, so it return a list of transactions

So it probably be $response->xml->transactions->transaction->transactionStatus

Unfortunately no, that doesn't work, nor does removing the 'transactionStatus' at the end to see if maybe it just refers to them as 'transaction'.

 

I'm a little surprised at the lack of documentation but I guess this API isn't as often used as others are...

 

Additionally, to add to the potential screwyness, I had to edit the AuthorizeNetTD.php and change the core checks for sandbox mode to be false to force it to realize I wanted it to check the production side, rather than the sandbox side (which was giving me all kinds of errors.)

Alright, figured it out, shockingly enough, it's just $response in this case, no burrowing like the others seem to require...

 

So now I have the program tossed together, though I still think it's silly that I had to change more than just a variable to switch it between sandbox and production mode...