Class: ActiveMerchant::Billing::Be2billGateway
- Defined in:
- lib/active_merchant/billing/gateways/be2bill.rb
Constant Summary
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
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Be2billGateway
constructor
These options are mandatory on be2bill (cf. tests) :.
- #purchase(money, creditcard, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, non_fractional_currency?, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ Be2billGateway
These options are mandatory on be2bill (cf. tests) :
options = { :order_id => order.id,
:customer_id => user.id,
:description => "Some description",
:referrer => request.env['HTTP_REFERER'],
:user_agent => request.env['HTTP_USER_AGENT'],
:ip => request.remote_ip,
:email => user.email }
26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/be2bill.rb', line 26 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/active_merchant/billing/gateways/be2bill.rb', line 31 def (money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_customer_data(post, ) commit('authorization', money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/active_merchant/billing/gateways/be2bill.rb', line 49 def capture(money, , = {}) post = {} add_invoice(post, ) post[:TRANSACTIONID] = commit('capture', money, post) end |
#purchase(money, creditcard, options = {}) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/active_merchant/billing/gateways/be2bill.rb', line 40 def purchase(money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_customer_data(post, ) commit('payment', money, post) end |