Class: OffsitePayments::Integrations::A1agregator::Notification
- Inherits:
-
Notification
- Object
- Notification
- OffsitePayments::Integrations::A1agregator::Notification
show all
- Defined in:
- lib/offsite_payments/integrations/a1agregator.rb
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
#amount, #empty!, #gross_cents, #iso_currency, #status, #valid_sender?
Constructor Details
Returns a new instance of Notification.
48
49
50
51
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 48
def initialize(*args)
super
guess_notification_type
end
|
Instance Method Details
#acknowledge(authcode = nil) ⇒ Object
181
182
183
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 181
def acknowledge(authcode = nil)
security_key == signature
end
|
#additional_notification? ⇒ Boolean
177
178
179
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 177
def additional_notification?
@notification_type == :additional
end
|
#command ⇒ Object
133
134
135
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 133
def command
params['command']
end
|
76
77
78
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 76
def
params['comment']
end
|
#complete? ⇒ Boolean
Simple notification request params: tid name comment partner_id service_id order_id type partner_income system_income
64
65
66
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 64
def complete?
true
end
|
#currency ⇒ Object
164
165
166
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 164
def currency
'RUB'
end
|
#inclome_total ⇒ Object
Additional notification request params: tid name comment partner_id service_id order_id type cost income_total income partner_income system_income command phone_number email resultStr date_created version check
117
118
119
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 117
def inclome_total
params['income_total']
end
|
#income ⇒ Object
121
122
123
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 121
def income
params['income']
end
|
#item_id ⇒ Object
88
89
90
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 88
def item_id
params['order_id']
end
|
#partner_id ⇒ Object
80
81
82
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 80
def partner_id
params['partner_id']
end
|
#partner_income ⇒ Object
125
126
127
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 125
def partner_income
params['partner_income']
end
|
#payer_email ⇒ Object
141
142
143
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 141
def payer_email
params['email']
end
|
#phone_number ⇒ Object
137
138
139
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 137
def phone_number
params['phone_number']
end
|
#received_at ⇒ Object
149
150
151
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 149
def received_at
params['date_created']
end
|
#result_string ⇒ Object
145
146
147
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 145
def result_string
params['resultStr']
end
|
#security_key ⇒ Object
157
158
159
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 157
def security_key
params[A1agregator.signature_parameter_name].to_s.downcase
end
|
#service_id ⇒ Object
84
85
86
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 84
def service_id
params['service_id']
end
|
#simple_notification? ⇒ Boolean
173
174
175
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 173
def simple_notification?
@notification_type == :simple
end
|
#system_income ⇒ Object
Also known as:
gross
129
130
131
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 129
def system_income
params['system_income']
end
|
#test? ⇒ Boolean
Was this a test transaction?
169
170
171
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 169
def test?
params['test'] == '1'
end
|
#title ⇒ Object
72
73
74
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 72
def title
params['name']
end
|
#transaction_id ⇒ Object
68
69
70
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 68
def transaction_id
params['tid']
end
|
#type ⇒ Object
92
93
94
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 92
def type
params['type']
end
|
#version ⇒ Object
153
154
155
|
# File 'lib/offsite_payments/integrations/a1agregator.rb', line 153
def version
params['version']
end
|