Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthorizeNet Gateway Error (3-0 Stable) #6209

Closed
matchapat opened this issue Mar 20, 2015 · 6 comments
Closed

AuthorizeNet Gateway Error (3-0 Stable) #6209

matchapat opened this issue Mar 20, 2015 · 6 comments

Comments

@matchapat
Copy link

I'm getting the following error: undefined method track_data' for #Spree::CreditCard:0x007fdb5a1b3b30`

Gateway Config:

  • Use valid test login/pass for AuthNet
  • Test Mode (enabled)
  • Autocapture (false)

Running a fresh 3-0 stable build.

My first hunch was that there was an issue with cc_type and jquery.payments but after checking the logs cc_type was being sent. I've tried numerous CC #'s and with no luck. Tried using diff gateway configs as listed here here. Tried using a new transaction key. Not sure what's going on...

Thanks for the help!

Gemfile

Full Trace:

activemodel (4.2.0) lib/active_model/attribute_methods.rb:433:in `method_missing'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:181:in `add_credit_card'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:135:in `add_payment_source'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:64:in `block (2 levels) in authorize'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:391:in `call'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:391:in `insert'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:375:in `method_missing'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:60:in `block in authorize'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:336:in `block (2 levels) in post_data'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:391:in `call'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:391:in `insert'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:375:in `method_missing'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:331:in `block in post_data'
nokogiri (1.6.6.2) lib/nokogiri/xml/builder.rb:293:in `initialize'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:330:in `new'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:330:in `post_data'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:313:in `commit'
activemerchant (1.46.0) lib/active_merchant/billing/gateways/authorize_net.rb:58:in `authorize'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/gateway.rb:3:in `authorize'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:117:in `block in gateway_action'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:150:in `protect_from_connection_error'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:116:in `gateway_action'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:84:in `process_authorization'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:19:in `block in authorize!'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:103:in `handle_payment_preconditions'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:19:in `authorize!'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/payment/processing.rb:14:in `process!'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/payments.rb:53:in `public_send'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/payments.rb:53:in `block in process_payments_with'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/payments.rb:50:in `each'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/payments.rb:50:in `process_payments_with'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/payments.rb:23:in `process_payments!'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/core/app/models/spree/order/checkout.rb:78:in `block (2 levels) in define_state_machine!'
state_machines (0.2.2) lib/state_machines/eval_helpers.rb:79:in `call'
state_machines (0.2.2) lib/state_machines/eval_helpers.rb:79:in `evaluate_method'
state_machines (0.2.2) lib/state_machines/callback.rb:192:in `block in run_methods'
state_machines (0.2.2) lib/state_machines/callback.rb:191:in `each'
state_machines (0.2.2) lib/state_machines/callback.rb:191:in `run_methods'
state_machines (0.2.2) lib/state_machines/callback.rb:159:in `call'
state_machines (0.2.2) lib/state_machines/transition.rb:364:in `before'
state_machines (0.2.2) lib/state_machines/transition.rb:190:in `block in run_callbacks'
state_machines (0.2.2) lib/state_machines/transition.rb:292:in `block in pausable'
state_machines (0.2.2) lib/state_machines/transition.rb:292:in `catch'
state_machines (0.2.2) lib/state_machines/transition.rb:292:in `pausable'
state_machines (0.2.2) lib/state_machines/transition.rb:190:in `run_callbacks'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:127:in `run_callbacks'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:63:in `catch'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:63:in `block in perform'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:182:in `block in within_transaction'
state_machines (0.2.2) lib/state_machines/transition.rb:171:in `block in within_transaction'
state_machines (0.2.2) lib/state_machines/machine.rb:1866:in `within_transaction'
state_machines (0.2.2) lib/state_machines/transition.rb:170:in `within_transaction'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:181:in `within_transaction'
state_machines (0.2.2) lib/state_machines/transition_collection.rb:62:in `perform'
state_machines (0.2.2) lib/state_machines/transition.rb:163:in `perform'
state_machines (0.2.2) lib/state_machines/event.rb:155:in `fire'
state_machines (0.2.2) lib/state_machines/event.rb:219:in `block in add_actions'
state_machines (0.2.2) lib/state_machines/machine.rb:725:in `call'
state_machines (0.2.2) lib/state_machines/machine.rb:725:in `block (2 levels) in define_helper'
/Users/Patrick/.rvm/gems/ruby-2.2.0/bundler/gems/spree-6e108f86cd4c/frontend/app/controllers/spree/checkout_controller.rb:30:in `update'
actionpack (4.2.0) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (4.2.0) lib/abstract_controller/base.rb:198:in `process_action'
actionpack (4.2.0) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (4.2.0) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
activesupport (4.2.0) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:117:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:151:in `block in halting_and_conditional'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:234:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:234:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:234:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:234:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:169:in `block in halting'
activesupport (4.2.0) lib/active_support/callbacks.rb:92:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:92:in `_run_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0) lib/abstract_controller/callbacks.rb:19:in `process_action'
actionpack (4.2.0) lib/action_controller/metal/rescue.rb:29:in `process_action'
actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in `block in instrument'
activesupport (4.2.0) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
activesupport (4.2.0) lib/active_support/notifications.rb:164:in `instrument'
actionpack (4.2.0) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
actionpack (4.2.0) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
activerecord (4.2.0) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
actionpack (4.2.0) lib/abstract_controller/base.rb:137:in `process'
actionview (4.2.0) lib/action_view/rendering.rb:30:in `process'
actionpack (4.2.0) lib/action_controller/metal.rb:195:in `dispatch'
actionpack (4.2.0) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
actionpack (4.2.0) lib/action_controller/metal.rb:236:in `block in action'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `call'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:42:in `serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
railties (4.2.0) lib/rails/engine.rb:518:in `call'
railties (4.2.0) lib/rails/railtie.rb:194:in `public_send'
railties (4.2.0) lib/rails/railtie.rb:194:in `method_missing'
actionpack (4.2.0) lib/action_dispatch/routing/mapper.rb:51:in `serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:43:in `block in serve'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `each'
actionpack (4.2.0) lib/action_dispatch/journey/router.rb:30:in `serve'
actionpack (4.2.0) lib/action_dispatch/routing/route_set.rb:802:in `call'
warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
warden (1.2.3) lib/warden/manager.rb:34:in `catch'
warden (1.2.3) lib/warden/manager.rb:34:in `call'
rack (1.6.0) lib/rack/etag.rb:24:in `call'
rack (1.6.0) lib/rack/conditionalget.rb:38:in `call'
rack (1.6.0) lib/rack/head.rb:13:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/flash.rb:260:in `call'
rack (1.6.0) lib/rack/session/abstract/id.rb:225:in `context'
rack (1.6.0) lib/rack/session/abstract/id.rb:220:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/cookies.rb:560:in `call'
activerecord (4.2.0) lib/active_record/query_cache.rb:36:in `call'
activerecord (4.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:647:in `call'
activerecord (4.2.0) lib/active_record/migration.rb:378:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `call'
activesupport (4.2.0) lib/active_support/callbacks.rb:88:in `_run_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:734:in `_run_call_callbacks'
activesupport (4.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks'
actionpack (4.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/reloader.rb:73:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
web-console (2.1.2) lib/web_console/middleware.rb:37:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.0) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.0) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.0) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.0) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.0) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
actionpack (4.2.0) lib/action_dispatch/middleware/static.rb:113:in `call'
rack (1.6.0) lib/rack/sendfile.rb:113:in `call'
railties (4.2.0) lib/rails/engine.rb:518:in `call'
railties (4.2.0) lib/rails/application.rb:164:in `call'
rack (1.6.0) lib/rack/lock.rb:17:in `call'
rack (1.6.0) lib/rack/content_length.rb:15:in `call'
rack (1.6.0) lib/rack/handler/webrick.rb:89:in `service'
/Users/Patrick/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
/Users/Patrick/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
/Users/Patrick/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'`
@JDutil
Copy link
Member

JDutil commented Mar 20, 2015

It looks like the issue is that a Spree::CreditCard object is what is being passed into active_merchant, and it's trying to call the track_data method which I'm not sure what it's for but we don't have a track_data method on our credit card model. We may need to call #to_active_merchant on the Spree::CreditCard object before passing it to active_merchant so that it's a ActiveMerchant::::Billing::CreditCard object that's passed instead.

@JDutil
Copy link
Member

JDutil commented Mar 20, 2015

Can you please try updating your active_merchant to v1.47.0 from the 1.46.0 that you're on now.

@JDutil
Copy link
Member

JDutil commented Mar 20, 2015

Also please file gateway issues on spree_gateway instead of here in the future.

@matchapat
Copy link
Author

Sorry about that - will file spree_gateway next time. Getting the same error after updating to active_merchant v1.47.0. Where should I call the to_active_merchant method?

JDutil pushed a commit to JDutil/spree that referenced this issue Mar 20, 2015
@matchapat
Copy link
Author

@JDutil Thanks for this! It fixed it up for me.

@JDutil JDutil closed this as completed in 729c7a6 Mar 20, 2015
@hutch78
Copy link

hutch78 commented May 8, 2015

This also fixed the issue for me, thanks @JDutil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants