<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -191,7 +191,7 @@ module ActiveMerchant
         timestamp = self.class.timestamp
         xml = Builder::XmlMarkup.new :indent =&gt; 2
         xml.tag! 'request', 'timestamp' =&gt; timestamp, 'type' =&gt; 'auth' do
-          add_merchant_details(xml)
+          add_merchant_details(xml, options)
           xml.tag! 'orderid', sanitize_order_id(options[:order_id])
           add_ammount(xml, money, options)
           add_card(xml, credit_card)
@@ -207,7 +207,7 @@ module ActiveMerchant
         timestamp = self.class.timestamp
         xml = Builder::XmlMarkup.new :indent =&gt; 2
         xml.tag! 'request', 'timestamp' =&gt; timestamp, 'type' =&gt; 'settle' do
-          add_merchant_details(xml)
+          add_merchant_details(xml, options)
           add_transaction_identifiers(xml, options)
           add_comments(xml, options)
           add_signed_digest(xml, timestamp, @options[:login], options[:order_id])
@@ -219,7 +219,7 @@ module ActiveMerchant
         timestamp = self.class.timestamp
         xml = Builder::XmlMarkup.new :indent =&gt; 2
         xml.tag! 'request', 'timestamp' =&gt; timestamp, 'type' =&gt; 'rebate' do
-          add_merchant_details(xml)
+          add_merchant_details(xml, options)
           add_transaction_identifiers(xml, options)
           xml.tag! 'amount', amount(money), 'currency' =&gt; options[:currency] || currency(money)
           xml.tag! 'refundhash', @options[:refund_hash] if @options[:refund_hash]
@@ -234,7 +234,7 @@ module ActiveMerchant
         timestamp = self.class.timestamp
         xml = Builder::XmlMarkup.new :indent =&gt; 2
         xml.tag! 'request', 'timestamp' =&gt; timestamp, 'type' =&gt; 'void' do
-          add_merchant_details(xml)
+          add_merchant_details(xml, options)
           add_transaction_identifiers(xml, options)
           add_comments(xml, options)
           add_signed_digest(xml, timestamp, @options[:login], options[:order_id])
@@ -272,9 +272,11 @@ module ActiveMerchant
         end
       end
       
-      def add_merchant_details(xml)
+      def add_merchant_details(xml, options)
         xml.tag! 'merchantid', @options[:login] 
-        xml.tag! 'account', options[:account] || @options[:account]
+        if options[:account] || @options[:account]
+          xml.tag! 'account', options[:account] || @options[:account]
+        end
       end
       
       def add_transaction_identifiers(xml, options)</diff>
      <filename>lib/active_merchant/billing/gateways/realex.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fec28b105ea03facdbec5766d743ec2c5e8eb55b</id>
    </parent>
  </parents>
  <author>
    <name>David Rice</name>
    <email>davidjrice@gmail.com</email>
  </author>
  <url>http://github.com/davidjrice/active_merchant/commit/0a3d5c59eb296e7fd2df6e67238944e8ec7297d0</url>
  <id>0a3d5c59eb296e7fd2df6e67238944e8ec7297d0</id>
  <committed-date>2009-08-27T07:23:38-07:00</committed-date>
  <authored-date>2009-08-27T07:23:38-07:00</authored-date>
  <message>Allow account override per transaction for Realex gateway, pass :account option</message>
  <tree>07a410411e16001b418f4e1b48079f1177c3a409</tree>
  <committer>
    <name>David Rice</name>
    <email>davidjrice@gmail.com</email>
  </committer>
</commit>
