lib/active_merchant/billing/gateways/netpay.rb in activemerchant-1.79.2 vs lib/active_merchant/billing/gateways/netpay.rb in activemerchant-1.80.0

- old
+ new

@@ -49,11 +49,11 @@ # The name of the gateway self.display_name = 'NETPAY Gateway' CURRENCY_CODES = { - "MXN" => '484' + 'MXN' => '484' } # The header keys that we will provide in the response params hash RESPONSE_KEYS = ['ResponseMsg', 'ResponseText', 'ResponseCode', 'TimeIn', 'TimeOut', 'AuthCode', 'OrderId', 'CardTypeName', 'MerchantId', 'IssuerAuthDate'] @@ -155,21 +155,21 @@ def build_authorization(request_params, response_params) [response_params['OrderId'], request_params['Total'], request_params['CurrencyCode']].join('|') end def split_authorization(authorization) - order_id, amount, currency = authorization.split("|") + order_id, amount, currency = authorization.split('|') [order_id, amount, currency] end def order_id_from(authorization) split_authorization(authorization).first end def expdate(credit_card) - year = sprintf("%.4i", credit_card.year) - month = sprintf("%.2i", credit_card.month) + year = sprintf('%.4i', credit_card.year) + month = sprintf('%.2i', credit_card.month) "#{month}/#{year[-2..-1]}" end def url @@ -189,10 +189,10 @@ def commit(action, parameters, options) add_login_data(parameters) add_action(parameters, action, options) - post = parameters.collect{|key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&") + post = parameters.collect{|key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&') parse(ssl_post(url, post), parameters) end # Override the regular handle response so we can access the headers def handle_response(response)