Sha256: 3295102c8b5fea5663ab33ab732a8a27c67c26eaf51d4c8823163f84e25ff4b1

Contents?: true

Size: 954 Bytes

Versions: 45

Compression:

Stored size: 954 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module A1agregator

        class Status
          include PostsData

          STATUS_TEST_URL = 'https://partner.a1pay.ru/a1lite/info/'

          attr_accessor :login, :password

          def initialize(login, password)
            @login, @password = login, password
          end

          # agregator provides two methods:
          # by tid - transaction id
          # by order_id & service_id
          def update(options = {})
            data = PostData.new
            data[:user] = @login
            data[:pass] = @password
            if options[:tid]
              data[:tid] = options[:tid]
            else
              data[:ord_id] = options[:ord_id]
              data[:service_id] = options[:service_id]
            end

            ssl_post(STATUS_TEST_URL, data.to_post_data)
          end

        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
activemerchant-1.29.3 lib/active_merchant/billing/integrations/a1agregator/status.rb
activemerchant-1.29.2 lib/active_merchant/billing/integrations/a1agregator/status.rb
activemerchant-1.29.1 lib/active_merchant/billing/integrations/a1agregator/status.rb
jelaniharris-activemerchant-1.29.1 lib/active_merchant/billing/integrations/a1agregator/status.rb
activemerchant-1.29.0 lib/active_merchant/billing/integrations/a1agregator/status.rb