Unable to Authorize Credit Card: undefined local variable or method `logger' for #<ActiveMerchant::Billing::AuthorizeNetGateway:0x3bd2934>

92 views
Skip to first unread message

ravenna

unread,
Nov 19, 2009, 6:54:07 PM11/19/09
to Spree
This is the output from the log:

Unable to Authorize Credit Card: undefined local variable or method
`logger' for #<ActiveMerchant::Billing::AuthorizeNetGateway:
0x3bd2934> /Users/tjs/Sites/testcart/vendor/extensions/
active_shipping/vendor/plugins/active_shipping/lib/active_shipping/lib/
posts_data.rb:36:in `ssl_request'
/Users/tjs/Sites/testcart/vendor/extensions/active_shipping/vendor/
plugins/active_shipping/lib/active_shipping/lib/posts_data.rb:26:in
`ssl_post'
/Users/tjs/.gem/ruby/1.8/gems/activemerchant-1.4.2/lib/active_merchant/
billing/gateways/authorize_net.rb:239:in `commit'
/Users/tjs/.gem/ruby/1.8/gems/activemerchant-1.4.2/lib/active_merchant/
billing/gateways/authorize_net.rb:93:in `authorize'
/Users/tjs/Sites/testcart/vendor/plugins/delegate_belongs_to/lib/
delegate_belongs_to.rb:43:in `send'
/Users/tjs/Sites/testcart/vendor/plugins/delegate_belongs_to/lib/
delegate_belongs_to.rb:43:in `authorize'
/Users/tjs/Sites/testcart/vendor/extensions/payment_gateway/lib/spree/
payment_gateway.rb:6:in `authorize'
/Users/tjs/Sites/testcart/app/models/checkout.rb:28:in
`authorize_creditcard'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:178:in `send'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:178:in `evaluate_method'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:166:in `call'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:93:in `run'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:92:in `each'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:92:in `send'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:92:in `run'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
callbacks.rb:276:in `run_callbacks'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
callbacks.rb:344:in `callback'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
callbacks.rb:249:in `create_or_update'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
base.rb:2538:in `save_without_validation'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
validations.rb:1078:in `save_without_dirty'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
dirty.rb:79:in `save_without_transactions'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:229:in `send'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:229:in `with_transaction_returning_status'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/database_statements.rb:136:in
`transaction'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:182:in `transaction'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:228:in `with_transaction_returning_status'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:196:in `save'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:208:in `rollback_active_record_state!'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
transactions.rb:196:in `save'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
base.rb:2627:in `update_attributes'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
associations/association_proxy.rb:221:in `send'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
associations/association_proxy.rb:221:in `method_missing'
/Users/tjs/Sites/testcart/vendor/plugins/resource_controller/lib/
resource_controller/actions.rb:36:in `rc_update'
/Users/tjs/Sites/testcart/app/controllers/checkouts_controller.rb:
15:in `update'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:1331:in `send'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:1331:in `perform_action_without_filters'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
filters.rb:617:in `call_filters'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
filters.rb:610:in `perform_action_without_benchmark'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/usr/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/Users/tjs/.gem/ruby/1.8/gems/activesupport-2.3.4/lib/active_support/
core_ext/benchmark.rb:17:in `ms'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
benchmarking.rb:68:in `perform_action_without_rescue'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
rescue.rb:160:in `perform_action_without_flash'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
flash.rb:146:in `perform_action'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:532:in `send'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:532:in `process_without_filters'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
filters.rb:606:in `sass_old_process'
/usr/local/lib/ruby/gems/1.8/gems/haml-2.2.9/lib/sass/plugin/rails.rb:
19:in `process_without_compass'
/usr/local/lib/ruby/gems/1.8/gems/compass-0.8.17/lib/compass/
app_integration/rails/action_controller.rb:7:in `process'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:391:in `process'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
base.rb:386:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
routing/route_set.rb:437:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:87:in `dispatch'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:121:in `_call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:130:in `build_middleware_stack'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:29:in `call'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:29:in `call'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/query_cache.rb:34:in `cache'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:9:in `cache'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
query_cache.rb:28:in `call'
/Users/tjs/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/
connection_adapters/abstract/connection_pool.rb:361:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:
24:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
params_parser.rb:15:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rails-2.3.4/lib/rails/rack/metal.rb:
47:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
session/cookie_store.rb:93:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
failsafe.rb:26:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in
`synchronize'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:114:in `call'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
reloader.rb:34:in `run'
/Users/tjs/.gem/ruby/1.8/gems/actionpack-2.3.4/lib/action_controller/
dispatcher.rb:108:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:
31:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:46:in
`call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in
`each'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/urlmap.rb:40:in
`call'
/Users/tjs/.gem/ruby/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:
17:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:
13:in `call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
`call'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
61:in `process'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
`process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`each'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
`process_client'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
`run'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`initialize'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`new'
/usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
`run'
/Users/tjs/.gem/ruby/1.8/gems/rack-1.0.0/lib/rack/handler/mongrel.rb:
34:in `run'
/Users/tjs/.gem/ruby/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script/server:3


