Class: ActiveMerchant::Billing::Integrations::A1agregator::Status
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::Integrations::A1agregator::Status
- Includes:
- PostsData
- Defined in:
- lib/active_merchant/billing/integrations/a1agregator/status.rb
Constant Summary collapse
- STATUS_TEST_URL =
'https://partner.a1pay.ru/a1lite/info/'
Instance Attribute Summary collapse
-
#login ⇒ Object
Returns the value of attribute login.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
-
#initialize(login, password) ⇒ Status
constructor
A new instance of Status.
-
#update(options = {}) ⇒ Object
agregator provides two methods: by tid - transaction id by order_id & service_id.
Constructor Details
#initialize(login, password) ⇒ Status
Returns a new instance of Status.
13 14 15 |
# File 'lib/active_merchant/billing/integrations/a1agregator/status.rb', line 13 def initialize(login, password) @login, @password = login, password end |
Instance Attribute Details
#login ⇒ Object
Returns the value of attribute login.
11 12 13 |
# File 'lib/active_merchant/billing/integrations/a1agregator/status.rb', line 11 def login @login end |
#password ⇒ Object
Returns the value of attribute password.
11 12 13 |
# File 'lib/active_merchant/billing/integrations/a1agregator/status.rb', line 11 def password @password end |
Instance Method Details
#update(options = {}) ⇒ Object
agregator provides two methods: by tid - transaction id by order_id & service_id
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/active_merchant/billing/integrations/a1agregator/status.rb', line 20 def update( = {}) data = PostData.new data[:user] = @login data[:pass] = @password if [:tid] data[:tid] = [:tid] else data[:ord_id] = [:ord_id] data[:service_id] = [:service_id] end ssl_post(STATUS_TEST_URL, data.to_post_data) end |