Class: RealEx::Transaction
- Inherits:
-
Object
- Object
- RealEx::Transaction
show all
- Includes:
- Initializer
- Defined in:
- lib/real_ex/transaction.rb
Constant Summary
collapse
- REQUEST_TYPES =
['auth', 'manual', 'offline', 'tss', 'payer-new', 'payer-edit', 'card-new', 'card-update-card', 'card-cancel-card']
Instance Attribute Summary collapse
Instance Method Summary
collapse
included
Constructor Details
#initialize(hash = {}) ⇒ Transaction
Returns a new instance of Transaction.
Instance Attribute Details
#authcode ⇒ Object
Returns the value of attribute authcode.
6
7
8
|
# File 'lib/real_ex/transaction.rb', line 6
def authcode
@authcode
end
|
Returns the value of attribute comments.
5
6
7
|
# File 'lib/real_ex/transaction.rb', line 5
def
@comments
end
|
#pasref ⇒ Object
Returns the value of attribute pasref.
6
7
8
|
# File 'lib/real_ex/transaction.rb', line 6
def pasref
@pasref
end
|
Instance Method Details
#autosettle? ⇒ Boolean
24
25
26
|
# File 'lib/real_ex/transaction.rb', line 24
def autosettle?
autosettle
end
|
#request_type ⇒ Object
20
21
22
|
# File 'lib/real_ex/transaction.rb', line 20
def request_type
self.class.name.split('::').last.downcase
end
|
#to_xml(&block) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/real_ex/transaction.rb', line 28
def to_xml(&block)
xml = RealEx::Client.build_xml(request_type) do |r|
r.merchantid RealEx::Config.merchant_id
r.orderid order_id
r.authcode authcode if authcode
r.pasref pasref if pasref
r.account account
if block_given?
block.call(r)
end
if !.empty?
r. do |c|
.each_with_index do |,index|
c.(, :id => index + 1)
end
end
end
r.sha1hash hash
end
end
|