Class: GpWebpay::Ws::ValidateResult
- Defined in:
- lib/gp_webpay/ws/validate_result.rb
Constant Summary collapse
- DIGEST_ALLOWED_ATTRIBUTES =
%i[ primary_return_code secondary_return_code message_id state status sub_status auth_code token_data authentication_link ].freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(params, config) ⇒ ValidateResult
constructor
A new instance of ValidateResult.
Constructor Details
#initialize(params, config) ⇒ ValidateResult
Returns a new instance of ValidateResult.
29 30 31 32 33 |
# File 'lib/gp_webpay/ws/validate_result.rb', line 29 def initialize(params, config) super() @params = params @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
15 16 17 |
# File 'lib/gp_webpay/ws/validate_result.rb', line 15 def config @config end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
15 16 17 |
# File 'lib/gp_webpay/ws/validate_result.rb', line 15 def params @params end |
Instance Method Details
#call ⇒ Object
35 36 37 38 39 |
# File 'lib/gp_webpay/ws/validate_result.rb', line 35 def call params.present? && params[:signature].present? && OpensslSecurity.validate_digests(config, params[:signature] => digest_verification) end |