Class: Payanyway::Request::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/payanyway/request/base.rb

Direct Known Subclasses

Check, Pay

Constant Summary collapse

@@_params =
{ 'MNT_TRANSACTION_ID' => :transaction_id }.invert.to_settings

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Base

Returns a new instance of Base.



8
9
10
11
# File 'lib/payanyway/request/base.rb', line 8

def initialize(params)
  @params = params
  @pretty_params = @@_params.configure_by(params)
end

Instance Attribute Details

#pretty_paramsObject (readonly)

Returns the value of attribute pretty_params.



6
7
8
# File 'lib/payanyway/request/base.rb', line 6

def pretty_params
  @pretty_params
end

Instance Method Details

#error_messageObject



13
14
15
# File 'lib/payanyway/request/base.rb', line 13

def error_message
  "ERROR! Invalid signature for order #{ @pretty_params[:transaction_id] }. Params: #{ @params.inspect }"
end