Commit 176aaeb7 by lanrion

fixed bug when appid or app secret invalid

parent 80501650
...@@ -74,7 +74,7 @@ module WeixinAuthorize ...@@ -74,7 +74,7 @@ module WeixinAuthorize
def set_access_token_for_client(access_token_infos=nil) def set_access_token_for_client(access_token_infos=nil)
token_infos = access_token_infos || http_get_access_token token_infos = access_token_infos || http_get_access_token
self.access_token = token_infos["access_token"] self.access_token = token_infos["access_token"]
self.expired_at = Time.now.to_i + token_infos["expires_in"] self.expired_at = Time.now.to_i + token_infos["expires_in"].to_i
end end
def http_get_access_token def http_get_access_token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment