core/app/models/spree/payment_method.rb
# Used by Spree::Payment#cancel!
#
# Implement `try_void` on your payment method implementation to handle void attempts.
# In that method return a ActiveMerchant::Billing::Response object if the void succeeds.
# Return +false+ or +nil+ if the void is not possible anymore - because it was already processed by the bank.
# Solidus will refund the amount of the payment in this case.
#
# @return [ActiveMerchant::Billing::Response] with +true+ if the void succeeded
# @return [ActiveMerchant::Billing::Response] with +false+ if the void failed
# @return [false] if it can't be voided at this time
#
Used by Spree::Payment#cancel.
Implement `try_void` on your payment method implementation to handle void attempts.
In that method return a ActiveMerchant::Billing::Response object if the void succeeds.
Return +false+ or +nil+ if the void is not possible anymore - because it was already processed by the bank.
Solidus will refund the amount of the payment in this case.
Used by Spree :: Payment#cancel . Implement ` try_void ` on your payment method implementation to handle void attempts . In that method return a ActiveMerchant :: Billing :: Response object if the void succeeds . Return + false + or + nil + if the void is not possible anymore - because it was already processed by the bank . Solidus will refund the amount of the payment in this case .
def try_void(_payment)
      raise ::NotImplementedError,
        "You need to implement `try_void` for #{self.class.name}. In that " \
        'return a ActiveMerchant::Billing::Response object if the void succeeds '\
        'or `false|nil` if the void is not possible anymore. ' \
        'Solidus will refund the amount of the payment then.'
    end
def try_void ( _payment ) raise :: NotImplementedError , "You need to implement `try_void` for #{self.class.name}. In that " 'return a ActiveMerchant::Billing::Response object if the void succeeds ' 'or `false|nil` if the void is not possible anymore. ' 'Solidus will refund the amount of the payment then.' end
Used by Spree::Payment#cancel!
Used by Spree :: Payment#cancel!
with +true+ if the void succeeded
with + true + if the void succeeded
ActiveMerchant::Billing::Response
with +false+ if the void failed
with + false + if the void failed
ActiveMerchant::Billing::Response
if it can't be voided at this time
if it can ' t be voided at this time
false
_payment