Skip to content

Commit

Permalink
Accept source attributes in PaymentsController to fix backend payment…
Browse files Browse the repository at this point in the history
… processing.
  • Loading branch information
heisenbugged authored and radar committed Oct 8, 2013
1 parent 2590322 commit d119d73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/app/controllers/spree/admin/payments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def object_params
if params[:payment] and params[:payment_source] and source_params = params.delete(:payment_source)[params[:payment][:payment_method_id]]
params[:payment][:source_attributes] = source_params
end
params.require(:payment).permit(:amount, :payment_method_id, :source_attributes)
params.require(:payment).permit(:amount, :payment_method_id, source_attributes: [:number, :expiry, :verification_value])
end

def load_data
Expand All @@ -86,7 +86,7 @@ def load_data
end

def can_transition_to_payment
unless @order.billing_address.present?
unless @order.billing_address.present?
flash[:notice] = Spree.t(:fill_in_customer_info)
redirect_to edit_admin_order_customer_url(@order)
end
Expand Down

0 comments on commit d119d73

Please sign in to comment.