Class: WirecardCheckoutPage::ResponseChecksum
- Inherits:
-
Object
- Object
- WirecardCheckoutPage::ResponseChecksum
- Includes:
- Utils
- Defined in:
- lib/wirecard_checkout_page/response_checksum.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params) ⇒ ResponseChecksum
constructor
A new instance of ResponseChecksum.
- #valid? ⇒ Boolean
Methods included from Utils
Constructor Details
#initialize(params) ⇒ ResponseChecksum
Returns a new instance of ResponseChecksum.
7 8 9 10 11 12 |
# File 'lib/wirecard_checkout_page/response_checksum.rb', line 7 def initialize(params) @params = stringify_keys(params) unless response_fingerprint_order_parts.include? 'secret' raise InvalidResponseFingerPrintOrder, 'Missing :secret as a part of the responseFingerprintOrder' end end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
14 15 16 |
# File 'lib/wirecard_checkout_page/response_checksum.rb', line 14 def params @params end |
Instance Method Details
#valid? ⇒ Boolean
16 17 18 |
# File 'lib/wirecard_checkout_page/response_checksum.rb', line 16 def valid? params['responseFingerprint'] == computed_fingerprint end |