Sha256: 15db0228ed885746193d019550fa8e75c61e0b42a3c9d1d0d68a2708c8a26b0e

Contents?: true

Size: 1019 Bytes

Versions: 18

Compression:

Stored size: 1019 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Webmoney
        class Notification < ActiveMerchant::Billing::Integrations::Notification
          include Common

          def recognizes?
            (params.has_key?('LMI_PAYMENT_NO') && params.has_key?('LMI_PAYMENT_AMOUNT'))
          end

          def amount
            BigDecimal.new(gross)
          end

          def key_present?
            params["LMI_HASH"].present?
          end

          def item_id
            params['LMI_PAYMENT_NO']
          end

          def gross
            params['LMI_PAYMENT_AMOUNT']
          end

          def security_key
            params["LMI_HASH"]
          end

          def secret
            @options[:secret]
          end

          def acknowledge(authcode = nil)
            (security_key == generate_signature)
          end

          def success_response(*args)
            {:nothing => true}
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
activemerchant-1.43.3 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.43.1 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.43.0 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.9 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.8 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.7 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.6 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.5 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.4 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.3 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.2 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.1 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.42.0 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.41.0 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.40.0 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.39.2 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.39.1 lib/active_merchant/billing/integrations/webmoney/notification.rb
activemerchant-1.39.0 lib/active_merchant/billing/integrations/webmoney/notification.rb