diff --git a/app/views/spree/admin/orders/_capture.html.haml b/app/views/spree/admin/orders/_capture.html.haml index 80a7481066..327c5cf320 100644 --- a/app/views/spree/admin/orders/_capture.html.haml +++ b/app/views/spree/admin/orders/_capture.html.haml @@ -1,5 +1,7 @@ --# copied from backend/app/views/spree/admin/payments/_list.html.erb - +- # Get the payment in 'checkout' state if any, and show capture button - if order.payments.present? - - order.payments.last.actions.grep(/^capture$/).each do |action| - = link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, order.payments.last, :e => action), :method => :put, :no_text => true, :data => {:action => action} + - payment = order.payments.select{|p| p if p.state == 'checkout'}.first + - if !payment.nil? + - payment.actions.grep(/^capture$/).each do |action| + - # copied from backend/app/views/spree/admin/payments/_list.html.erb + = link_to_with_icon "icon-#{action}", t(action), fire_admin_order_payment_path(order, payment, :e => action), :method => :put, :no_text => true, :data => {:action => action} diff --git a/libpeerconnection.log b/libpeerconnection.log new file mode 100644 index 0000000000..e69de29bb2