spree/spree_paypal_express — pull request #17 by matteofuzz (2011-11-16 14:51:01+00:00)
Title: Fix issues: #16 and #13

I fixed problems with process_coupon_code and fail! calls, issues #13 and #16.

But there's another error updating an order with a credit coupon_code because shipment adjustment has amount == nil in update_totals, line 468: self.adjustment_total = adjustments.eligible.map(&:amount).sum .

NoMethodError in CheckoutController#paypal_confirm

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.+

Rails.root: /Users/matteo/Development/RubyOnRails/docg
Application Trace | Framework Trace | Full Trace

activesupport (3.1.1) lib/active_support/core_ext/enumerable.rb:61:in `block in sum'
activesupport (3.1.1) lib/active_support/core_ext/enumerable.rb:61:in `each'
activesupport (3.1.1) lib/active_support/core_ext/enumerable.rb:61:in `inject'
activesupport (3.1.1) lib/active_support/core_ext/enumerable.rb:61:in `sum'
spree_core (0.70.1) app/models/order.rb:468:in `update_totals'
spree_core (0.70.1) app/models/order.rb:149:in `update!'
spree_core (0.70.1) app/models/payment.rb:110:in `update_order'