lib/active_merchant/billing/gateways/skip_jack.rb in activemerchant-1.79.2 vs lib/active_merchant/billing/gateways/skip_jack.rb in activemerchant-1.80.0
- old
+ new
@@ -4,15 +4,15 @@
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class SkipJackGateway < Gateway
API_VERSION = '?.?'
- self.live_url = "https://www.skipjackic.com"
- self.test_url = "https://developer.skipjackic.com"
+ self.live_url = 'https://www.skipjackic.com'
+ self.test_url = 'https://developer.skipjackic.com'
- BASIC_PATH = "/scripts/evolvcc.dll"
- ADVANCED_PATH = "/evolvcc/evolvcc.aspx"
+ BASIC_PATH = '/scripts/evolvcc.dll'
+ ADVANCED_PATH = '/evolvcc/evolvcc.aspx'
ACTIONS = {
:authorization => 'AuthorizeAPI',
:change_status => 'SJAPI_TransactionChangeStatusRequest',
:get_status => 'SJAPI_TransactionStatusRequest'
@@ -23,38 +23,38 @@
MONETARY_CHANGE_STATUSES = ['SETTLE', 'AUTHORIZE', 'AUTHORIZE ADDITIONAL', 'CREDIT', 'SPLITSETTLE']
CARD_CODE_ERRORS = %w( N S "" )
CARD_CODE_MESSAGES = {
- "M" => "Card verification number matched",
- "N" => "Card verification number didn't match",
- "P" => "Card verification number was not processed",
- "S" => "Card verification number should be on card but was not indicated",
- "U" => "Issuer was not certified for card verification",
- "" => "Transaction failed because incorrect card verification number was entered or no number was entered"
+ 'M' => 'Card verification number matched',
+ 'N' => "Card verification number didn't match",
+ 'P' => 'Card verification number was not processed',
+ 'S' => 'Card verification number should be on card but was not indicated',
+ 'U' => 'Issuer was not certified for card verification',
+ '' => 'Transaction failed because incorrect card verification number was entered or no number was entered'
}
AVS_ERRORS = %w( A B C E I N O P R W Z )
AVS_MESSAGES = {
- "A" => "Street address matches billing information, zip/postal code does not",
- "B" => "Street address match for international transaction. Postal code not verified due to incompatible formats",
- "C" => "Street address and postal code not verified for internation transaction due to incompatible formats",
- "D" => "Street address and postal code match for international transaction",
- "E" => "Address verification service error",
- "I" => "Address information not verified by international issuer",
- "M" => "Street address and postal code match for international transaction",
- "N" => "Neither street address nor zip/postal match billing information",
- "O" => "Non-US issuer does not participate",
- "P" => "Postal codes match for international transaction but street address not verified due to incompatible formats",
- "R" => "Payment gateway was unavailable or timed out",
- "S" => "Address verification service not supported by issuer",
- "U" => "Address information is unavailable",
- "W" => "9-digit zip/postal code matches billing information, street address does not",
- "X" => "Street address and 9-digit zip/postal code matches billing information",
- "Y" => "Street address and 5-digit zip/postal code matches billing information",
- "Z" => "5-digit zip/postal code matches billing information, street address does not",
+ 'A' => 'Street address matches billing information, zip/postal code does not',
+ 'B' => 'Street address match for international transaction. Postal code not verified due to incompatible formats',
+ 'C' => 'Street address and postal code not verified for internation transaction due to incompatible formats',
+ 'D' => 'Street address and postal code match for international transaction',
+ 'E' => 'Address verification service error',
+ 'I' => 'Address information not verified by international issuer',
+ 'M' => 'Street address and postal code match for international transaction',
+ 'N' => 'Neither street address nor zip/postal match billing information',
+ 'O' => 'Non-US issuer does not participate',
+ 'P' => 'Postal codes match for international transaction but street address not verified due to incompatible formats',
+ 'R' => 'Payment gateway was unavailable or timed out',
+ 'S' => 'Address verification service not supported by issuer',
+ 'U' => 'Address information is unavailable',
+ 'W' => '9-digit zip/postal code matches billing information, street address does not',
+ 'X' => 'Street address and 9-digit zip/postal code matches billing information',
+ 'Y' => 'Street address and 5-digit zip/postal code matches billing information',
+ 'Z' => '5-digit zip/postal code matches billing information, street address does not',
}
CHANGE_STATUS_ERROR_MESSAGES = {
'0' => 'Success',
'-1' => 'Invalid Command',
@@ -353,10 +353,10 @@
def post_data(action, money, params = {})
add_credentials(params, action)
add_amount(params, action, money)
sorted_params = params.to_a.sort{|a,b| a.to_s <=> b.to_s}.reverse
- sorted_params.collect { |key, value| "#{key.to_s}=#{CGI.escape(value.to_s)}" }.join("&")
+ sorted_params.collect { |key, value| "#{key.to_s}=#{CGI.escape(value.to_s)}" }.join('&')
end
def add_transaction_id(post, transaction_id)
post[:szTransactionId] = transaction_id
end