Skip to content

Commit

Permalink
Fix log lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sauloperez committed Jul 10, 2020
1 parent 38bbbf3 commit 64f67fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/models/spree/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ def build_source
def actions
return [] unless payment_source&.respond_to?(:actions)

actions = payment_source.actions.select { |action| !payment_source.respond_to?("can_#{action}?") || payment_source.send("can_#{action}?", self) }
actions = payment_source.actions.select do |action|
!payment_source.respond_to?("can_#{action}?") || payment_source.send("can_#{action}?", self)
end

if payment_method.is_a? Gateway::Pin
actions << 'refund' if actions.include? 'credit'
Expand Down Expand Up @@ -162,7 +164,8 @@ def validate_source
end

def profiles_supported?
payment_method.respond_to?(:payment_profiles_supported?) && payment_method.payment_profiles_supported?
payment_method.respond_to?(:payment_profiles_supported?) &&
payment_method.payment_profiles_supported?
end

def create_payment_profile
Expand Down

0 comments on commit 64f67fc

Please sign in to comment.