class OffsitePayments::Integrations::A1agregator::Notification
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
OffsitePayments::Notification::new
# File lib/offsite_payments/integrations/a1agregator.rb, line 48 def initialize(*args) super guess_notification_type end
Public Instance Methods
acknowledge(authcode = nil)
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 189 def acknowledge(authcode = nil) security_key == signature end
additional_notification?()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 185 def additional_notification? @notification_type == :additional end
command()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 141 def command params['command'] end
comment()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 76 def comment params['comment'] end
complete?()
click to toggle source
Simple notification request params: tid name comment partner_id
service_id
order_id type partner_income
system_income
# File lib/offsite_payments/integrations/a1agregator.rb, line 64 def complete? true end
currency()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 172 def currency 'RUB' end
inclome_total()
click to toggle source
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
# File lib/offsite_payments/integrations/a1agregator.rb, line 125 def inclome_total params['income_total'] end
income()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 129 def income params['income'] end
item_id()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 88 def item_id params['order_id'] end
partner_id()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 80 def partner_id params['partner_id'] end
partner_income()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 96 def partner_income params['partner_income'] end
payer_email()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 149 def payer_email params['email'] end
phone_number()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 145 def phone_number params['phone_number'] end
received_at()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 157 def received_at params['date_created'] end
result_string()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 153 def result_string params['resultStr'] end
security_key()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 165 def security_key params[A1agregator.signature_parameter_name].to_s.downcase end
service_id()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 84 def service_id params['service_id'] end
simple_notification?()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 181 def simple_notification? @notification_type == :simple end
system_income()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 100 def system_income params['system_income'] end
Also aliased as: gross
test?()
click to toggle source
Was this a test transaction?
# File lib/offsite_payments/integrations/a1agregator.rb, line 177 def test? params['test'] == '1' end
title()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 72 def title params['name'] end
transaction_id()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 68 def transaction_id params['tid'] end
type()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 92 def type params['type'] end
version()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 161 def version params['version'] end
Private Instance Methods
guess_notification_type()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 210 def guess_notification_type @notification_type = params['version'] ? :additional : :simple end
signature()
click to toggle source
# File lib/offsite_payments/integrations/a1agregator.rb, line 195 def signature data = "#{params['tid']}\ #{params['name']}\ #{params['comment']}\ #{params['partner_id']}\ #{params['service_id']}\ #{params['order_id']}\ #{params['type']}\ #{params['partner_income']}\ #{params['system_income']}\ #{params['test']}\ #{@options[:secret]}" Digest::MD5.hexdigest(data) end