wechat的access_token被复盖了

This commit is contained in:
guange 2016-08-13 21:51:55 +08:00
parent 817fdad21d
commit b6bec5f9a7
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ module Wechat
def with_access_token(params = {}, tries = 2)
params ||= {}
yield(params.merge(access_token: access_token.token))
yield(params.reverse_merge(access_token: access_token.token))
rescue AccessTokenExpiredError
access_token.refresh
retry unless (tries -= 1).zero?