Class: ActiveMerchant::Billing::GarantiGateway
- Defined in:
- lib/active_merchant/billing/gateways/garanti.rb
Constant Summary collapse
- URL =
'https://ccpos.garanti.com.tr/servlet/cc5ApiServer'
- CURRENCY_CODES =
{ 'YTL' => 949, 'TRL' => 949, 'USD' => 840, 'EUR' => 978 }
Constants inherited from Gateway
ActiveMerchant::Billing::Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, credit_card, options = {}) ⇒ Object
- #capture(money, reference, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ GarantiGateway
constructor
A new instance of GarantiGateway.
- #purchase(money, credit_card, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ GarantiGateway
Returns a new instance of GarantiGateway.
28 29 30 31 32 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 28 def initialize( = {}) requires!(, :login, :password, :client_id) @options = super end |
Instance Method Details
#authorize(money, credit_card, options = {}) ⇒ Object
38 39 40 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 38 def (money, credit_card, = {}) commit(money, (money, credit_card, )) end |
#capture(money, reference, options = {}) ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 42 def capture(money, reference, = {}) commit(money, build_capture_request(money,reference,)) end |
#purchase(money, credit_card, options = {}) ⇒ Object
34 35 36 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 34 def purchase(money, credit_card, = {}) commit(money, build_sale_request(money, credit_card, )) end |