Sha256: a7ab17f48a7a47c64858dda1e3cc360110027dc3636c4782eb6884571b783447
Contents?: true
Size: 487 Bytes
Versions: 100
Compression:
Stored size: 487 Bytes
Contents
module Spree module Checkout class Complete prepend Spree::ServiceModule::Base def call(order:) Spree::Dependencies.checkout_next_service.constantize.call(order: order) until cannot_make_transition?(order) if order.reload.complete? success(order) else failure(order) end end private def cannot_make_transition?(order) order.complete? || order.errors.present? end end end end
Version data entries
100 entries across 100 versions & 1 rubygems