lib/active_merchant/billing/gateways/skip_jack.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/skip_jack.rb in activemerchant-1.109.0
- old
+ new
@@ -158,12 +158,12 @@
'-115' => 'POS Check Invalid Check Type',
'-116' => 'POS Check Invalid Lane Number POS Check lane or cash register number is invalid. Use a valid lane or cash register number that has been configured in the Skipjack Merchant Account.',
'-117' => 'POS Check Invalid Cashier Number'
}
- self.supported_countries = ['US', 'CA']
- self.supported_cardtypes = [:visa, :master, :american_express, :jcb, :discover, :diners_club]
+ self.supported_countries = %w[US CA]
+ self.supported_cardtypes = %i[visa master american_express jcb discover diners_club]
self.homepage_url = 'http://www.skipjack.com/'
self.display_name = 'SkipJack'
# Creates a new SkipJackGateway
#
@@ -298,13 +298,13 @@
def parse(body, action)
case action
when :authorization
parse_authorization_response(body)
when :get_status
- parse_status_response(body, [:SerialNumber, :TransactionAmount, :TransactionStatusCode, :TransactionStatusMessage, :OrderNumber, :TransactionDateTime, :TransactionID, :ApprovalCode, :BatchNumber])
+ parse_status_response(body, %i[SerialNumber TransactionAmount TransactionStatusCode TransactionStatusMessage OrderNumber TransactionDateTime TransactionID ApprovalCode BatchNumber])
else
- parse_status_response(body, [:SerialNumber, :TransactionAmount, :DesiredStatus, :StatusResponse, :StatusResponseMessage, :OrderNumber, :AuditID])
+ parse_status_response(body, %i[SerialNumber TransactionAmount DesiredStatus StatusResponse StatusResponseMessage OrderNumber AuditID])
end
end
def split_lines(body)
body.split(/[\r\n]+/)
@@ -327,10 +327,10 @@
end
def parse_status_response(body, response_keys)
lines = split_lines(body)
- keys = [:szSerialNumber, :szErrorCode, :szNumberRecords]
+ keys = %i[szSerialNumber szErrorCode szNumberRecords]
values = split_line(lines[0])[0..2]
result = Hash[*keys.zip(values).flatten]
result[:szErrorMessage] = ''