Class: Alfabank::Api::Registration

Inherits:
Base
  • Object
show all
Defined in:
lib/alfabank/api/registration.rb

Constant Summary collapse

TEST_URL =
"https://test.paymentgate.ru/testpayment/rest/register.do"
URL =
"https://paymentgate.ru/payment/rest/register.do"

Instance Attribute Summary

Attributes inherited from Base

#payment

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Alfabank::Api::Base

Instance Method Details

#process(binding_id = nil) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/alfabank/api/registration.rb', line 6

def process(binding_id = nil)
  return {url: payment.alfa_form_url} if payment.alfa_order_id
  @binding_id = binding_id

  process_response(make_request.parsed_response)
rescue
  {error: 'Internal server error'}
end