mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Simplify redirect logic in PaymentsController
This commit is contained in:
@@ -9,11 +9,7 @@ class PaymentsController < BaseController
|
||||
@payment = Spree::Payment.find(params[:id])
|
||||
authorize! :show, @payment.order
|
||||
|
||||
if (url = @payment.redirect_auth_url)
|
||||
redirect_to url
|
||||
else
|
||||
redirect_to order_url(@payment.order)
|
||||
end
|
||||
redirect_to(@payment.redirect_auth_url || order_url(@payment.order))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user