mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Bypass after_rollback callback in payment
This is causing several specs to fail on rollback and, according to some manual testing (and all the auto tests we have), we dont need this fix in OFN
This commit is contained in:
@@ -12,6 +12,13 @@ module Spree
|
||||
|
||||
localize_number :amount
|
||||
|
||||
# We bypass this after_rollback callback that is setup in Spree::Payment
|
||||
# The issues the callback fixes are not experienced in OFN:
|
||||
# if a payment fails on checkout the state "failed" is persisted correctly
|
||||
def persist_invalid
|
||||
return
|
||||
end
|
||||
|
||||
def ensure_correct_adjustment
|
||||
revoke_adjustment_eligibility if ['failed', 'invalid'].include?(state)
|
||||
return if adjustment.try(:finalized?)
|
||||
|
||||
Reference in New Issue
Block a user