Class: RealEx::Recurring::Authorization
- Inherits:
-
Transaction
- Object
- Transaction
- Transaction
- RealEx::Recurring::Authorization
- Defined in:
- lib/real_ex/recurring.rb
Constant Summary
Constants inherited from Transaction
Instance Attribute Summary
Attributes inherited from Transaction
Instance Method Summary collapse
-
#hash ⇒ Object
timesttimestamp.merchantid.orderid.amount.currency.payerref.
- #request_type ⇒ Object
- #to_xml ⇒ Object
Methods inherited from Transaction
Methods inherited from Transaction
#authorize!, #autosettle?, #initialize
Methods included from Initializer
Constructor Details
This class inherits a constructor from RealEx::Transaction
Instance Method Details
#hash ⇒ Object
timesttimestamp.merchantid.orderid.amount.currency.payerref
162 163 164 |
# File 'lib/real_ex/recurring.rb', line 162 def hash RealEx::Client.build_hash([RealEx::Client., RealEx::Config.merchant_id, order_id, amount, currency, payer.reference]) end |
#request_type ⇒ Object
130 131 132 |
# File 'lib/real_ex/recurring.rb', line 130 def request_type 'receipt-in' end |
#to_xml ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/real_ex/recurring.rb', line 134 def to_xml super do |per| per.amount(amount, :currency => currency) per.payerref payer.reference per.paymentmethod reference if customer_number or variable_reference or billing_address or shipping_address per.tssinfo do |t| t.custnum customer_number if customer_number t.varref variable_reference if variable_reference t.prodid product_id if product_id if billing_address t.address :type => 'billing' do |a| a.code billing_address.post_code a.country billing_address.country end end if shipping_address t.address :type => 'shipping' do |a| a.code shipping_address.post_code a.country shipping_address.country end end end end end end |