Class: ActiveMerchant::Billing::GarantiGateway
- Defined in:
- lib/active_merchant/billing/gateways/garanti.rb
Constant Summary collapse
- CURRENCY_CODES =
{ 'YTL' => 949, 'TRL' => 949, 'TL' => 949, 'USD' => 840, 'EUR' => 978, 'GBP' => 826, 'JPY' => 392 }
Constants inherited from Gateway
ActiveMerchant::Billing::Gateway::CREDIT_DEPRECATION_MESSAGE, ActiveMerchant::Billing::Gateway::DEBIT_CARDS, ActiveMerchant::Billing::Gateway::RECURRING_DEPRECATION_MESSAGE, ActiveMerchant::Billing::Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, credit_card, options = {}) ⇒ Object
- #capture(money, ref_id, 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, #generate_unique_id, inherited, #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 = {}) ⇒ GarantiGateway
Returns a new instance of GarantiGateway.
34 35 36 37 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 34 def initialize( = {}) requires!(, :login, :password, :terminal_id, :merchant_id) super end |
Instance Method Details
#authorize(money, credit_card, options = {}) ⇒ Object
44 45 46 47 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 44 def (money, credit_card, = {}) = .merge(:gvp_order_type => "preauth") commit(money, (money, credit_card, )) end |
#capture(money, ref_id, options = {}) ⇒ Object
49 50 51 52 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 49 def capture(money, ref_id, = {}) = .merge(:gvp_order_type => "postauth") commit(money, build_capture_request(money, ref_id, )) end |
#purchase(money, credit_card, options = {}) ⇒ Object
39 40 41 42 |
# File 'lib/active_merchant/billing/gateways/garanti.rb', line 39 def purchase(money, credit_card, = {}) = .merge(:gvp_order_type => "sales") commit(money, build_sale_request(money, credit_card, )) end |