lib/active_merchant/billing/gateways/barclaycard_smartpay.rb in activemerchant-1.80.0 vs lib/active_merchant/billing/gateways/barclaycard_smartpay.rb in activemerchant-1.81.0

- old
+ new

@@ -11,10 +11,12 @@ self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb, :dankort, :maestro] self.homepage_url = 'https://www.barclaycardsmartpay.com/' self.display_name = 'Barclaycard Smartpay' + API_VERSION = 'v30' + def initialize(options = {}) requires!(options, :company, :merchant, :password) super end @@ -220,14 +222,14 @@ end def build_url(action) case action when 'store' - "#{test? ? self.test_url : self.live_url}/Recurring/v12/storeToken" + "#{test? ? self.test_url : self.live_url}/Recurring/#{API_VERSION}/storeToken" when 'finalize3ds' - "#{test? ? self.test_url : self.live_url}/Payment/v12/authorise3d" + "#{test? ? self.test_url : self.live_url}/Payment/#{API_VERSION}/authorise3d" else - "#{test? ? self.test_url : self.live_url}/Payment/v12/#{action}" + "#{test? ? self.test_url : self.live_url}/Payment/#{API_VERSION}/#{action}" end end def billing_address_hash(options) address = options[:address] || options[:billing_address] if options[:address] || options[:billing_address]