Skip to content

Commit

Permalink
Payment method fee is not applied when orders payment state is credit…
Browse files Browse the repository at this point in the history
…_owed
  • Loading branch information
apricot12 committed Jan 11, 2022
1 parent a8b9d97 commit 2ca0447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/spree/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ def payment_source
end

def ensure_correct_adjustment
revoke_adjustment_eligibility if ['failed', 'invalid', 'void'].include?(state) || can_credit?
return if adjustment.try(:finalized?)
revoke_adjustment_eligibility if ['failed', 'invalid', 'void'].include?(state)
return if adjustment.try(:finalized?) || order.payment_state == 'credit_owed'

if adjustment
adjustment.originator = payment_method
Expand Down

0 comments on commit 2ca0447

Please sign in to comment.