Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Stop using deprecated payment create
Browse files Browse the repository at this point in the history
Solidus now expects us to use a PaymentCreate class instead of assigning
the source attributes via magic.
  • Loading branch information
adammathys committed Sep 2, 2016
1 parent 99f0f53 commit fe28998
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ class SolidusPaypalBraintree::CheckoutsController < Spree::CheckoutController
].freeze

def update
@order.payments.create!(payment_params)
@payment = Spree::PaymentCreate.new(@order, payment_params).build

render text: 'ok'
if @payment.save
render text: "ok"
else
render text: "not-ok"
end
end

def order_params
Expand Down

0 comments on commit fe28998

Please sign in to comment.