Posted: 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): 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. |
|
|
Hi, Country should not be required for AIM, it is possible to disable the city requirement in your authorize.net account’s settings. |
I have also tried adding in the following code to gateways/aim/aim_vars.php: <code><p><label for="country"><?php _e('Country', 'event_espresso'); ?></label> <input name="country" type="text" id="aim_country" value="<?php echo $country ?>" class="required" /></p></code> And the following code in gateways/authnet/authnet_vars.php: 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) |
|
Hi Dean,
[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? |
|
|
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']; |
Stunning! Thanks Sydney, now it works! 🙂 |
|
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.