Class: ActiveMerchant::Billing::CC5Gateway
- Defined in:
- lib/active_merchant/billing/gateways/cc5.rb
Overview
CC5 API is used by many banks in Turkey. Extend this base class to provide concrete implementations.
Direct Known Subclasses
Constant Summary collapse
- CURRENCY_CODES =
{ 'TRY' => 949, 'YTL' => 949, 'TRL' => 949, 'TL' => 949, 'USD' => 840, 'EUR' => 978, 'GBP' => 826, 'JPY' => 392 }
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
-
#initialize(options = {}) ⇒ CC5Gateway
constructor
A new instance of CC5Gateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ CC5Gateway
Returns a new instance of CC5Gateway.
19 20 21 22 |
# File 'lib/active_merchant/billing/gateways/cc5.rb', line 19 def initialize( = {}) requires!(, :login, :password, :client_id) super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
28 29 30 |
# File 'lib/active_merchant/billing/gateways/cc5.rb', line 28 def (money, creditcard, = {}) commit(build_sale_request('PreAuth', money, creditcard, )) end |
#capture(money, authorization, options = {}) ⇒ Object
32 33 34 |
# File 'lib/active_merchant/billing/gateways/cc5.rb', line 32 def capture(money, , = {}) commit(build_capture_request(money, , )) end |
#purchase(money, creditcard, options = {}) ⇒ Object
24 25 26 |
# File 'lib/active_merchant/billing/gateways/cc5.rb', line 24 def purchase(money, creditcard, = {}) commit(build_sale_request('Auth', money, creditcard, )) end |