Reply
Contributor
Posts: 12
Registered: ‎02-17-2010
Accepted Solution

Transaction Details API - Help needed retrieving Shipping and Billing Address - C# or VB.NET

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.


Accepted Solutions
Highlighted
Solution
Accepted by topic author emlinney
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Transaction Details API - Help needed retrieving Shipping and Billing Address - C# or VB.NET

[ Edited ]

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

View solution in original post


All Replies
Highlighted
Solution
Accepted by topic author emlinney
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Transaction Details API - Help needed retrieving Shipping and Billing Address - C# or VB.NET

[ Edited ]

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

Contributor
Posts: 12
Registered: ‎02-17-2010

Re: Transaction Details API - Help needed retrieving Shipping and Billing Address - C# or VB.NET

Thanks the little nugget at the end helped (shipping & billing only available from GetTransactionDetails).  Got me on the right path.