Gateway Emulator Documentation > Prebuilt Templates

Configuring Magento for The Gateway using the Emulator

1)            With a working install of Magento, enable the Authorize.net (AIM) payment module. There are 4 settings in the module configuration that will be relevant to enabling traffic to the emulator

a.    Enabld: Enables/disables the module in Magento. This must be True for the module to work.

b.    API Login ID: This will be a username (must be an API user) in The Gateway.

c.     Transaction Key: This is the password for the user entered in the Login ID field.

d.    Gateway URL: This is directly configurable in the Magento UI and will point to the emulator on the The Gateway servers: https://<assigned domain>/Emulator/handler.ashx?EmulatorID=<ID OF THE EMULATOR YOU WILL ADD IN THE FOLLOWING STEP>

2)            Create an emulator in The Gateway that will be used for this integration. Save the values on the first screen, which will enable the fields tab.

a.    Method: Authorize.net AIM for Magento uses Post

b.    Description: Any value recognizable to the user

c.     Source IP: An advanced option, allowing The Gateway to determine which Emulator profile to load based on the client ip address, as opposed to supplying an Emulator ID in the request

3)            Load the Authorize.net (Magento/OSCommerce) template. This will create a number of pre-mapped request and response fields needed to match the Authorize.net response and request to the The Gateway request and response.

 

4)            Finally, several of the Authorize.net fields do not have a direct value conversion to The Gateway. For example, an approval on The Gateway will have a Result Code of 0. On Authorize.net, an approval will have a Response Code of 1. It is not enough to simply map the Result Code of The Gateway to the Response Code of Authorize.net – 0 has no meaning for this field on Authorize.net. In addition to mapping the field, The Gateway’s Emulator will also use a Value Map to properly handle this field (found under Advanced properties of a field mapping)

 

This particular map will convert a result of 0 from The Gateway to a 1 for Authorize.net. Additionally, it will convert a value of 12 (decline) from The Gateway to a 2 for Authorize.net. Additional value maps can be added as needed.

Value Maps are also important for the Transaction Type field in the request. Similar to the Response Code, the conversion is not straight across.

 

These values are preloaded with the Authorize.net template.