cancel
Showing results for 
Search instead for 
Did you mean: 

Adding the shipping, billing address to a transaction using ActiveMerchant

Hello all,

 

I am using the AIM SDK for C# to test some transactions. Here is what I have:

 

           //step 1 - create the request
            var request = new AuthorizationRequest("370000000000002", "1216", 230.01M, "Test Transaction");

            //These are optional calls to the API
            request.AddCardCode("321");

            //Customer info - this is used for Fraud Detection
            request.AddCustomer("101", "John", "Doe", "1 Main Street", "IL", "60601");

            //order number
            request.AddInvoice("4054");

            //Custom values that will be returned with the response
            request.AddMerchantValue("param1", "value1");

            //Shipping Address
            request.AddShipping("101", "John", "Doe", "2 Main Street", "IL", "60602");

            //step 2 - create the gateway, sending in your credentials
            var gate = new Gateway(lsAPILoginID, lsTransactionKey);

            //step 3 - make some money
            var response = gate.Send(request);

 Everything works fine, except that there is no City specified! In looking at the request method "AddCustomer", I see that  It is basically expecting "id", "first", "last", "address", "state", "zip".

 

How can I add City for both Billing and Shipping Addresses?

 

Thanks,

Pete

digioz22
Member
1 ACCEPTED SOLUTION

Accepted Solutions

There should be something like

request.City = "your city";

View solution in original post

RaynorC1emen7
Expert
2 REPLIES 2

There should be something like

request.City = "your city";

RaynorC1emen7
Expert

Thank you Ray, I found the two Properties called "request.City" and "request.ShipToCity", and tested them out and confirmed that it is now getting passed in. 

 

I wonder why the creators of the library didn't make City a part of the Constructors (request.AddCustomer and request.AddShipping). It would have made more sense in my opinion. 

 

Thanks again for the help. 

 

Pete