lib/i2x/cashier.rb in i2x-0.0.5 vs lib/i2x/cashier.rb in i2x-0.0.6

- old
+ new

@@ -1,13 +1,9 @@ require 'rest_client' -require 'open-uri' - module I2X class Cashier - - public ## # = Verify # => Verify if items have already been seen in the past (on the cache). @@ -21,12 +17,11 @@ def self.verify cache, agent, payload, seed #puts "[i2x][Cashier] verifying\n\taccess token: #{I2X::Config.access_token}\n\thost: #{I2X::Config.host}\n\tcache: #{cache}\n\tagent: #{agent}\n\tpayload: #{payload}\n\tseed: #{seed}" begin response = RestClient.post "#{I2X::Config.host}fluxcapacitor/verify.json", {:access_token => I2X::Config.access_token, :agent => agent[:identifier], :cache => cache, :payload => payload, :seed => seed} rescue Exception => e - response = {:status => 400} + response = {:status => 400, :error => e} end - p response response end end end \ No newline at end of file