Any ideas? I have the active_shipping extension installed but I am
not using it yet. Just using flat shipping rates. As far as
Authorize.net , I have it setup as my development gateway with server
set to live, test mode to true and active set to true.

Roman Smirnov

unread,
Nov 20, 2009, 11:04:16 AM11/20/09
to Spree
Try to remove ActiveShipment, there are several issues caused by them,
see LH for details:
http://railsdog.lighthouseapp.com/projects/31096-spree/tickets?q=tagged%3A%22activeshipping%22

technorcal

unread,
Nov 20, 2009, 2:52:24 PM11/20/09
to Spree
Ravenna,
Did you see my response to your other post?

http://groups.google.com/group/spree-user/browse_thread/thread/5aecec438d0d3b8b/e133d40b61142dac?lnk=gst&q=active_shipping#e133d40b61142dac

I think this is the conflict between active_shipping and
active_merchant. Try removing active_shipping from the extensions
folder and restart and test. If that's the problem, then follow my
instructions in the other post and install the fixed branch of the
active_shipping plugin.

Good luck.
Let me know how it turns out.
Will Emerson

On Nov 19, 3:54 pm, ravenna <t...@ravennainteractive.com> wrote:
> This is the output from the log:
>
> Unable to Authorize Credit Card: undefined local variable or method
> `logger' for #<ActiveMerchant::Billing::AuthorizeNetGateway:
...
>
> Any ideas?  I have the active_shipping extension installed but I am
> not using it yet.  Just using flat shipping rates.  As far as
> Authorize.net ,...
>

ravenna

unread,
Nov 20, 2009, 4:49:16 PM11/20/09
to Spree
Thanks for that. I will do this and check back in

On Nov 20, 11:52 am, technorcal <wemer...@mcn.org> wrote:
> Ravenna,
> Did you see my response to your other post?
>
> http://groups.google.com/group/spree-user/browse_thread/thread/5aecec...

Sean Schofield

unread,
Nov 20, 2009, 5:27:04 PM11/20/09
to spree...@googlegroups.com
Will,

Is the active_shipping fix compatible with all versions of
active_merchant? If so, should we merge that into the master (of
extension)?

Sean Schofield

-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------
> --
>
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To post to this group, send email to spree...@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=.
>
>
>

ravenna

unread,
Nov 20, 2009, 6:23:08 PM11/20/09
to Spree
So I removed it and now I am getting back the following error. Unable
to Authorize Credit Card: Gateway Error ... (TESTMODE) The merchant
login ID or password is invalid or the account is inactive.

I am sure my account is active, and I am sure that I am using my
correct API Login ID and Transaction Key. Can you guys confirm that
setting up Authorize.net is as simple as adding it as a gateway in the
admin? and then adding the API Login ID and Transaction Key as the
username and password?

I was trying to roll my own ecommerce and decided to go with Spree
because more of the stuff I needed was already here. I followed
Rbates basic tutorials and have a purchase.rb file that if executed,
approves the transaction and I get the Authorize.net email. I am
using the same credentials.

thanks so much.


On Nov 20, 2:27 pm, Sean Schofield <s...@railsdog.com> wrote:
> Will,
>
> Is the active_shipping fix compatible with all versions of
> active_merchant?  If so, should we merge that into the master (of
> extension)?
>
> Sean Schofield
>
> -------------------------------------------
> Rails Dog LLC
> 2 Wisconsin Circle, Suite 700
> Chevy Chase, MD 20815
> voice: (301)560-2000
> -------------------------------------------
>
>
>
> On Fri, Nov 20, 2009 at 2:52 PM, technorcal <wemer...@mcn.org> wrote:
> > Ravenna,
> > Did you see my response to your other post?
>
> >http://groups.google.com/group/spree-user/browse_thread/thread/5aecec...

Sean Schofield

unread,
Nov 23, 2009, 10:31:09 AM11/23/09
to spree...@googlegroups.com
> I am sure my account is active, and I am sure that I am using my
> correct API Login ID and Transaction Key.  Can you guys confirm that
> setting up Authorize.net is as simple as adding it as a gateway in the
> admin?  and then adding the API Login ID and Transaction Key as the
> username and password?

Yes this should be all you need. I haven't tested lately, its
possible there is a bug in the gateway configuration stuff we just
added.

William Emerson

unread,
Nov 24, 2009, 1:57:44 AM11/24/09
to spree...@googlegroups.com
> Will,
>
> Is the active_shipping fix compatible with all versions of
> active_merchant? If so, should we merge that into the master (of
> extension)?
>
> Sean Schofield

Sean,
I only tested this with active_merchant 1.4.2. I don't know about any
other versions. My guess is that it will work with all since it is
only putting a wrapper around the calls to active_merchant to avoid
namespace errors but it should be tested.
Will Emerson

Sean Schofield

unread,
Nov 24, 2009, 10:24:06 AM11/24/09
to spree...@googlegroups.com
So have you tested against the edge version with a_m 1.4.2?

Sean Schofield

-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------



> --
>
> You received this message because you are subscribed to the Google Groups "Spree" group.
> To post to this group, send email to spree...@googlegroups.com.
> To unsubscribe from this group, send email to spree-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
>
>
>

technorcal

unread,
Nov 26, 2009, 2:56:21 AM11/26/09
to Spree
Sean,
Yes, tonight I updated to the latest edge version and merged it with
my copy of spree-demo and it worked fine with active_merchant_1.4.2
and the active_shipping extension with the forked version of
active_shipping.

On Nov 24, 7:24 am, Sean Schofield <s...@railsdog.com> wrote:
> So have you tested against the edge version with a_m 1.4.2?
>
> Sean Schofield
>
> -------------------------------------------
> Rails Dog LLC
> 2 Wisconsin Circle, Suite 700
> Chevy Chase, MD 20815
> voice: (301)560-2000
> -------------------------------------------
>

Sean Schofield

unread,
Nov 26, 2009, 11:28:23 AM11/26/09
to spree...@googlegroups.com
Thanks good to know everything works fine.

Sean Schofield

-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------



ravenna

unread,
Nov 30, 2009, 10:36:01 PM11/30/09
to Spree
William, Sean, Roman, etc... Thanks for your help so far. I un-
installed Active Shipping, reinstalled everything and it appears the
admin for the gateways has changed, is that correct?

The error I am getting now is :Unable to Authorize Credit Card:
Gateway Error ... Bogus Gateway: Forced failure

Is this still an issue with ActiveShipping. I have Auth.net test
account credentials...

thanks

TJ

Sean Schofield

unread,
Dec 1, 2009, 9:00:06 AM12/1/09
to spree...@googlegroups.com
This message indicates you are not using Authorize.net but you are
using the Bogus Gateway instead. And yes, the gateway admin has
changed in the edge (see the recent blog post on that[1])

Sean Schofield

[1] http://spreecommerce.com/blog/2009/11/04/new-on-edge-improved-gateway-configuration/

-------------------------------------------
Rails Dog LLC
2 Wisconsin Circle, Suite 700
Chevy Chase, MD 20815
voice: (301)560-2000
-------------------------------------------



ravenna

unread,
Dec 1, 2009, 12:25:06 PM12/1/09
to Spree
Thats what I figured. The new admin has a drop down, which affects
which fields show up. If I select Authorize.net it shows the 2 fields
for that. I enter my info and update(button)... I figured something
wasn't right when the Bogus Gateway error showed up. Is there any
configuring I need to do to force it to use authorize.net?

thanks so much

On Dec 1, 6:00 am, Sean Schofield <s...@railsdog.com> wrote:
> This message indicates you are not using Authorize.net but you are
> using the Bogus Gateway instead.  And yes, the gateway admin has
> changed in the edge (see the recent blog post on that[1])
>
> Sean Schofield
>
> [1]http://spreecommerce.com/blog/2009/11/04/new-on-edge-improved-gateway...

elcid

unread,
Jan 25, 2010, 4:06:06 AM1/25/10
to Spree

Did you have to do a configuration to force it? We are trying to do
the Paypal option but it is also giving us the same error...

Unable to Authorize Credit Card: Gateway Error ... Bogus Gateway:
Forced failure


:)

elcid

unread,
Jan 25, 2010, 4:14:08 AM1/25/10
to Spree
Running spree version 0.9.4

My friend has v=0.9.99

I tried doing spree --update but it still stays at 0.9.4

elcid

unread,
Feb 5, 2010, 4:07:12 PM2/5/10
to Spree

I have not been able to fix this error, but on the bright side, we
have finished our extension for multiple-users and should be up on our
github account so that everybody can download it.

As far as this problem goes, we have activated our PayPal sandbox
account and are using one given to us to test out our app. We enter
the information on the gateway option and it is updated successfully
yet when we place the order it still gives us that dreaded: "Unable to


Authorize Credit Card: Gateway Error ... Bogus Gateway:Forced

failure" error.

Was anybody able to fix this problem? I've tried running it in
production mode and it's of no use. Running Spree version 0.9.4.

elcid

unread,
Feb 5, 2010, 4:15:05 PM2/5/10
to Spree

Trying out the new Spree PayPal extension:

http://github.com/railsdog/spree-paypal-express

elcid

unread,
Feb 5, 2010, 4:17:13 PM2/5/10
to Spree
Was anybody able to get their PayPal gatweway working without this
extension?
Reply all
Reply to author
Forward
0 new messages