I downloaded the C# Transaction Details API sample program: https://developer.authorize.net/api/transaction_details/
But I cannot login to the live account for the Reporting sample even though the credentials work for the SampleAuthorization sample
I can get the SampleAuthorization code to work in C# for both LIVE and TEST accounts by changing the TRUE and FALSE variables under the new Gateway() object.
The problem is when I use the SampleReporting code it gives me the error: "Error processing request: E00007 - User authentication failed due to invalid authentication values." even though I am using the exact same credentials that work for the SampleAuthorization code.
When trying the LIVE version it gives me the error mentioned above. When trying the TEST credentials it tells me I have not enabled the account for API Reporting which I don't know how to do in the test account since it asks me for my pet's name and when I signed up for the test account it didn't ask me for a pet's name so i am unable to put one in.
I think the SampleReporting code tries to access the TEST server and I don't know how to direct it to the LIVE server as I do in the SampleAuthorization
What am I missing?
Solved! Go to Solution.
03-23-2011 11:25 AM
You can adjust the following in order to get it to work with your production account credentials:
var gate = new ReportingGateway("APILOGIN", "TRANSACTIONKEY");
to:
var gate = new ReportingGateway("APILOGIN", "TRANSACTIONKEY", ServiceMode.Live);
Thank you,
Elaine
03-24-2011 10:31 AM
The ReportingGateway object has an overload for ServiceMode which has LIVE and TEST but I couldn't figure out how to use it. I would think the sample would have addressed Live and Test servers as the SampleAuthorization did.
03-23-2011 11:29 AM
You can adjust the following in order to get it to work with your production account credentials:
var gate = new ReportingGateway("APILOGIN", "TRANSACTIONKEY");
to:
var gate = new ReportingGateway("APILOGIN", "TRANSACTIONKEY", ServiceMode.Live);
Thank you,
Elaine
03-24-2011 10:31 AM
Great, that worked. I was sure I had tried that.
I have another problem now. I can't seem to retrieve the list of transactions using the date overload. Whether I use the simple () or the date overload I only get the last settled date. Is this because I only started using the Reporting API now? I can get individual Transactions using the string overload.
All of the next three only get the Transactions from my last settled Batch even though I think they should all get the last 30 days:
var transactions = gate.GetTransactionList("123456789");
03-24-2011 04:41 PM
Hey there,
The
SDK is doing what it should; it's getting a collection of all the
settled batches and then retrieving the details on each batch and putting all
the results into a List<Transaction> container.
I've got a couple of follow-up questions for you:
(1) Did you traverse through all the whole list - or just the first
element?
(2) Do you have more than 1 settled batch? I'm assuming so,
but just asking for clarity.
I'd be curious to see what happens when you call
GetSettledBatchList(DateTime from, DateTime to)? Since this is the
underlying call that GetTransactionList(DateTime from, DateTime to) is
calling.
Let me know!
Thanks,
Michelle
Developer Community Manager
04-05-2011 01:18 PM
Same here, i have this code, following your instruction :
DateTime ini = new DateTime(2011, 12, 23);
DateTime fin = new DateTime(2011, 12, 27);
ReportingGateway repo = new ReportingGateway("xxxxx", "yyyyy", ServiceMode.Live);
List<Batch> bts = repo.GetSettledBatchList(ini, fin);
foreach(Batch ba in bts)
{
List<Transaction> trns = repo.GetTransactionList(ba.ID);
foreach (Transaction t in trns)
lcInfo += t.TransactionID + "|" + t.TransactionType + "|" + t.InvoiceNumber + "|" + t.CustomerID + "|" +
t.OrderDescription + "|" + t.DateSubmitted + "|" + t.TransactionType + "|" + t.FirstName + " " +
t.LastName + "|" + t.SettleAmount + Environment.NewLine;
}
But i just got the last settled batch.
Regards,
Mauricio Atanache.
12-29-2011 10:38 AM
Hi,
01-06-2012 03:47 PM
You were right, i had an old dll, but by the way, please check the library download, in each example you can find diferent versions of the library, you guys should fix this issue.
Regards,
Mauricio Atanache G.
01-30-2012 10:03 AM
Hi,
Thank you for that information, we will make sure to send this to our engineers to get updated.
Thanks,
Joy
01-30-2012 02:08 PM