class Paynow::HashGenerator
Attributes
data[R]
Public Class Methods
_hmac(data)
click to toggle source
# File lib/paynow/hash_generator.rb, line 8 def _hmac(data) new(data)._hmac end
new(data)
click to toggle source
# File lib/paynow/hash_generator.rb, line 13 def initialize(data) @data = data end
Public Instance Methods
_hmac()
click to toggle source
# File lib/paynow/hash_generator.rb, line 17 def _hmac return unless data hash_data = concatenate_hash_values_and_append_key(data) puts(hash_data) _hash = Digest::SHA512.hexdigest(hash_data).upcase end
Private Instance Methods
concatenate_hash_values_and_append_key(h)
click to toggle source
# File lib/paynow/hash_generator.rb, line 28 def concatenate_hash_values_and_append_key(h) str = "" h.each { |k,v| str += v.to_s } str += key end
key()
click to toggle source
# File lib/paynow/hash_generator.rb, line 34 def key Paynow.integration_key end