Module: Bancard

Defined in:
lib/bancard/single_buy_init_response.rb,
lib/bancard.rb,
lib/bancard/gateway.rb,
lib/bancard/version.rb,
lib/bancard/single_buy_init.rb,
lib/bancard/single_buy_rollback.rb,
lib/bancard/single_buy_rollback_response.rb

Overview

works like ActiveMerchant::Billing::Response to maintain compatibility to active merchant gateways

Defined Under Namespace

Modules: Utils Classes: Gateway, SingleBuyInit, SingleBuyInitResponse, SingleBuyRollback, SingleBuyRollbackResponse

Constant Summary collapse

TEST_URL =
'https://vpos.infonet.com.py:8888'
LIVE_URL =
'https://vpos.infonet.com.py'
DEFAULT_CURRENCY =
'PYG'
VERSION =
"0.0.3"

Class Method Summary collapse

Class Method Details

.sandbox!Object



19
20
21
# File 'lib/bancard.rb', line 19

def self.sandbox!
  @sandbox = true
end

.sandbox?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bancard.rb', line 23

def self.sandbox?
  !!@sandbox
end

.vpos_url(path = nil) ⇒ Object



27
28
29
30
31
# File 'lib/bancard.rb', line 27

def self.vpos_url(path = nil)
  uri      = URI.parse(sandbox? ? TEST_URL : LIVE_URL)
  uri.path = path.to_s
  uri.to_s
end