Class: RealEx::Rebate
- Inherits:
-
Transaction
- Object
- Transaction
- RealEx::Rebate
- Defined in:
- lib/real_ex/transaction.rb
Constant Summary
Constants inherited from Transaction
Instance Attribute Summary collapse
-
#refund_password ⇒ Object
Returns the value of attribute refund_password.
Attributes inherited from Transaction
Instance Method Summary collapse
Methods inherited from Transaction
#authorize!, #autosettle?, #initialize, #request_type
Methods included from Initializer
Constructor Details
This class inherits a constructor from RealEx::Transaction
Instance Attribute Details
#refund_password ⇒ Object
Returns the value of attribute refund_password.
148 149 150 |
# File 'lib/real_ex/transaction.rb', line 148 def refund_password @refund_password end |
Instance Method Details
#hash ⇒ Object
170 171 172 |
# File 'lib/real_ex/transaction.rb', line 170 def hash RealEx::Client.build_hash([RealEx::Client., RealEx::Config.merchant_id, order_id, amount, currency, '']) end |
#refund_hash ⇒ Object
150 151 152 |
# File 'lib/real_ex/transaction.rb', line 150 def refund_hash Digest::SHA1.hexdigest((refund_password || RealEx::Config.refund_password || '')) end |
#to_xml(&block) ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/real_ex/transaction.rb', line 154 def to_xml(&block) super do |per| per.amount(amount, :currency => currency) per.autosettle :flag => autosettle? ? '1' : '0' per.refundhash refund_hash if !comments.empty? per.comments do |c| comments.each_with_index do |comment,index| c.comment(comment, :id => index + 1) end end end end end |