lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.100.0 vs lib/active_merchant/billing/gateways/telr.rb in activemerchant-1.101.0

- old
+ new

@@ -144,13 +144,11 @@ doc.zip(address[:zip]) if address[:zip] doc.region(address[:state]) if address[:state] end def add_ref(doc, action, payment_method) - if ['capture', 'refund', 'void'].include?(action) || payment_method.is_a?(String) - doc.ref(split_authorization(payment_method)[0]) - end + doc.ref(split_authorization(payment_method)[0]) if ['capture', 'refund', 'void'].include?(action) || payment_method.is_a?(String) end def add_authentication(doc) doc.store(@options[:merchant_id]) doc.key(@options[:api_key]) @@ -249,12 +247,10 @@ response[:message] end end def error_code_from(succeeded, response) - unless succeeded - response[:code] - end + response[:code] unless succeeded end def cvv_result(parsed) CVVResult.new(CVC_CODE_TRANSLATOR[parsed[:cvv]]) end