I'm trying to get a small ruby file up and running to test how the EwayManagedGateway works.
I'm looking at using Eway to store a users credit card details so I don't need to store them in the site db.
Here is the documentation for EwayManagedGateway
http://rdoc.info/github/Shopify/active_merchant/master/ActiveMerchant/Billing/EwayManagedGateway
I've created a simple ruby file to test this.
require "rubygems"
require "activemerchant"
ActiveMerchant::Billing::Base.mode = :test
gateway = ActiveMerchant::Billing::EwayManagedGateway.new(
:login => '99999999',
:username => 'myusername',
:password => 'password'
)
I've based this code on what is supplied in the standard eway documentation which works.
http://rdoc.info/github/Shopify/active_merchant/master/ActiveMerchant/Billing/EwayGateway
Here's the output error
NameError: uninitialized constant ActiveMerchant::Billing::EwayManagedGateway
at top level in managed_payments.rb at line 6
Program exited with code #1 after 0.26 seconds.
I'm running Rails 3 and activemerchant 1.12.1
Docs on github specific to eway_managed payments. https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/gateways/eway_managed.rb
The cause of my problem was related to me using activemerchant gem 1.11.0. Once I upgraded my gem to 1.15.0 I didn't have the error any further.