I am having difficulty understanding how to obtain the shipping and billing address from the Transaction Details API. I used the virtual terminal of my sandbox account to produce some transactions, and I have successfully retrieved many of the transaction details, but not the shipping, billing, or email address. I prefer VB.NET but help in C# is fine as well. Here is a sampling of my other code:
Dim gate As New ReportingGateway("APIKEY", "TRANKEY", ServiceMode.Test)
Dim addr As New CustomerGateway(("APIKEY", "TRANKEY", ServiceMode.Test)
Dim batches As New List(Of Batch)
batches = gate.GetSettledBatchList(startdate, enddate)
For Each item In batches
Dim transactions As New List(Of Transaction)
transactions = gate.GetTransactionList(batches.Item(batchitemcount).ID)
'GET BATCH DETAILS
For Each tran In transactions
Response.write(transactions.Item(trancount).BillingAddress.Street.tostring)
Dim details As Transaction
details = gate.GetTransactionDetails(transactions.Item(trancount).TransactionID)
'GET TRANSACTION DETAILS
Dim litem As LineItem
For Each litem In details.LineItems
'GET LINE ITEM DETAILS
Next
Next
Next
I just can't figure out how the syntax for getting at the shipping and billing address even though it looks like they are available in the transactions section. If I try to access them I get an "object reference not set to instance of object errors" so I'm obviously not accessing it correctly. Any thoughts or help would be appreciated.
Solved! Go to Solution.
07-10-2014 03:13 PM
doc on either
http://developer.authorize.net/api/transaction_details/ or http://developer.authorize.net/api/reference/
bill to and ship to address only available from GetTransactionDetails
07-10-2014 03:59 PM - edited 07-10-2014 03:59 PM
doc on either
http://developer.authorize.net/api/transaction_details/ or http://developer.authorize.net/api/reference/
bill to and ship to address only available from GetTransactionDetails
07-10-2014 03:59 PM - edited 07-10-2014 03:59 PM
Thanks the little nugget at the end helped (shipping & billing only available from GetTransactionDetails). Got me on the right path.
07-14-2014 06:20 AM