Permalink
Browse files

Move started_processing! to authorize! and purchase! methods inside P…

…rocessing

This is so we can call these methods manually without going through process
  • Loading branch information...
1 parent 65b1eec commit 3d4b6e44b81c2fdce93b523de6c346b5fbc2029e @radar radar committed Apr 17, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/app/models/spree/payment/processing.rb
@@ -5,7 +5,6 @@ def process!
if payment_method && payment_method.source_required?
if source
if !processing?
- started_processing!
if Spree::Config[:auto_capture]
purchase!
else
@@ -19,10 +18,12 @@ def process!
end
def authorize!
+ started_processing!
gateway_action(source, :authorize, :pend)
end
def purchase!
+ started_processing!
gateway_action(source, :purchase, :complete)
end

0 comments on commit 3d4b6e4

Please sign in to comment.