lib/mangopay/authorization_token.rb in mangopay-3.0.10 vs lib/mangopay/authorization_token.rb in mangopay-3.0.11

- old
+ new

@@ -13,10 +13,10 @@ end def get_token token = storage.get if token.nil? || token['timestamp'].nil? || token['timestamp'] <= Time.now - token = MangoPay.request(:post, '/api/oauth/token', {}, {}, {}, Proc.new do |req| + token = MangoPay.request(:post, '/v2/oauth/token', {}, {}, {}, Proc.new do |req| cfg = MangoPay.configuration req.basic_auth cfg.client_id, cfg.client_passphrase req.body = 'grant_type=client_credentials' end) token['timestamp'] = Time.now + token['expires_in'].to_i