Sha256: 5d6a9e26f7ced3fbdf0c5e3e93333a350a734e6d7cf2aeb2de78d745baae0f87

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

# :nodoc:
module Veritrans

  # :nodoc:
  module HashGenerator
    # Generate hash using SHA-512.
    #
    # Parameters:
    # * <tt>[String]merchant_hash_key</tt> - Merchant Hash key    
    # * <tt>[String]merchant_id</tt> - Merchant ID  
    # * <tt>[String]settlement_method</tt> - '01' Credit Card
    # * <tt>[String]order_id</tt> 
    # * <tt>[String]amount</tt> 
    def self.generate(merchant_hash_key, merchant_id, order_id)
      return Digest::SHA512.hexdigest("#{merchant_hash_key},#{merchant_id},#{order_id}")
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritrans-1.2.6 lib/veritrans/hash_generator.rb