Reply
Member
colin
Posts: 5
Registered: ‎09-17-2009

Combining billing address line 1 and line2 into a single address line

I am moving a store from another payment gateway to Authorize.Net.  The other gateway has two 96-character address lines.  Authorize.Net (CIM, in my case) supports only a single, shorter address line.  How should I combine what is currently two long address lines into the single, short address line without breaking address validation?

Moderator
Trevor
Posts: 545
Registered: ‎08-21-2009

Re: Combining billing address line 1 and line2 into a single address line

[ Edited ]

The Address Verification System only validates the first line in the address and the validation will disregard any characters after the address.  This means that combining the two address lines into one will not adversely affect address verification.  It is up to you how exactly you choose to segregate the two portions of the address in the single line.

Member
johncongdon
Posts: 2
Registered: ‎01-04-2010

Re: Combining billing address line 1 and line2 into a single address line

I am trying to solve this same problem by using the company field as my address line 2.

 

However, I am getting an error that stats that company is not a valid element.  Any advice?  I am trying to use CIM for PCI compliance and not store any identifiable information, however not have an address line 2 is kind of silly.  This is a shipping address, not a billing address for (AVS) charging.

 

Here's the request and the error:

 

<?xml version="1.0" encoding="utf-8"?><createCustomerShippingAddressRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>********</name><transactionKey>***********</transactionKey></merchantAuthentication><customerProfileId>3434600</customerProfileId><address><firstName>John</firstName><lastName>Congdon</lastName><address>771 Fentress Blvd</address><company>Suite 22</company><city>Daytona Beach</city><state>FL</state><zip>32114</zip><country>US</country><phoneNumber>********</phoneNumber></address></createCustomerShippingAddressRequest>

 

 

 

The operation failed with the following errors:
[E00003] The element 'address' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'company' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'city, state, zip, country, phoneNumber, faxNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.


SimpleXMLElement Object
(
    [messages] => SimpleXMLElement Object
        (
            [resultCode] => Error
            [message] => SimpleXMLElement Object
                (
                    [code] => E00003
                    [text] => The element 'address' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'company' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'. List of possible elements expected: 'city, state, zip, country, phoneNumber, faxNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
                )

        )

)

Moderator
Trevor
Posts: 545
Registered: ‎08-21-2009

Re: Combining billing address line 1 and line2 into a single address line

The CIM API is sensitive to the order that elements included.  The sample that you provided shows the company element after the address element, swapping the order of those two fields should address the error that you are seeing.

Member
fb123
Posts: 6
Registered: ‎04-17-2010

Re: Combining billing address line 1 and line2 into a single address line

Trevor,

 

Is it possible that adding a Suite number to the single bill-to address line would trigger a mismatched street address in AVS?

 

Thanks!

Moderator
Elaine
Posts: 451
Registered: ‎08-21-2009

Re: Combining billing address line 1 and line2 into a single address line

No, it is not. Issuing banks only validate the first 5 numeric values of the street address and all 9 digits (if they are included) of the zip code.

 

 

Thanks,

Elaine

Member
fb123
Posts: 6
Registered: ‎04-17-2010

Re: Combining billing address line 1 and line2 into a single address line

Thank you Elaine. AVS was working fine for us until one address (something close to "300 Fifth Avenue, Suite 200") just wouldn't validate for all of the customer's cards while the ZIP would. He got upset because it was eating his credit and we had to call the issuing bank to release all the funds held up by the declined. On our end, we were charged all the percentages by our processor because the transactions (fairly large) were approved by them.

 

We tried both "300 Fifth" and "300 5th" and neither one validated. To make it work and ensure not being charged all the percentage by our processor, we had to turn that setting off in AVS for the transaction to go through. We're now hesitant to require both the ZIP and Street Address to validate but are obviously concerned with potential fraud.

stymiee
Posts: 1,462
Topics: 17
Kudos: 70
Solutions: 126
Registered: ‎09-14-2009

Re: Combining billing address line 1 and line2 into a single address line

Their merchant account provider really sucks if they are surcharging for failed AVS. Every other processor does not do that. The only requirement is that AVS is performed but it does not have to pass. If I were you I would tell them to find a new processor quick.


-------------------------------------------------------------------------------------------------------------------------------------------
John Conde :: Certified Authorize.Net Developer (Brainyminds) :: Official Authorize.Net Blogger

NEW! Integrate Every Authorize.Net XML API with One PHP Class (Sample code included)

Tutorials for integrating Authorize.Net with PHP: AIM, ARB, CIM, Silent Post
All About Authorize.Net's Silent Post

The Handling Online Payments With Authorize.Net and PHP Series
Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 | Part 8 | Part 9 | Part 10 | Part 11

My Blog posts for Authorize.Net - The Validating Credit Card Series
Credit Card Numbers | Expiration Dates | CVV Numbers

My Blog posts for Authorize.Net - Other Topics
Notifying Users Their Credit Card Is About to Expire Without PCI Compliance Issues
Precision Math with PHP
HTTP Headers to Help Secure Your Website

Please don't ask me questions via private message or email. They will be ignored.
Use the forums. That's what they are here for.
Member
fb123
Posts: 6
Registered: ‎04-17-2010

Re: Combining billing address line 1 and line2 into a single address line

I believe they are just charging their standard discount rates for approved transactions, not anything related to AVS. AVS is done by Authorize.net, hence the Transaction Status in our Auth.net Account says Declined. The actual transaction is showing as approved on the processor's end, and what's actually happening during the AVS Decline is 2 transactions/authorizations: 1 for the approved charge and 1 for the immediate refund (due to AVS Decline). Authorize.net appears to send this second notice immediately after an AVS decline.

 

I was stumped too when the card issuer for our client saw 2 transactions with the same approval code. Turns out one was the charge and the other the immediate refund.