lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.83.0 vs lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.84.0
- old
+ new
@@ -9,11 +9,11 @@
self.live_url = 'https://secure.telr.com/gateway/remote.xml'
self.supported_countries = ['AE', 'IN', 'SA']
self.default_currency = 'AED'
self.money_format = :dollars
- self.supported_cardtypes = [:visa, :master, :american_express, :maestro, :solo, :jcb]
+ self.supported_cardtypes = [:visa, :master, :american_express, :maestro, :jcb]
CVC_CODE_TRANSLATOR = {
'Y' => 'M',
'N' => 'N',
'X' => 'P',
@@ -85,13 +85,13 @@
true
end
def scrub(transcript)
transcript.
- gsub(%r((<Number>)[^<]+(<))i, '\1[FILTERED]\2').
- gsub(%r((<CVV>)[^<]+(<))i, '\1[FILTERED]\2').
- gsub(%r((<Key>)[^<]+(<))i, '\1[FILTERED]\2')
+ gsub(%r((<Number>)[^<]+(<))i, '\1[FILTERED]\2').
+ gsub(%r((<CVV>)[^<]+(<))i, '\1[FILTERED]\2').
+ gsub(%r((<Key>)[^<]+(<))i, '\1[FILTERED]\2')
end
private
def add_invoice(doc, action, money, payment_method, options)
@@ -188,11 +188,10 @@
end
def build_xml_request
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
xml.remote do |doc|
-
add_authentication(doc)
yield(doc)
end
end
@@ -218,10 +217,10 @@
doc.root.xpath('*').each do |node|
if (node.elements.size == 0)
response[node.name.downcase.to_sym] = node.text
else
node.elements.each do |childnode|
- name = "#{childnode.name.downcase}"
+ name = childnode.name.downcase
response[name.to_sym] = childnode.text
end
end
end unless doc.root.nil?