We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c9ef7c commit 448aaf1Copy full SHA for 448aaf1
1 file changed
core/app/models/spree/payment/processing.rb
@@ -166,12 +166,14 @@ def handle_void_response(response)
166
167
# @raises Spree::Core::GatewayError
168
def check_payment_preconditions!
169
- return if payment_method.nil?
+ return if processing?
170
+ return unless payment_method
171
return unless payment_method.source_required?
172
+
173
unless source
174
gateway_error(I18n.t('spree.payment_processing_failed'))
175
end
- return if processing?
176
177
unless payment_method.supports?(source)
178
invalidate!
179
gateway_error(I18n.t('spree.payment_method_not_supported'))
0 commit comments