Module: VirtualMerchant
- Defined in:
- lib/virtual_merchant.rb,
lib/virtual_merchant/amount.rb,
lib/virtual_merchant/logger.rb,
lib/virtual_merchant/response.rb,
lib/virtual_merchant/user_input.rb,
lib/virtual_merchant/credentials.rb,
lib/virtual_merchant/credit_card.rb,
lib/virtual_merchant/communication.rb,
lib/virtual_merchant/xml_generator.rb,
lib/virtual_merchant/swipe_extractor.rb
Defined Under Namespace
Classes: Amount, Communication, Credentials, CreditCard, Logger, Response, SwipeExtractor, UserInput, XMLGenerator
Class Method Summary
collapse
-
.add_recurring(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
-
.authorize(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
-
.charge(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
-
.complete(amount, creds, transaction_id, gateway = Gateway.new(creds)) ⇒ Object
-
.delete(creds, transaction_id, gateway = Gateway.new(creds)) ⇒ Object
-
.refund(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
-
.void(transaction_id, creds, gateway = Gateway.new(creds)) ⇒ Object
Class Method Details
.add_recurring(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
27
28
29
|
# File 'lib/virtual_merchant.rb', line 27
def self.add_recurring(card, amount, creds, custom_fields={}, gateway=Gateway.new(creds))
gateway.ccaddrecurring(card, amount, custom_fields)
end
|
.authorize(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
15
16
17
|
# File 'lib/virtual_merchant.rb', line 15
def self.authorize(card, amount, creds, custom_fields={}, gateway=Gateway.new(creds))
gateway.ccauth(card, amount, custom_fields)
end
|
.charge(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
11
12
13
|
# File 'lib/virtual_merchant.rb', line 11
def self.charge(card, amount, creds, custom_fields={}, gateway=Gateway.new(creds))
gateway.ccsale(card, amount, custom_fields)
end
|
.complete(amount, creds, transaction_id, gateway = Gateway.new(creds)) ⇒ Object
19
20
21
|
# File 'lib/virtual_merchant.rb', line 19
def self.complete(amount, creds, transaction_id, gateway=Gateway.new(creds))
gateway.cccomplete(amount, transaction_id)
end
|
.delete(creds, transaction_id, gateway = Gateway.new(creds)) ⇒ Object
23
24
25
|
# File 'lib/virtual_merchant.rb', line 23
def self.delete(creds, transaction_id, gateway=Gateway.new(creds))
gateway.ccdelete(transaction_id)
end
|
.refund(card, amount, creds, custom_fields = {}, gateway = Gateway.new(creds)) ⇒ Object
31
32
33
|
# File 'lib/virtual_merchant.rb', line 31
def self.refund(card, amount, creds, custom_fields={}, gateway=Gateway.new(creds))
gateway.cccredit(card, amount, custom_fields)
end
|
.void(transaction_id, creds, gateway = Gateway.new(creds)) ⇒ Object
35
36
37
|
# File 'lib/virtual_merchant.rb', line 35
def self.void(transaction_id, creds, gateway=Gateway.new(creds))
gateway.ccvoid(transaction_id)
end
|