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.
147 148 149 |
# File 'lib/real_ex/transaction.rb', line 147 def refund_password @refund_password end |
Instance Method Details
#hash ⇒ Object
169 170 171 |
# File 'lib/real_ex/transaction.rb', line 169 def hash RealEx::Client.build_hash([RealEx::Client., RealEx::Config.merchant_id, order_id, amount, currency, '']) end |
#refund_hash ⇒ Object
149 150 151 |
# File 'lib/real_ex/transaction.rb', line 149 def refund_hash Digest::SHA1.hexdigest((refund_password || RealEx::Config.refund_password || '')) end |
#to_xml(&block) ⇒ Object
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/real_ex/transaction.rb', line 153 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 |index,comment| c.comment(comment, :id => index) end end end end end |