Support

Home Forums Event Espresso Premium Authorize.net AIM gateway not working

Authorize.net AIM gateway not working

Posted: April 22, 2014 at 6:29 am

Viewing 5 reply threads


Vittorio Pennazio

April 22, 2014 at 6:29 am

Hello, I have been trying to get Authorize.net AIM gateway working but it seems that the problem presented in this topic (https://eventespresso.com/topic/authorize-net-aim-error/) is still persisting and the given answer (making the field not required) doesn’t seem to be a feasible option.

I have contacted Authorize.net support service and they told me that the Country field is a necessary information to process the transaction. On the back end of Authorize.net, in the settings for the Payment Form (SIM) they write:

“Note: Any fields that are checked as “Required” below, will require a value for that field to be entered before the transaction can be processed, regardless of whether you use Advanced Integration Method (AIM) or Server Integration Method (SIM) for connecting to the payment gateway.”

Those required fields are: First Name, Last Name, Address, City, State, ZIP Code and Country.

So how can the AIM gateway work on EE if the fields in the payment form do not include a mandatory variable such as Country? If I try to use the AIM integration, the following error is returned:

Attention: your transaction was declined for the following reason(s):
Bill To Country is required.
Response Code: 3
Response Subcode: 2

As requested here (https://eventespresso.com/topic/adding-country-field-to-authorize-net-aim-form/), is there a way to change the aim_vars.php in order to add an input field for the Bill To Country?

Thanks in advance for your help. I would really prefer being able to use the AIM gateway rather than the SIM one.


Dean

April 22, 2014 at 6:39 am

Hi,

Country should not be required for AIM, it is possible to disable the city requirement in your authorize.net account’s settings.


Vittorio Pennazio

April 22, 2014 at 6:57 am

I have also tried adding in the following code to gateways/aim/aim_vars.php:

<code>&lt;p&gt;&lt;label for=&quot;country&quot;&gt;&lt;?php _e(&#039;Country&#039;, &#039;event_espresso&#039;); ?&gt;&lt;/label&gt;
&lt;input name=&quot;country&quot; type=&quot;text&quot; id=&quot;aim_country&quot; value=&quot;&lt;?php echo $country ?&gt;&quot;  class=&quot;required&quot; /&gt;&lt;/p&gt;</code>

And the following code in gateways/authnet/authnet_vars.php:
‘$myAuthorize->addField(‘x_Country’, $country);’

Thanks to the addition in the aim_vars, now the field for Country it shows in the front end, but apparently it still does not communicate that to Authorize.net, since I keep getting the “Bill To Country is required” error. What am I missing to get that field’s info conveyed to Authnet?

Please note: We are using the European gateway of Authorize.net. According to the developer’s guide, x_country is a required variable for European Payment processors. (http://www.authorize.net/support/AIM_guide.pdf – page 35)


Vittorio Pennazio

April 22, 2014 at 7:00 am

Hi Dean,
thanks for the prompt reply. Unfortunately, being the European version of Authnet the country field is required and that cannot be made non-mandatory. As quoted before from their website:

“Note: Any fields that are checked as “Required” below, will require a value for that field to be entered before the transaction can be processed, regardless of whether you use Advanced Integration Method (AIM) or Server Integration Method (SIM) for connecting to the payment gateway.

[and country is one of them]

So I guess the only way to get through is adding that field. As in my previous post, I’ve tried to “hack” it a bit, but still not getting there… have I missed a passage in adding a field to the AIM and Authnet variables?


Sidney Harrell

April 22, 2014 at 10:31 am

It looks like you are missing the step in between the form field submission and adding the field to the authnet submission. You had it right by adding the code to gateways/aim/aim_vars.php to add the form field. That will send the form to gateways/aim/aim_ipn.php (EE3, correct?). Take a look in that file around lines 35 – 47. You’ll need to add a similar line, like:

$transaction->country = $_POST['country'];


Vittorio Pennazio

April 22, 2014 at 11:58 am

Stunning! Thanks Sydney, now it works! 🙂

Viewing 5 reply threads

The support post ‘Authorize.net AIM gateway not working’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso