Class: Payfast::SignatureGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/payfast/signature_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payment_params) ⇒ SignatureGenerator

Returns a new instance of SignatureGenerator.



8
9
10
# File 'lib/payfast/signature_generator.rb', line 8

def initialize(payment_params)
  @payment_params = payment_params
end

Instance Attribute Details

#payment_paramsObject (readonly)

Returns the value of attribute payment_params.



6
7
8
# File 'lib/payfast/signature_generator.rb', line 6

def payment_params
  @payment_params
end

Instance Method Details

#digestObject



12
13
14
# File 'lib/payfast/signature_generator.rb', line 12

def digest
  Digest::MD5.hexdigest(encoded_params)
end