Module: Stall::Payments::ManualPaymentGateway::ChecksumCalculator
Overview
Request and Response common helper to calculate a checksum for the given token, reference and timestamp arguments with the Rails secret key base as the secret salt
Instance Method Summary collapse
Instance Method Details
#calculate_checksum_for(*arguments) ⇒ Object
21 22 23 24 |
# File 'lib/stall/payments/manual_payment_gateway.rb', line 21 def calculate_checksum_for(*arguments) arguments << Rails.application.secrets.secret_key_base Digest::SHA256.hexdigest(arguments.map(&:to_s).join('|')) end |