Class: Vnpay::Verify
- Inherits:
-
Object
- Object
- Vnpay::Verify
- Defined in:
- lib/vnpay/verify.rb
Constant Summary collapse
- REJECTED_PARAMS =
%w[vnp_SecureHashType vnp_SecureHash controller action].freeze
Instance Attribute Summary collapse
-
#normalized_params ⇒ Object
readonly
Returns the value of attribute normalized_params.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(params) ⇒ Verify
constructor
A new instance of Verify.
- #verify ⇒ Object
Constructor Details
#initialize(params) ⇒ Verify
Returns a new instance of Verify.
8 9 10 |
# File 'lib/vnpay/verify.rb', line 8 def initialize(params) @params = params.permit!.to_h end |
Instance Attribute Details
#normalized_params ⇒ Object (readonly)
Returns the value of attribute normalized_params.
6 7 8 |
# File 'lib/vnpay/verify.rb', line 6 def normalized_params @normalized_params end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/vnpay/verify.rb', line 6 def params @params end |
Instance Method Details
#verify ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/vnpay/verify.rb', line 12 def verify normalize_params return false unless success_code? return false unless valid_hash? true end |