Class: ActiveMerchant::Billing::AlfabankGateway
- Defined in:
- lib/active_merchant/billing/gateways/alfabank.rb
Constant Summary collapse
- STATUSES_HASH =
{ '0' => 'Order registered but not paid', '1' => 'Waits when order will be completed', '2' => 'Run the full authorization amount of the order', '3' => 'Authorization revoked', '4' => 'The transaction had an operation return', '5' => 'Initiated ACS authorization through the issuing bank', '6' => 'Authorization rejected' }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #get_order_status(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ AlfabankGateway
constructor
Creates a new AlfabankGateway.
- #make_order(options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, non_fractional_currency?, #supported_countries, supported_countries, supported_countries=, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ AlfabankGateway
Creates a new AlfabankGateway
The gateway requires that valid credentials be passed in the options
hash.
Options
-
:account
– The Alfabank API account (REQUIRED) -
:secret
– The Alfabank API secret (REQUIRED)
33 34 35 36 |
# File 'lib/active_merchant/billing/gateways/alfabank.rb', line 33 def initialize( = {}) requires!(, :account, :secret) super end |
Instance Method Details
#get_order_status(options = {}) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/active_merchant/billing/gateways/alfabank.rb', line 48 def get_order_status( = {}) post = {} add_order_number(post, ) add_order_id(post, ) commit('getOrderStatusExtended', nil, post) end |
#make_order(options = {}) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/active_merchant/billing/gateways/alfabank.rb', line 38 def make_order( = {}) post = {} add_order_number(post, ) add_return_url(post, ) add_amount(post, ) add_description(post, ) commit('register', [:amount], post) end |