app/controllers/spree/api/payments_controller.rb in solidus_api-2.1.0 vs app/controllers/spree/api/payments_controller.rb in solidus_api-2.1.1
- old
+ new
@@ -14,9 +14,10 @@
@payment_methods = Spree::PaymentMethod.available_to_users.available_to_admin
respond_with(@payment_method)
end
def create
+ @order.validate_payments_attributes(payment_params)
@payment = PaymentCreate.new(@order, payment_params).build
if @payment.save
respond_with(@payment, status: 201, default_template: :show)
else
invalid_resource!(@payment)