lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/payment_express.rb in activemerchant-1.87.0
- old
+ new
@@ -272,13 +272,13 @@
def add_optional_elements(xml, options)
if client_type = normalized_client_type(options[:client_type])
xml.add_element('ClientType').text = client_type
end
- xml.add_element('TxnData1').text = options[:txn_data1].to_s.slice(0,255) unless options[:txn_data1].blank?
- xml.add_element('TxnData2').text = options[:txn_data2].to_s.slice(0,255) unless options[:txn_data2].blank?
- xml.add_element('TxnData3').text = options[:txn_data3].to_s.slice(0,255) unless options[:txn_data3].blank?
+ xml.add_element('TxnData1').text = options[:txn_data1].to_s.slice(0, 255) unless options[:txn_data1].blank?
+ xml.add_element('TxnData2').text = options[:txn_data2].to_s.slice(0, 255) unless options[:txn_data2].blank?
+ xml.add_element('TxnData3').text = options[:txn_data3].to_s.slice(0, 255) unless options[:txn_data3].blank?
end
def new_transaction
REXML::Document.new.add_element('Txn')
end
@@ -338,16 +338,16 @@
"#{format(month, :two_digits)}#{format(year, :two_digits)}"
end
def normalized_client_type(client_type_from_options)
case client_type_from_options.to_s.downcase
- when 'web' then 'Web'
- when 'ivr' then 'IVR'
- when 'moto' then 'MOTO'
- when 'unattended' then 'Unattended'
- when 'internet' then 'Internet'
- when 'recurring' then 'Recurring'
- else nil
+ when 'web' then 'Web'
+ when 'ivr' then 'IVR'
+ when 'moto' then 'MOTO'
+ when 'unattended' then 'Unattended'
+ when 'internet' then 'Internet'
+ when 'recurring' then 'Recurring'
+ else nil
end
end
end
class PaymentExpressResponse < Response