From a18fd54916cbf0d5c678f1e5a1edce0a40cbd26d Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Wed, 27 Aug 2025 03:27:09 +0500 Subject: [PATCH] Simplify redirect logic in PaymentsController --- app/controllers/payments_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/controllers/payments_controller.rb b/app/controllers/payments_controller.rb index 48bcd08f3c..39f8cfa02c 100644 --- a/app/controllers/payments_controller.rb +++ b/app/controllers/payments_controller.rb @@ -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