lib/active_merchant/billing/gateways/quickbooks.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/gateways/quickbooks.rb in activemerchant-1.104.0

- old
+ new

@@ -238,10 +238,11 @@ def headers(method, uri) return oauth_v2_headers if @options[:refresh_token] raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless [:post, :get].include?(method) + request_uri = URI.parse(uri) # Following the guidelines from http://nouncer.com/oauth/authentication.html oauth_parameters = { oauth_nonce: generate_unique_id, @@ -283,9 +284,10 @@ def check_token_response(response, endpoint, body = {}, options = {}) return response unless @options[:refresh_token] return response unless options[:allow_refresh] return response unless response.params['code'] == 'AuthenticationFailed' + refresh_access_token commit(endpoint, body) end def refresh_access_token