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


267
268
269
270
271
# File 'lib/offsite_payments/integrations/klarna.rb', line 267

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


266
267
268
# File 'lib/offsite_payments/integrations/klarna.rb', line 266

def digest
  @digest
end

#headerObject (readonly)

Returns the value of attribute header


266
267
268
# File 'lib/offsite_payments/integrations/klarna.rb', line 266

def header
  @header
end

#payloadObject (readonly)

Returns the value of attribute payload


266
267
268
# File 'lib/offsite_payments/integrations/klarna.rb', line 266

def payload
  @payload
end

#shared_secretObject (readonly)

Returns the value of attribute shared_secret


266
267
268
# File 'lib/offsite_payments/integrations/klarna.rb', line 266

def shared_secret
  @shared_secret
end

Instance Method Details

#verifyObject


273
274
275
# File 'lib/offsite_payments/integrations/klarna.rb', line 273

def verify
  digest_matches?
end