From 4e3594b8f8d0bb71101be06ba82d14389491aef7 Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Wed, 3 Feb 2021 09:09:05 -0800 Subject: [PATCH] remove redundant url check method --- app/services/checkout/stripe_redirect.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/services/checkout/stripe_redirect.rb b/app/services/checkout/stripe_redirect.rb index e7c40a4b9e..81ed0e9313 100644 --- a/app/services/checkout/stripe_redirect.rb +++ b/app/services/checkout/stripe_redirect.rb @@ -15,7 +15,7 @@ module Checkout payment = OrderManagement::Subscriptions::StripeScaPaymentAuthorize.new(@order).call! raise if @order.errors.any? - field_with_url(payment) if url?(field_with_url(payment)) + field_with_url(payment) end private @@ -28,14 +28,8 @@ module Checkout payment_method.is_a?(Spree::Gateway::StripeSCA) end - def url?(string) - return false if string.blank? - - string.starts_with?("http") - end - # Stripe::AuthorizeResponsePatcher patches the Stripe authorization response - # so that this field stores the redirect URL + # so that this field stores the redirect URL. It also verifies that it is a Stripe URL. def field_with_url(payment) payment.cvv_response_message end