Class: ActiveMerchant::Billing::OptimalPaymentGateway
- Defined in:
- lib/active_merchant/billing/gateways/optimal_payment.rb
Constant Summary collapse
- TEST_URL =
'https://webservices.test.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
- LIVE_URL =
'https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
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, card_or_auth, options = {}) ⇒ Object (also: #stored_authorize)
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ OptimalPaymentGateway
constructor
A new instance of OptimalPaymentGateway.
- #purchase(money, card_or_auth, options = {}) ⇒ Object (also: #stored_purchase)
- #refund(money, authorization, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
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 = {}) ⇒ OptimalPaymentGateway
Returns a new instance of OptimalPaymentGateway.
19 20 21 22 23 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 19 def initialize( = {}) #requires!(options, :login, :password) @options = super end |
Instance Method Details
#authorize(money, card_or_auth, options = {}) ⇒ Object Also known as:
25 26 27 28 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 25 def (money, card_or_auth, = {}) parse_card_or_auth(card_or_auth, ) commit("cc#{@stored_data}Authorize", money, ) end |
#capture(money, authorization, options = {}) ⇒ Object
47 48 49 50 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 47 def capture(money, , = {}) [:confirmationNumber] = commit('ccSettlement', money, ) end |
#purchase(money, card_or_auth, options = {}) ⇒ Object Also known as: stored_purchase
31 32 33 34 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 31 def purchase(money, card_or_auth, = {}) parse_card_or_auth(card_or_auth, ) commit("cc#{@stored_data}Purchase", money, ) end |
#refund(money, authorization, options = {}) ⇒ Object
37 38 39 40 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 37 def refund(money, , = {}) [:confirmationNumber] = commit('ccCredit', money, ) end |
#void(authorization, options = {}) ⇒ Object
42 43 44 45 |
# File 'lib/active_merchant/billing/gateways/optimal_payment.rb', line 42 def void(, = {}) [:confirmationNumber] = commit('ccAuthorizeReversal', nil, ) end |