Sha256: c85f393647a141728fc6feeeb812250968361cbca5a6dbe555404a1812ba4fdc

Contents?: true

Size: 590 Bytes

Versions: 28

Compression:

Stored size: 590 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module Paysbuy
        class Notification < ActiveMerchant::Billing::Integrations::Notification
          SUCCESS = '00'
          FAIL = '99'

          def complete?
            status == 'Completed'
          end

          def item_id
            params['result'][2..-1]
          end

          def status
            params['result'][0..1] == SUCCESS ? 'Completed' : 'Failed'
          end

          def acknowledge
            true
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
tanga_activemerchant-1.38.0.5 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.38.0.4 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.38.0.3 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.38.0.2 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.38.0.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.38.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
tanga_activemerchant-1.37.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.38.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.38.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.37.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.36.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.35.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.35.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.34.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.34.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.33.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.32.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.32.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.31.1 lib/active_merchant/billing/integrations/paysbuy/notification.rb
activemerchant-1.31.0 lib/active_merchant/billing/integrations/paysbuy/notification.rb