Reply
Contributor
Posts: 10
Registered: ‎04-25-2011
Accepted Solution

Billing address information is NOT being transferred for AVS check

[ Edited ]

On .Net using AIM.

 

I am using the AuthorizationRequest object which is being created by passing in the name/value pairs.  The result I get back from LIVE transactions is:

 

The transaction has been declined because of an AVS mismatch.  The address provided does not match billing address of cardholder.

 

When I test this against the TEST mode, the transaction goes through, but doesn't show any address information.  Not sure if that is a bug in the testing system or what.

 

I have confirmed that the address is EXACTLY like the billing address for the card.  However no joy.

 

Looking at the PHP examples (here: http://community.developer.authorize.net/t5/The-Authorize-Net-Developer-Blog/Handling-Online-Payment... shows that the address fields do NOT have the "x_" prefix.  So, I tried that as well.  Same result.

 

So, I need to know two things:

1. Is it possible for the test mode to do a real AVS check; because it doesn't appear to do anything?

2. How can I get the test mode to actually show the address information that was passed in?

3. How can I fix this in live?

 

 


Accepted Solutions
Solution
Accepted by topic author clively
‎08-21-2015 01:58 AM
Contributor
Posts: 10
Registered: ‎04-25-2011

Re: Billing address information is NOT being transferred for AVS check

I just figured this out.

 

I opened the source for the C# SDK.  The AuthorizationRequest(NameValueCollection post) method ONLY supports the credit card number, expiration date, and amount.

 

It completely ignores ALL of the other fields.

 

Which kind of brings up the question: why, exactly, does it take a nvc if it's not going to use anything but those three fields?  Rhetorical.

 

 

 

 

View solution in original post


All Replies
Posts: 1,476
Topics: 33
Kudos: 33
Solutions: 126
Registered: ‎09-14-2009

Re: Billing address information is NOT being transferred for AVS check

[ Edited ]

If the billing information is not making it to the test system or live system then there is an error in your code somewhere. I can't say why it isn't working for you as I haven't seen your code nor do I know .NET but it definitely is a coding issue.

 

AVS is not actually performed in a test environment since real transactions are not actually performed. But you can control the output of AVS by sending over certain transaction information that will auto-trigger results from the test account. See this for more information on that.


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

NEW! Handling Authorize.Net's Webhooks with PHP

Integrate Every Authorize.Net JSON 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
Contributor
Posts: 10
Registered: ‎04-25-2011

Re: Billing address information is NOT being transferred for AVS check

[ Edited ]

I doubt there's an error in my code, but I'm open to suggestions.  The main reason I doubt it is that the transaction itself goes through; it's just the address information isn't being stored.  Below is a code snippet as well as a copy of the data being sent:

 

========================

 

NameValueCollection post_values = new NameValueCollection();

post_values.Add("x_login", charge.CommerceLogin);
post_values.Add("x_tran_key", charge.CommercePassword);
post_values.Add("x_version", "3.1");

post_values.Add("x_delim_data", "TRUE");
post_values.Add("x_delim_char", "|");
post_values.Add("x_relay_response", "FALSE");

post_values.Add("x_type", "AUTH_CAPTURE");
post_values.Add("x_method", "CC");
post_values.Add("x_card_num", charge.CardNumber);
post_values.Add("x_card_code", charge.CVV);
post_values.Add("x_exp_date", charge.ExpirationDate);

post_values.Add("x_amount", charge.ChargeAmount.ToString("0.00"));
post_values.Add("x_description", charge.CustomerReference);

post_values.Add("x_address", String.Format("{0} {1}", charge.Address1, charge.Address2).Trim());
post_values.Add("x_city", charge.City);
post_values.Add("x_state", charge.StateCode);
post_values.Add("x_zip", charge.ZipCode);
post_values.Add("x_phone", charge.Phone);
post_values.Add("x_email", charge.EmailAddress);
post_values.Add("x_customer_ip", charge.IPAddress);

 

// here, I iterate through the post_values collection to get the name value pairs that are being sent to Authorize.Net

String post_string = "";

foreach (String field in post_values.Keys) {

post_string += String.Format("{0}={1}&", field, post_values[field]);

}

post_string = post_string.TrimEnd('&');

// log them.

Elmah.ErrorSignal.FromCurrentContext().Raise(new LogMessageException(post_string));

 

AuthorizationRequest request = new AuthorizationRequest(post_values);

Gateway gate = new Gateway(charge.CommerceLogin, charge.CommercePassword, true);
var response = gate.Send(request);

if (response.Approved) {
 // here it is approved
} else {
 // this would be a failure
}

 

========================

The following is output from the logging:

x_login=****REPLACED****
x_tran_key=****REPLACED****
x_version=3.1
x_delim_data=TRUE
x_delim_char=|
x_relay_response=FALSE
x_type=AUTH_CAPTURE
x_method=CC
x_card_num=****REPLACED****
x_card_code=****REPLACED****
x_exp_date=****REPLACED****
x_test_request=Y
x_amount=150.00
x_description=Courses for DV USD
x_address=111 main street
x_city=Addison
x_state=TX
x_zip=75001
x_phone=****REPLACED****
x_email=chris@livelyconsulting.com
x_customer_ip=72.48.207.78

Contributor
Posts: 10
Registered: ‎04-25-2011

Re: Billing address information is NOT being transferred for AVS check

I just switch from using the SDK to instead posting directly to the production Authorize.net url.  Zero other code changes; it worked.  And by Zero, I mean the post string is built the exact same way, with the exact same information.

 

It looks like the SDK has an issue with passing address information.

 

 

Solution
Accepted by topic author clively
‎08-21-2015 01:58 AM
Contributor
Posts: 10
Registered: ‎04-25-2011

Re: Billing address information is NOT being transferred for AVS check

I just figured this out.

 

I opened the source for the C# SDK.  The AuthorizationRequest(NameValueCollection post) method ONLY supports the credit card number, expiration date, and amount.

 

It completely ignores ALL of the other fields.

 

Which kind of brings up the question: why, exactly, does it take a nvc if it's not going to use anything but those three fields?  Rhetorical.

 

 

 

 

Highlighted
Member
Posts: 3
Registered: ‎04-28-2011

Re: Billing address information is NOT being transferred for AVS check

The reason it's in there (my guess) is for convenience - also if you pass in a naked NameValueCollection you don't know exactly what will be sent along. For instance - you can easily over-post the form (assuming you're using something like MVC) and basically allow a user to set bits of information you might not want set.