Sha256: cf84efa888d8a7418f7d9314202e1b188a067d0b403cc75b56df70dc8a77b6b0
Contents?: true
Size: 596 Bytes
Versions: 12
Compression:
Stored size: 596 Bytes
Contents
Spree::Order.class_eval do # Make sure the order confirmation is delivered when the order has been paid for. def finalize! # lock all adjustments (coupon promotions, etc.) all_adjustments.each(&:close) # update payment and shipment(s) states, and save updater.update_payment_state shipments.each do |shipment| shipment.update!(self) shipment.finalize! end updater.update_shipment_state save! updater.run_hooks touch :completed_at deliver_order_confirmation_email unless confirmation_delivered? or !paid? consider_risk end end
Version data entries
12 entries across 12 versions & 1 rubygems