No commit activity in last 3 years
No release in over 3 years
Allows easy Authorize.net gateway integration in a Stall e-commerce app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0

Runtime

 Project Readme

Stall::AuthorizeDotNet

This gem allows integrating your Stall e-commerce app with the Authorize.net online payment gateway solution.

This gem is just the glue between Stall and the offsite_payments gem.

Installation

Add this line to your application's Gemfile :

gem 'stall-authorize_dot_net'

And then execute:

$ bundle

Or install it yourself as:

$ gem install stall-authorize_dot_net

Then use the install generator to copy the config template file :

$ rails generator stall:authorize_dot_net:install

Usage

You first need to configure the gateway by filling the required variables in that were added to the stall config initialize.

By default, it is configured to fetch from the variables from the environment, so ideally, just create the following env vars :

  • AUTHORIZE_NET_ACCOUNT
  • AUTHORIZE_NET_TRANSACTION_KEY
  • AUTHORIZE_NET_MD5_HASH

Note that you must set the AUTHORIZE_NET_MD5_HASH value in your Authorize.net account security "MD5 Hash" section. This acts as a token used to authenticate Authorize.net incoming requests for payment notifications. More informations : https://support.authorize.net/authkb/index?page=content&id=A588

Restart your server, and you should now be able to use the Authorize.net payment gateway in test mode.

When you're ready to switch to production, juste set the following environment variable :

  • AUTHORIZE_NET_PRODUCTION_MODE=true

Just like the other settings, you can change the way it's configured in the stall initializer file.

Sandbox account

By default, the Authorize.net gateway is configured to run in test mode.

To run your tests, you'll want to create a Sandbox account at : https://sandbox.authorize.net and use the provided credentials to run your payment tests, before switching to production with your real credentials.

Automatic response URL

You need to provide a payment response URL to your bank which will be :

<http|https>://<YOUR_DOMAIN>/authorize_dot_net/payment/notify

You can find the route with :

rake routes | grep payment/notify

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/stall-rails/stall-authorize_dot_net.

License

The gem is available as open source under the terms of the MIT License.