Class: Workarea::Zipco::BogusGateway

Inherits:
Object
  • Object
show all
Defined in:
lib/workarea/zipco/bogus_gateway.rb

Instance Method Summary collapse

Instance Method Details

#authorize(attrs, request_id = nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/workarea/zipco/bogus_gateway.rb', line 12

def authorize(attrs, request_id = nil)
  if attrs[:authority][:value] == "timeout_token"
    Response.new(response(nil, 502))
  else
    Response.new(response(capture_body))
  end
end

#capture(attrs, request_id = nil) ⇒ Object



8
9
10
# File 'lib/workarea/zipco/bogus_gateway.rb', line 8

def capture(attrs, request_id = nil)
  Response.new(response(capture_body))
end

#create_order(order) ⇒ Object



4
5
6
# File 'lib/workarea/zipco/bogus_gateway.rb', line 4

def create_order(order)
  Response.new(response(create_order_body))
end

#purchase(attrs, request_id = nil) ⇒ Object



20
21
22
# File 'lib/workarea/zipco/bogus_gateway.rb', line 20

def purchase(attrs, request_id = nil)
  Response.new(response(capture_body))
end