Class: ActiveMerchant::Billing::IdealBaseGateway
- Defined in:
- lib/active_merchant/billing/gateways/ideal/ideal_base.rb
Overview
Implementation contains some simplifications
-
does not support multiple subID per merchant
-
language is fixed to ‘nl’
Direct Known Subclasses
Constant Summary collapse
- AUTHENTICATION_TYPE =
These constants will never change for most users
'SHA1_RSA'
- LANGUAGE =
'nl'
- SUB_ID =
'0'
- API_VERSION =
'1.1.0'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Attributes inherited from Gateway
Instance Method Summary collapse
-
#capture(transaction, options = {}) ⇒ Object
Check status of transaction and confirm payment transaction_id must be a valid transaction_id from a prior setup.
-
#initialize(options = {}) ⇒ IdealBaseGateway
constructor
A new instance of IdealBaseGateway.
-
#issuers ⇒ Object
Get list of issuers from response.issuer_list.
-
#setup_purchase(money, options = {}) ⇒ Object
Setup transaction.
- #test? ⇒ Boolean
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ IdealBaseGateway
Returns a new instance of IdealBaseGateway.
22 23 24 25 26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 22 def initialize( = {}) requires!(, :login, :password, :pem) @options = @options[:pem_password] = [:password] @url = test? ? test_url : live_url super end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 20 def url @url end |
Instance Method Details
#capture(transaction, options = {}) ⇒ Object
Check status of transaction and confirm payment transaction_id must be a valid transaction_id from a prior setup.
40 41 42 43 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 40 def capture(transaction, = {}) [:transaction_id] = transaction commit(build_status_request()) end |
#issuers ⇒ Object
Get list of issuers from response.issuer_list
46 47 48 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 46 def issuers commit(build_directory_request) end |
#setup_purchase(money, options = {}) ⇒ Object
Setup transaction. Get redirect_url from response.service_url
32 33 34 35 36 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 32 def setup_purchase(money, = {}) requires!(, :issuer_id, :return_url, :order_id, :currency, :description, :entrance_code) commit(build_transaction_request(money, )) end |
#test? ⇒ Boolean
50 51 52 |
# File 'lib/active_merchant/billing/gateways/ideal/ideal_base.rb', line 50 def test? @options[:test] || Base.gateway_mode == :test end |