base authorization on the payment's order

This commit is contained in:
Andy Brett
2021-01-14 14:40:37 -08:00
parent 8bcaeff6c8
commit ce4621858d

View File

@@ -9,7 +9,7 @@ class PaymentsController < BaseController
def redirect_to_authorize
@payment = Spree::Payment.find(params[:id])
authorize! :show, @payment
authorize! :show, @payment.order
if url = @payment.cvv_response_message
redirect_to url