lib/active_merchant/billing/gateways/realex.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/realex.rb in activemerchant-1.104.0
- old
+ new
@@ -29,11 +29,11 @@
'maestro' => 'MC'
}
self.money_format = :cents
self.default_currency = 'EUR'
- self.supported_cardtypes = [ :visa, :master, :american_express, :diners_club ]
+ self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
self.supported_countries = %w(IE GB FR BE NL LU IT US CA ES)
self.homepage_url = 'http://www.realexpayments.com/'
self.display_name = 'Realex'
SUCCESS, DECLINED = 'Successful', 'Declined'
@@ -266,10 +266,11 @@
xml.tag! 'authcode', authcode
end
def add_comments(xml, options)
return unless options[:description]
+
xml.tag! 'comments' do
xml.tag! 'comment', options[:description], 'id' => 1
end
end
@@ -303,9 +304,10 @@
end
end
def add_three_d_secure(xml, options)
return unless three_d_secure = options[:three_d_secure]
+
version = three_d_secure.fetch(:version, '')
xml.tag! 'mpi' do
if version =~ /^2/
xml.tag! 'authentication_value', three_d_secure[:cavv]
xml.tag! 'ds_trans_id', three_d_secure[:ds_transaction_id]