Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
Using MangoPay.version_code in AuthorizationToken::Manager.get_token
  • Loading branch information
Sergiusz Woźnicki committed Jul 30, 2015
1 parent 54ff34f commit 7cd1857
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mangopay/authorization_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def storage= (storage)
def get_token
token = storage.get
if token.nil? || token['timestamp'].nil? || token['timestamp'] <= Time.now
token = MangoPay.request(:post, '/v2/oauth/token', {}, {}, {}, Proc.new do |req|
token = MangoPay.request(:post, "/#{MangoPay.version_code}/oauth/token", {}, {}, {}, Proc.new do |req|
cfg = MangoPay.configuration
req.basic_auth cfg.client_id, cfg.client_passphrase
req.body = 'grant_type=client_credentials'
Expand Down
2 changes: 1 addition & 1 deletion lib/mangopay/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module MangoPay
VERSION = '3.0.17'
VERSION = '3.0.18'
end

0 comments on commit 7cd1857

Please sign in to comment.