latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Authorize.Net ProForms: Can I disable fields

Home Forums Community Forum Authorize.Net ProForms: Can I disable fields

This topic contains 7 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Sunday Jul 22nd, 2012 at 3:12 am #19920
TJ
Username: wellwater

Hi,

For Authorize.Net ProForms, can the following fields be removed/disabled on the form, as Authorize.Net doesn’t require them:

Billing Method:
Card Verification Code

Billing Address:
Street Address
City/Town
State/Province
Country
Postal/Zip Code

Thanks.

  • This topic was modified 4 years, 5 months ago by  TJ.
  • This topic was modified 4 years, 5 months ago by  TJ.

List Of Topic Replies

Viewing 7 replies - 1 through 7 (of 7 total)
Author Replies
Author Replies
Posted: Monday Jul 23rd, 2012 at 10:10 pm #20026

Hi TJ.

I emailed Jason asking him if this is possible. He may reply in a few days because he’s not opening his email every day lately, but I’ll let you know as soon as I hear back from him. :)

Posted: Saturday Jul 28th, 2012 at 6:40 pm #20569
Staff Member

Thanks for the heads up on this request for support.

s2Member Pro relies upon these fields for tax calculations, and also for AVS matching against fraud screening filters provided by Authorize.Net. While it’s true that Authorize.Net does not absolutely require them, my experience shows that NOT collecting them, can lead to fraudulent transactions, and scrutiny from the Authorize.Net team.

That being said, you are free to remove them if you wish. You will need to create your own custom Pro Form template for checkout, based on the the one provided by s2Member Pro. Please see: Pre Sale FAQs » Is it possible to modify s2Member® Pro Form templates?

Then, in order to bypass s2Member’s server-side validation against these fields, you will need to edit this file:
/s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php

Please remove this section of code (starting at line #756) which requires these fields to be submitted:

/* ----------------------------------------------------------------------------------------------------------------- */
else if(in_array($s["card_type"], array("Visa", "MasterCard", "Discover", "Amex", "Maestro", "Solo")) && (!$s["street"] || !is_string($s["street"])))
	$response = array("response" => _x('Missing Street Address. Please try again.', "s2member-front", "s2member"), "error" => true);
/**/
else if(in_array($s["card_type"], array("Visa", "MasterCard", "Discover", "Amex", "Maestro", "Solo")) && (!$s["city"] || !is_string($s["city"])))
	$response = array("response" => _x('Missing City/Town. Please try again.', "s2member-front", "s2member"), "error" => true);
/**/
else if(in_array($s["card_type"], array("Visa", "MasterCard", "Discover", "Amex", "Maestro", "Solo")) && (!$s["state"] || !is_string($s["state"])))
	$response = array("response" => _x('Missing State/Province. Please try again.', "s2member-front", "s2member"), "error" => true);
/**/
else if(in_array($s["card_type"], array("Visa", "MasterCard", "Discover", "Amex", "Maestro", "Solo")) && (!$s["country"] || !is_string($s["country"])))
	$response = array("response" => _x('Missing Country. Please try again.', "s2member-front", "s2member"), "error" => true);
/**/
else if(in_array($s["card_type"], array("Visa", "MasterCard", "Discover", "Amex", "Maestro", "Solo")) && (!$s["zip"] || !is_string($s["zip"])))
	$response = array("response" => _x('Missing Postal/Zip Code. Please try again.', "s2member-front", "s2member"), "error" => true);
/* ----------------------------------------------------------------------------------------------------------------- */
Posted: Saturday Jul 28th, 2012 at 8:34 pm #20573

Thanks Jason. :)

TJ, since you’d be editing authnet-responses.inc.php directly instead of using a hook, it’s better if you make a copy of the file into your must-use plugins directory /wp-content/mu-plugins/, and edit that so it’s not overwritten the next time you update s2Member.

Posted: Saturday Jul 28th, 2012 at 8:43 pm #20574
TJ
Username: wellwater

Hi,

Thanks for the replies Jason and Cristián. If I copy the authnet-responses.inc.php class to /wp-content/mu-plugins/ and s2member later upgrades authnet-responses.inc.php, couldn’t that lead to some sort of future breakage down the line?

Is it possible to do this in a hook so the override I’m applying is as slight and small as possible?

Thanks.

Posted: Saturday Jul 28th, 2012 at 11:28 pm #20579

There aren’t hooks for it, or Jason would have suggested a hack using them. Yeah, if that file were changed in some way by an update, you’d need to update your copy of it, so it’d be good to check if that’s the case after each update.

Posted: Saturday Jul 28th, 2012 at 11:29 pm #20580
TJ
Username: wellwater

Thanks for the assist Cristián & Jason.

Posted: Sunday Jul 29th, 2012 at 7:00 am #20591

No problem, we’re glad we could help. :)

Viewing 7 replies - 1 through 7 (of 7 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.