Class: Liqpay::SignedPayload
- Inherits:
-
Object
- Object
- Liqpay::SignedPayload
- Defined in:
- lib/liqpay/signed_payload.rb
Overview
Handles signing and verification of LiqPay request/responses
Instance Attribute Summary collapse
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#public_key ⇒ Object
Returns the value of attribute public_key.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(options = {}) ⇒ SignedPayload
constructor
A new instance of SignedPayload.
- #signature ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ SignedPayload
Returns a new instance of SignedPayload.
11 12 13 14 15 16 |
# File 'lib/liqpay/signed_payload.rb', line 11 def initialize( = {}) .replace(Liqpay..merge()) @public_key = [:public_key] @private_key = [:private_key] end |
Instance Attribute Details
#private_key ⇒ Object
Returns the value of attribute private_key.
9 10 11 |
# File 'lib/liqpay/signed_payload.rb', line 9 def private_key @private_key end |
#public_key ⇒ Object
Returns the value of attribute public_key.
9 10 11 |
# File 'lib/liqpay/signed_payload.rb', line 9 def public_key @public_key end |
Instance Method Details
#data ⇒ Object
22 23 24 |
# File 'lib/liqpay/signed_payload.rb', line 22 def data raise NotImplementedError end |
#signature ⇒ Object
18 19 20 |
# File 'lib/liqpay/signed_payload.rb', line 18 def signature @signature ||= sign(data) end |