Class: ActiveMerchant::Billing::Integrations::A1agregator::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::A1agregator::Notification
show all
- Defined in:
- lib/active_merchant/billing/integrations/a1agregator/notification.rb
Instance Attribute Summary
Attributes inherited from Notification
#params, #raw
Instance Method Summary
collapse
#amount, #empty!, #gross_cents, #status, #valid_sender?
Constructor Details
Returns a new instance of Notification.
16
17
18
19
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 16
def initialize(*args)
super
guess_notification_type
end
|
Instance Method Details
#acknowledge(authcode = nil) ⇒ Object
157
158
159
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 157
def acknowledge(authcode = nil)
security_key == signature
end
|
#additional_notification? ⇒ Boolean
153
154
155
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 153
def additional_notification?
@notification_type == :additional
end
|
#command ⇒ Object
109
110
111
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 109
def command
params['command']
end
|
44
45
46
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 44
def
params['comment']
end
|
#complete? ⇒ Boolean
Simple notification request params: tid name comment partner_id service_id order_id type partner_income system_income
32
33
34
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 32
def complete?
true
end
|
#currency ⇒ Object
140
141
142
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 140
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
93
94
95
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 93
def inclome_total
params['income_total']
end
|
#income ⇒ Object
97
98
99
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 97
def income
params['income']
end
|
#item_id ⇒ Object
56
57
58
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 56
def item_id
params['order_id']
end
|
#partner_id ⇒ Object
48
49
50
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 48
def partner_id
params['partner_id']
end
|
#partner_income ⇒ Object
64
65
66
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 64
def partner_income
params['partner_income']
end
|
#payer_email ⇒ Object
117
118
119
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 117
def payer_email
params['email']
end
|
#phone_number ⇒ Object
113
114
115
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 113
def phone_number
params['phone_number']
end
|
#received_at ⇒ Object
125
126
127
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 125
def received_at
params['date_created']
end
|
#result_string ⇒ Object
121
122
123
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 121
def result_string
params['resultStr']
end
|
#security_key ⇒ Object
133
134
135
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 133
def security_key
params[A1agregator.signature_parameter_name].to_s.downcase
end
|
#service_id ⇒ Object
52
53
54
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 52
def service_id
params['service_id']
end
|
#simple_notification? ⇒ Boolean
149
150
151
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 149
def simple_notification?
@notification_type == :simple
end
|
#system_income ⇒ Object
Also known as:
gross
68
69
70
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 68
def system_income
params['system_income']
end
|
#test? ⇒ Boolean
Was this a test transaction?
145
146
147
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 145
def test?
params['test'] == '1'
end
|
#title ⇒ Object
40
41
42
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 40
def title
params['name']
end
|
#transaction_id ⇒ Object
36
37
38
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 36
def transaction_id
params['tid']
end
|
#type ⇒ Object
60
61
62
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 60
def type
params['type']
end
|
#version ⇒ Object
129
130
131
|
# File 'lib/active_merchant/billing/integrations/a1agregator/notification.rb', line 129
def version
params['version']
end
|