StoreFront allows using any payment gateway that supports or can emulate the Authorize.Net SIM API. This feature can be used to use StoreFront with gateways it doesn't support yet or to develop custom payment modules.
Using gateways that can emulate Authorize.Net SIM
If you want to use a gateway that isn't supported yet but can emulate Authorize.Net, follow these steps:
- Log in to your StoreFront control panel and open the "System Settings → Payment" page.
- Choose the "Authorize.Net SIM" option for the "Credit card" payment method.
- Click the "Account details" link, a pop-up will appear.
- Click the "Advanced settings" link, then change the endpoint URL to the one provided by your payment gateway.
- Set the other fields as your payment gateway asks you to and save the changes.
After that if a customer uses the "Credit Card" method, he will use your new payment gateway.
Custom payment gateways
If StoreFront doesn't support a payment gateway you want, you can create an integration yourself. You should create a script that will emulate the Authorize.Net SIM and act as a bridge between StoreFront and your unsupported gateway.
In a nutshell:
- Set up Authorize.Net SIM in your StoreFront control panel, but change the endpoint to your script's URL. Important note: you don't need to have an Authorize.Net account to use other payment gateways in the "Authorize.Net emulation" mode.
- When a customer selects this payment method, StoreFront will post the necessary order and transaction details to your script.
- Then your script should get this data and post it to the gateway you want to integrate with StoreFront. A customer finishes the transaction there and returns to your script.
- Then your script should analyze the response from your custom gateway, send it to StoreFront and return the customer to the store.
Authorize.Net SIM API docs:
You don't need to emulate all API calls/fields there though, just the ones StoreFront uses. Here is a list of mandatory fields that must present in your custom gateway's response:
The first two (x_response_code and x_response_reason_code) affects the order status.
Of course, you may need to include some other fields except the listed above, depending on how your custom gateway processes payments and what data it returns. For example, if an error occurs and a transaction fails, you will probably need to pass error descriptions to StoreFront from your scripts. For the details, please refer to the Authorize.Net documentation mentioned above.
By the way, regardless of the fact that custom information isn't included in the six listed fields, it is successfully saved by StoreFront before sending a customer to the payment gateway. Thus even if you don't include customer info in payment responses, it will be saved among the other order information in StoreFront.