lib/active_merchant/billing/gateways/cardknox.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/cardknox.rb in activemerchant-1.109.0
- old
+ new
@@ -1,13 +1,13 @@
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class CardknoxGateway < Gateway
self.live_url = 'https://x1.cardknox.com/gateway'
- self.supported_countries = ['US', 'CA', 'GB']
+ self.supported_countries = %w[US CA GB]
self.default_currency = 'USD'
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
self.homepage_url = 'https://www.cardknox.com/'
self.display_name = 'Cardknox'
COMMANDS = {
@@ -114,11 +114,11 @@
def split_authorization(authorization)
authorization.split(';')
end
def add_reference(post, reference)
- reference, _, _ = split_authorization(reference)
+ reference, = split_authorization(reference)
post[:Refnum] = reference
end
def source_type(source)
if source.respond_to?(:brand)
@@ -245,10 +245,10 @@
post[:Name] = check.name
post[:CheckNum] = check.number
end
def add_cardknox_token(post, authorization)
- _, token, _ = split_authorization(authorization)
+ _, token, = split_authorization(authorization)
post[:Token] = token
end
def parse(body)