lib/epaybg.rb in epaybg-0.2.0 vs lib/epaybg.rb in epaybg-0.3.0
- old
+ new
@@ -1,13 +1,13 @@
-require 'epaybg/railtie'
+require 'epaybg/railtie' if defined?(Rails)
require 'epaybg/transaction'
require 'epaybg/response'
require 'epaybg/version'
module Epaybg
class << self
- def hmac(data)
- OpenSSL::HMAC.hexdigest('sha1', config['secret'], data)
+ def hmac(data, secret)
+ OpenSSL::HMAC.hexdigest('sha1', secret, data)
end
# Configuration is loaded based on this property.
# Values are [:production, :test]. Defaults to :production
def mode