Class: ActiveMerchant::Billing::BogusUsaEpayGateway

Inherits:
BogusGateway
  • Object
show all
Defined in:
lib/usaepay/bogus_usaepay.rb

Instance Method Summary collapse

Instance Method Details

#verify(paysource, options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/usaepay/bogus_usaepay.rb', line 4

def verify(paysource, options)
  case normalize(paysource)
  when /1$/
    Response.new(true, SUCCESS_MESSAGE, {:billingid => '1', :token => '1'}, :test => true, :authorization => AUTHORIZATION)
  when /2$/
    Response.new(false, FAILURE_MESSAGE, {:billingid => nil, :error => FAILURE_MESSAGE }, :test => true, :error_code => STANDARD_ERROR_CODE[:processing_error])
  else
    raise Error, error_message(paysource)
  end
end