Developer forum

Forum » Ecommerce - Standard features » AuthorizeNet API getting Billing address instead of Shipping

AuthorizeNet API getting Billing address instead of Shipping

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

We came across a small issue with AuthorizeNet API's when setting up the shipping address.

 

Here's the current code

        public static nameAndAddressType CreateShipAddress(Order order)
        {
            return new nameAndAddressType
            {
                firstName = CropString(order.CustomerFirstName, 50),
                lastName = CropString(order.CustomerName, 50),
                company = CropString(order.CustomerCompany, 50),
                address = CropString($"{order.CustomerHouseNumber} {order.CustomerAddress}".Trim(), 60),
                city = CropString(order.CustomerCity, 40),
                state = CropString(order.CustomerRegion, 40),
                zip = CropString(order.CustomerZip, 20),
                country = CropString(order.CustomerCountry, 60),
            };
        }

Instead it should be this

 

        public static nameAndAddressType CreateShipAddress(Order order)
        {
            return new nameAndAddressType
            {
                firstName = CropString(order.DeliveryFirstName, 50),
                lastName = CropString(order.DeliveryName, 50),
                company = CropString(order.DeliveryCompany, 50),
                address = CropString($"{order.DeliveryHouseNumber} {order.DeliveryAddress}".Trim(), 60),
                city = CropString(order.DeliveryCity, 40),
                state = CropString(order.DeliveryRegion, 40),
                zip = CropString(order.DeliveryZip, 20),
                country = CropString(order.DeliveryCountry, 60),
            };
        }

 

Can this be fixed on a future version?

 

Best Regards,

Nuno Aguiar


Replies

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply
This post has been marked as an answer

Hi Nuno,

It's bugged by Bug 858: AuthorizeNet API getting Billing address instead of Shipping has been created in DevOps. Thanks.

BR, Oleg QA

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Thanks Oleg.

 

You must be logged in to post in the forum