Hi @chopperstwisted,
I’ll take a look at the messaging. Braintree recommends that AVS street checks not be enabled because it can decrease conversion rate.
With device data, cvv checks, and postal code validation, that should be plenty of fraud protection without needing to add street validation.
Kind Regards,
Thread Starter
TC
(@chopperstwisted)
Well, that’s not a very smart thing for them to recommend. I use the street address as well because I get a lot of fraud and it’s a great form of protection. This should work as these are all standard AVS options and the most basic form of fraud protection. Thank you
@chopperstwisted
In Braintree’s response, they don’t distinguish between a postal code or street validation failure. It just comes back as a generic “avs” error. Therefore, there is no way to determine if the failure was due to an incorrect postal code or street address.
It’s possible to update the message to say Check your postal code and street address entries or something to that affect. You can control that using the plugin’s provided filters:
add_filter('wc_braintree_get_error_messages', function($messages){
$messages['gateway_rejected:_avs'] = "Check your postal code and street address entries";
return $messages;
});
I will probably add something similar in the way of messaging in the next release.
Kind Regards,
Thread Starter
TC
(@chopperstwisted)
Thanks for the code. I will use that in the meantime to state that the billing address is incorrect.
That’s odd about the response they send because they give very detailed info on their website of every transaction. Each transaction shows the exact avs response along with any rejection codes.
Thread Starter
TC
(@chopperstwisted)
The code provided is not correct, it encounters a fatal error. I would also prefer something like “Billing address does not match credit card statement” as there are so many customers that do not understand that the billing address is directly associated with their credit card. Seems obvious but you would be surprised how many do not know this.
An option for a future release would be to have an option in the plugin to leave your own custom message.
@chopperstwisted There isn’t anything wrong with the code snippet I provided. I tested it and it works perfectly on my end.
Make sure you added it in the correct location which would be your child theme’s functions.php. Also copy and paste it into a txt file then copy it again. Make sure there are no special characters being added.
The purpose of the filter is so you can make the message say whatever you want. I can’t anticipate what exact wording every merchant will want so the filter is provided to give that flexibility.
Adding a custom message section is not ideal because then it has to integrate with translation plugins and they all have a different way of handling custom messages. It’s an integration nightmare.
Thread Starter
TC
(@chopperstwisted)
I did get it to work now. The code was changed when it came through the email. The quotes changed from ” to "e;
Thank you