search for: process_with_active_merchant

Displaying 2 results from an estimated 2 matches for "process_with_active_merchant".

2007 Oct 13
4
Chapter 9
...:card_verification_value, :in => 3..4, :on => :create has_many :order_items has_many :books, :through => :order_items def total order_items.inject(0) {|sum, n| n.price * n.amount + sum} end always def process if closed? raise "Order is closed" begin process_with_active_merchant rescue => e logger.error("Order #{id} failed with error message #{e}") self.error_message = ''Error while processing order'' self.status = ''failed'' end save! self.status == ''processed'' end end d...
2008 Feb 28
2
random exception driving me crazy: SecurityError (Insecure: can't modify array)
...logger.rb:68:in `<<'' [RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/buffered_logger.rb:68:in `add'' [RAILS_ROOT]/vendor/rails/activesupport/lib/active_support/buffered_logger.rb:75:in `warn'' [RAILS_ROOT]/app/models/order.rb:244:in `process_with_active_merchant'' [RAILS_ROOT]/vendor/plugins/acts_as_state_machine/lib/acts_as_state_machine.rb:162:in `call'' The line in my model class, order.rb, that causes the exception is the following: logger.warn("Processing order with payment gateway") Now, I could probably just remo...