module Qtpay module Utils def self.stringify_keys(hash) new_hash = {} hash.each do |key, value| new_hash[(key.to_s rescue key) || key] = value end new_hash end def self.to_cents(dollars) (dollars.to_d * 100).ceil end def self.to_dollars(cents) cents.to_d / 100.0 end end end