Class: OffsitePayments::Integrations::Klarna::Notification::Verifier

Inherits:
Object
  • Object
show all
Defined in:
lib/offsite_payments/integrations/klarna.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(header, payload, shared_secret) ⇒ Verifier

Returns a new instance of Verifier.



251
252
253
254
255
# File 'lib/offsite_payments/integrations/klarna.rb', line 251

def initialize(header, payload, shared_secret)
  @header, @payload, @shared_secret = header, payload, shared_secret

  @digest = extract_digest
end

Instance Attribute Details

#digestObject (readonly)

Returns the value of attribute digest.



250
251
252
# File 'lib/offsite_payments/integrations/klarna.rb', line 250

def digest
  @digest
end

#headerObject (readonly)

Returns the value of attribute header.



250
251
252
# File 'lib/offsite_payments/integrations/klarna.rb', line 250

def header
  @header
end

#payloadObject (readonly)

Returns the value of attribute payload.



250
251
252
# File 'lib/offsite_payments/integrations/klarna.rb', line 250

def payload
  @payload
end

#shared_secretObject (readonly)

Returns the value of attribute shared_secret.



250
251
252
# File 'lib/offsite_payments/integrations/klarna.rb', line 250

def shared_secret
  @shared_secret
end

Instance Method Details

#verifyObject



257
258
259
# File 'lib/offsite_payments/integrations/klarna.rb', line 257

def verify
  digest_matches?
end