lib/active_merchant/billing/gateways/fat_zebra.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/fat_zebra.rb in activemerchant-1.109.0
- old
+ new
@@ -7,11 +7,11 @@
self.test_url = 'https://gateway.sandbox.fatzebra.com.au/v1.0'
self.supported_countries = ['AU']
self.default_currency = 'AUD'
self.money_format = :cents
- self.supported_cardtypes = [:visa, :master, :american_express, :jcb]
+ self.supported_cardtypes = %i[visa master american_express jcb]
self.homepage_url = 'https://www.fatzebra.com.au/'
self.display_name = 'Fat Zebra'
def initialize(options = {})
@@ -46,21 +46,21 @@
commit(:post, 'purchases', post)
end
def capture(money, authorization, options = {})
- txn_id, _ = authorization.to_s.split('|')
+ txn_id, = authorization.to_s.split('|')
post = {}
add_amount(post, money, options)
add_extra_options(post, options)
commit(:post, "purchases/#{CGI.escape(txn_id)}/capture", post)
end
def refund(money, authorization, options={})
- txn_id, _ = authorization.to_s.split('|')
+ txn_id, = authorization.to_s.split('|')
post = {}
add_extra_options(post, options)
add_amount(post, money, options)
post[:transaction_id] = txn_id
@@ -108,10 +108,10 @@
post[:card_number] = creditcard.number
post[:card_expiry] = "#{creditcard.month}/#{creditcard.year}"
post[:cvv] = creditcard.verification_value if creditcard.verification_value?
post[:card_holder] = creditcard.name if creditcard.name
elsif creditcard.is_a?(String)
- id, _ = creditcard.to_s.split('|')
+ id, = creditcard.to_s.split('|')
post[:card_token] = id
post[:cvv] = options[:cvv]
elsif creditcard.is_a?(Hash)
ActiveMerchant.deprecated 'Passing the credit card as a Hash is deprecated. Use a String and put the (optional) CVV in the options hash instead.'
post[:card_token] = creditcard[:token]