Class: ActiveMerchant::Billing::NetaxeptGateway
- Defined in:
- lib/active_merchant/billing/gateways/netaxept.rb
Defined Under Namespace
Classes: Response
Constant Summary collapse
- TEST_URL =
'https://epayment-test.bbs.no/'
- LIVE_URL =
'https://epayment.bbs.no/'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
- #credit(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ NetaxeptGateway
constructor
A new instance of NetaxeptGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #test? ⇒ Boolean
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
#deprecated, generate_unique_id
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ NetaxeptGateway
Returns a new instance of NetaxeptGateway.
25 26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 25 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 42 def (money, creditcard, = {}) requires!(, :order_id) post = {} add_credentials(post, ) add_transaction(post, ) add_order(post, money, ) add_creditcard(post, creditcard) commit('Auth', post) end |
#capture(money, authorization, options = {}) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 53 def capture(money, , = {}) post = {} add_credentials(post, ) (post, , money) commit('Capture', post, false) end |
#credit(money, authorization, options = {}) ⇒ Object
67 68 69 70 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 67 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 31 def purchase(money, creditcard, = {}) requires!(, :order_id) post = {} add_credentials(post, ) add_transaction(post, ) add_order(post, money, ) add_creditcard(post, creditcard) commit('Sale', post) end |
#refund(money, authorization, options = {}) ⇒ Object
60 61 62 63 64 65 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 60 def refund(money, , = {}) post = {} add_credentials(post, ) (post, , money) commit('Credit', post, false) end |
#test? ⇒ Boolean
79 80 81 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 79 def test? @options[:test] || Base.gateway_mode == :test end |
#void(authorization, options = {}) ⇒ Object
72 73 74 75 76 77 |
# File 'lib/active_merchant/billing/gateways/netaxept.rb', line 72 def void(, = {}) post = {} add_credentials(post, ) (post, ) commit('Annul', post, false) end |