spree-contrib/spree_store_credits

exception when store_credits >= total_price

lewo opened this issue · 3 comments

lewo commented

When you use a store credit equal to the total amount of the price the following exception is raised:
NoMethodError in CheckoutController#update

versions
rails 3.0.3
spree edge
spree/spree_paypal_express (master)
spree/spree_store_credits
Payment methodpaypal_express

"You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.first"

/Users/leigh/.rvm/gems/ruby-1.9.2-p136/bundler/gems/spree_paypal_express-fbda45404806/app/controllers/checkout_controller_decorator.rb:186:in redirect_to_paypal_express_form_if_needed' activesupport (3.0.3) lib/active_support/callbacks.rb:481:in_run__3699436363602999251__process_action__1246387347323800035__callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:409:in _run_process_action_callbacks' activesupport (3.0.3) lib/active_support/callbacks.rb:93:inrun_callbacks'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:30:inblock in process_action'

This error raised in spree_paypal_express. Why you filed issue here?

lewo commented

yep sorry your correct, works ok with eway and other gateways. I thought it was in the checkout_controller_decorator.

BDQ commented

Cleanup