Method: Spree::PaymentMethod::BogusCreditCard#capture

Defined in:
app/models/spree/payment_method/bogus_credit_card.rb

#capture(_money, authorization, _gateway_options) ⇒ Object



55
56
57
58
59
60
61
62
# File 'app/models/spree/payment_method/bogus_credit_card.rb', line 55

def capture(_money, authorization, _gateway_options)
  message_detail = " - #{__method__}"
  if authorization == '12345'
    ActiveMerchant::Billing::Response.new(true, SUCCESS_MESSAGE + message_detail, {}, test: true)
  else
    ActiveMerchant::Billing::Response.new(false, FAILURE_MESSAGE + message_detail, error: FAILURE_MESSAGE + message_detail, test: true)
  end
end