Class: Cybersourcery::CartSigner
- Inherits:
-
Object
- Object
- Cybersourcery::CartSigner
- Defined in:
- lib/cybersourcery/cart_signer.rb
Instance Attribute Summary collapse
-
#cart_fields ⇒ Object
readonly
Returns the value of attribute cart_fields.
-
#session ⇒ Object
readonly
Returns the value of attribute session.
-
#signed_cart_fields ⇒ Object
readonly
Returns the value of attribute signed_cart_fields.
-
#signer ⇒ Object
readonly
Returns the value of attribute signer.
Instance Method Summary collapse
-
#initialize(session, signer, cart_fields) ⇒ CartSigner
constructor
A new instance of CartSigner.
- #run ⇒ Object
Constructor Details
#initialize(session, signer, cart_fields) ⇒ CartSigner
Returns a new instance of CartSigner.
5 6 7 8 9 |
# File 'lib/cybersourcery/cart_signer.rb', line 5 def initialize(session, signer, cart_fields) @session = session @signer = signer @cart_fields = cart_fields.dup end |
Instance Attribute Details
#cart_fields ⇒ Object (readonly)
Returns the value of attribute cart_fields.
3 4 5 |
# File 'lib/cybersourcery/cart_signer.rb', line 3 def cart_fields @cart_fields end |
#session ⇒ Object (readonly)
Returns the value of attribute session.
3 4 5 |
# File 'lib/cybersourcery/cart_signer.rb', line 3 def session @session end |
#signed_cart_fields ⇒ Object (readonly)
Returns the value of attribute signed_cart_fields.
3 4 5 |
# File 'lib/cybersourcery/cart_signer.rb', line 3 def signed_cart_fields @signed_cart_fields end |
#signer ⇒ Object (readonly)
Returns the value of attribute signer.
3 4 5 |
# File 'lib/cybersourcery/cart_signer.rb', line 3 def signer @signer end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 |
# File 'lib/cybersourcery/cart_signer.rb', line 11 def run sign_cart_fields reassign_signature_and_signed_fields_to_session @signed_cart_fields end |