Sha256: 8b3aa0f3e311dc36748c1f1b2b2dd4af49c7a4bee53dc0ad47ca4bac99755517
Contents?: true
Size: 1.13 KB
Versions: 18
Compression:
Stored size: 1.13 KB
Contents
module ActiveMerchant #:nodoc: module Billing #:nodoc: module Integrations #:nodoc: module Robokassa class Notification < ActiveMerchant::Billing::Integrations::Notification include Common def self.recognizes?(params) params.has_key?('InvId') && params.has_key?('OutSum') end def complete? true end def amount BigDecimal.new(gross) end def item_id params['InvId'] end def security_key params[ActiveMerchant::Billing::Integrations::Robokassa.signature_parameter_name].to_s.downcase end def gross params['OutSum'] end def status 'success' end def secret @options[:secret] end def main_params [gross, item_id] end def acknowledge(authcode = nil) security_key == generate_signature end def success_response(*args) "OK#{item_id}" end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems