Module: PaygatePk::Util::Signature::Payfast
- Defined in:
- lib/paygate_pk/util/signature.rb
Overview
validation_hash = SHA256(“basket_id|merchant_secret_key|merchant_id|payfast_err_code”)
Class Method Summary collapse
Class Method Details
.validation_hash(basket_id:, merchant_secret_key:, merchant_id:, payfast_err_code:) ⇒ Object
11 12 13 14 |
# File 'lib/paygate_pk/util/signature.rb', line 11 def self.validation_hash(basket_id:, merchant_secret_key:, merchant_id:, payfast_err_code:) data = [basket_id, merchant_secret_key, merchant_id, payfast_err_code].join("|") OpenSSL::Digest::SHA256.hexdigest(data) end |