lib/active_merchant/billing/gateways/fat_zebra.rb in activemerchant-1.60.0 vs lib/active_merchant/billing/gateways/fat_zebra.rb in activemerchant-1.61.0
- old
+ new
@@ -1,11 +1,11 @@
require 'json'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class FatZebraGateway < Gateway
- self.live_url = "https://gateway.fatzebra.com.au/v1.0"
+ self.live_url = "https://gateway.fatzebra.com.au/v1.0"
self.test_url = "https://gateway.sandbox.fatzebra.com.au/v1.0"
self.supported_countries = ['AU']
self.default_currency = 'AUD'
self.money_format = :cents
@@ -119,13 +119,22 @@
end
end
def add_extra_options(post, options)
extra = {}
- extra[:name] = options[:merchant] if options[:merchant]
- extra[:location] = options[:merchant_location] if options[:merchant_location]
extra[:ecm] = "32" if options[:recurring]
+ extra[:cavv] = options[:cavv] if options[:cavv]
+ extra[:xid] = options[:cavv] if options[:xid]
+ extra[:sli] = options[:sli] if options[:sli]
+ add_descriptor(extra, options)
post[:extra] = extra if extra.any?
+ end
+
+ def add_descriptor(extra, options)
+ descriptor = {}
+ descriptor[:name] = options[:merchant] if options[:merchant]
+ descriptor[:location] = options[:merchant_location] if options[:merchant_location]
+ extra[:descriptor] = descriptor if descriptor.any?
end
def add_order_id(post, options)
post[:reference] = options[:order_id] || SecureRandom.hex(15)
end