Giter Site home page Giter Site logo

qy_wechat_api's People

Contributors

lanrion avatar nickcen avatar yaowuping avatar zmbacker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

qy_wechat_api's Issues

文档错误

获取js api签名包
group_client.sign_package(request.url)
此处用法错误,应该写成:
group_client.js.sign_package(request.url)

调用下载时报错

media_id = "xICvlUNt6cDIJLris5Dkxb9NUJQ4P7uS7R4GuGSEjeqhHCDjYNgkSs-EFjpxnS_n"

client.media.get_media_by_id(media_id)

错误提示为:

JSON::ParserError (lexical error: invalid char in json text.
???? (right here) ------^
):

微信企业号登录接口反馈

group_client = QyWechatApi::Client.new(@@corp_id, @@provider_secret)

  1. group_client.auth_login.get_provider_token(@@provider_secret)
  2. group_client.auth_login.get_login_info_by_secret(params[:auth_code], @@provider_secret)

调用1、2调用时,报错如下

RestClient::ResourceNotFound (404 Resource Not Found):

获取应用概况列表,报错,和上次那个问题差不多!

获取应用概况列表

group_client.agent.list

QyAuthAgent agent syn : RestClient::ResourceNotFound : 404 Resource Not Found
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/abstract_response.rb:48:in return!' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/request.rb:495:inprocess_result'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/request.rb:421:in block in transmit' /usr/local/rvm/rubies/ruby-2.1.4/lib/ruby/2.1.0/net/http.rb:853:instart'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/request.rb:413:in transmit' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/request.rb:176:inexecute'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient/request.rb:41:in execute' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rest-client-1.7.3/lib/restclient.rb:65:inget'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/bundler/gems/qy_wechat_api-f5ad0b713fab/lib/qy_wechat_api.rb:31:in http_get_without_token' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/bundler/gems/qy_wechat_api-f5ad0b713fab/lib/qy_wechat_api/api/base.rb:16:inhttp_get'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/bundler/gems/qy_wechat_api-f5ad0b713fab/lib/qy_wechat_api/api/agent.rb:16:in list' /home/deploy/xiaoshouke/releases/20150724132006/app/models/qy_auth_agent.rb:318:insyn'
/home/deploy/xiaoshouke/releases/20150724132006/app/controllers/qy_auth_agents_controller.rb:8:in index' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/implicit_render.rb:4:insend_action'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/abstract_controller/base.rb:189:in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/rendering.rb:10:inprocess_action'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/abstract_controller/callbacks.rb:20:in block in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:149:inblock in halting_and_conditional'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:inblock in halting'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:229:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:229:inblock in halting'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166:inblock in halting'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86:inrun_callbacks'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/abstract_controller/callbacks.rb:19:in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/rescue.rb:29:inprocess_action'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:31:in block in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:159:inblock in instrument'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20:in instrument' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/notifications.rb:159:ininstrument'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:30:in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/params_wrapper.rb:250:inprocess_action'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/railties/controller_runtime.rb:18:in process_action' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/abstract_controller/base.rb:136:inprocess'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionview-4.1.8/lib/action_view/rendering.rb:30:in process' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal.rb:196:indispatch'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal/rack_delegation.rb:13:in dispatch' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_controller/metal.rb:232:inblock in action'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:82:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:82:indispatch'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:50:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:73:inblock in call'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:59:in each' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:59:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:678:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/simple_captcha2-0.3.4/lib/simple_captcha/middleware.rb:26:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/etag.rb:23:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/conditionalget.rb:25:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/head.rb:11:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/remotipart-1.2.1/lib/remotipart/middleware.rb:27:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/params_parser.rb:27:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/flash.rb:254:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:225:in context' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/session/abstract/id.rb:220:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/cookies.rb:560:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/query_cache.rb:36:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:29:inblock in call'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/callbacks.rb:82:in run_callbacks' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:27:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/remote_ip.rb:76:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:38:incall_app'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in block in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68:inblock in tagged'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:26:in tagged' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68:intagged'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/rack/logger.rb:20:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.8/lib/action_dispatch/middleware/request_id.rb:21:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/methodoverride.rb:21:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/runtime.rb:17:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.8/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/rack-1.5.3/lib/rack/sendfile.rb:112:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/engine.rb:514:in call' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/application.rb:144:incall'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:in public_send' /home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/gems/railties-4.1.8/lib/rails/railtie.rb:194:inmethod_missing'
/usr/local/rvm/gems/ruby-2.1.4@rails418/gems/passenger-4.0.53/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in process_request' /usr/local/rvm/gems/ruby-2.1.4@rails418/gems/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:141:inaccept_and_process_next_request'
/usr/local/rvm/gems/ruby-2.1.4@rails418/gems/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:109:in main_loop' /usr/local/rvm/gems/ruby-2.1.4@rails418/gems/passenger-4.0.53/lib/phusion_passenger/request_handler.rb:455:inblock (3 levels) in start_threads'

qy_client.is_valid?

在QyWechatApi::Client.new(corpid, nil, {access_token: access_token}),传access_token,is_valid?也要有效!方便更新access_token.

还是上次那个问题?

MultiXml::ParseError (Start tag expected, '<' not found):
multi_xml (0.5.5) lib/multi_xml/parsers/nokogiri.rb:15:in parse' multi_xml (0.5.5) lib/multi_xml.rb:138:inparse'
/home/deploy/xiaoshouke/shared/bundle/ruby/2.1.0/bundler/gems/qy_wechat-31d0c92ad14e/app/controllers/qy_wechat/qy_wechat_controller.rb:32:in setup_wechat_message' activesupport (4.1.8) lib/active_support/callbacks.rb:424:inblock in make_lambda'
activesupport (4.1.8) lib/active_support/callbacks.rb:143:in call' activesupport (4.1.8) lib/active_support/callbacks.rb:143:inblock in halting_and_conditional'
activesupport (4.1.8) lib/active_support/callbacks.rb:149:in call' activesupport (4.1.8) lib/active_support/callbacks.rb:149:inblock in halting_and_conditional'
activesupport (4.1.8) lib/active_support/callbacks.rb:86:in call' activesupport (4.1.8) lib/active_support/callbacks.rb:86:inrun_callbacks'
actionpack (4.1.8) lib/abstract_controller/callbacks.rb:19:in process_action' actionpack (4.1.8) lib/action_controller/metal/rescue.rb:29:inprocess_action'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:31:in block in process_action' activesupport (4.1.8) lib/active_support/notifications.rb:159:inblock in instrument'
activesupport (4.1.8) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (4.1.8) lib/active_support/notifications.rb:159:ininstrument'
actionpack (4.1.8) lib/action_controller/metal/instrumentation.rb:30:in process_action' actionpack (4.1.8) lib/action_controller/metal/params_wrapper.rb:250:inprocess_action'
activerecord (4.1.8) lib/active_record/railties/controller_runtime.rb:18:in process_action' actionpack (4.1.8) lib/abstract_controller/base.rb:136:inprocess'
actionview (4.1.8) lib/action_view/rendering.rb:30:in process' actionpack (4.1.8) lib/action_controller/metal.rb:196:indispatch'
actionpack (4.1.8) lib/action_controller/metal/rack_delegation.rb:13:in dispatch' actionpack (4.1.8) lib/action_controller/metal.rb:232:inblock in action'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:in call' actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:82:indispatch'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:50:in call' actionpack (4.1.8) lib/action_dispatch/journey/router.rb:73:inblock in call'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in each' actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:incall'
actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:678:in call' railties (4.1.8) lib/rails/engine.rb:514:incall'
railties (4.1.8) lib/rails/railtie.rb:194:in public_send' railties (4.1.8) lib/rails/railtie.rb:194:inmethod_missing'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:73:in block in call' actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:ineach'
actionpack (4.1.8) lib/action_dispatch/journey/router.rb:59:in call' actionpack (4.1.8) lib/action_dispatch/routing/route_set.rb:678:incall'
simple_captcha2 (0.3.2) lib/simple_captcha/middleware.rb:26:in call' rack (1.5.2) lib/rack/etag.rb:23:incall'
rack (1.5.2) lib/rack/conditionalget.rb:35:in call' rack (1.5.2) lib/rack/head.rb:11:incall'
remotipart (1.2.1) lib/remotipart/middleware.rb:27:in call' actionpack (4.1.8) lib/action_dispatch/middleware/params_parser.rb:27:incall'
actionpack (4.1.8) lib/action_dispatch/middleware/flash.rb:254:in call' rack (1.5.2) lib/rack/session/abstract/id.rb:225:incontext'
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in call' actionpack (4.1.8) lib/action_dispatch/middleware/cookies.rb:560:incall'
activerecord (4.1.8) lib/active_record/query_cache.rb:36:in call' activerecord (4.1.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:incall'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:29:in block in call' activesupport (4.1.8) lib/active_support/callbacks.rb:82:inrun_callbacks'
actionpack (4.1.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call'

lib/qy_wechat_api/handler/global_code.rb:3: invalid multibyte char (US-ASCII) (SyntaxError)

lib/qy_wechat_api/handler/global_code.rb:3: invalid multibyte char (US-ASCII) (SyntaxError)
/Users/zhangqinjian/.rvm/gems/ruby-1.9.3-p429@demo_weixin/bundler/gems/qy_wechat_api-3d07768b1d64/lib/qy_wechat_api/handler/global_code.rb:3: invalid multibyte char (US-ASCII)
/Users/zhangqinjian/.rvm/gems/ruby-1.9.3-p429@demo_weixin/bundler/gems/qy_wechat_api-3d07768b1d64/lib/qy_wechat_api/handler/global_code.rb:3: syntax error, unexpected $end, expecting '}'
-1 => "系统繁忙",

duplicated key at line 156

    60114 => "性别不合法",
    60115 => "已关注成员微信不能修改",
    60114 => "扩展属性已存在",

全量覆盖部门的时候出现错误

错误日志信息 如下:

Started GET "/wechat_accounts/sync_department" for 127.0.0.1 at 2016-06-24 09:54:44 +0800
  ActiveRecord::SchemaMigration Load (0.7ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by WechatAccountsController#sync_department as HTML
"部门名称,部门ID,父部门ID,排序\n售后服务部,2,1,0\n人力资源,3,1,1\n平台开发部,5,1,2\n"
url: /gettoken--- params: {:corpid=>"xxxxx", :corpsecret=>"xxxxxx-xxxxxxxx"}
url: /material/add_material-- payload: {:media=>#<File:/var/folders/09/dch7v0n57yx4w326djq6jj5c0000gp/T/departments_120160624-23490-1qexu6v>}-- params: {:type=>"file", :agentid=>1, :access_token=>"E19c5W59EBU3UII5lTKy3THyfw4NLMzp8O-ZdI3rCL8MJ--fhb_YvCSW51Kvx7Ud"}
#<QyWechatApi::ResultHandler:0x007fd11759a728 @code=0, @en_msg="ok", @cn_msg="请求成功", @result={"media_id"=>"2eusR3qtOFzzQ905OvHdYBdrOClO6HxrFccgRaLM96XzvNWnNqmJUZTTPEe90XJTtoX7xv-TmbKmglHd9uAEzhA"}>
url: /batch/replaceparty-- payload: {:media_id=>"2eusR3qtOFzzQ905OvHdYBdrOClO6HxrFccgRaLM96XzvNWnNqmJUZTTPEe90XJTtoX7xv-TmbKmglHd9uAEzhA", :callback=>{"url"=>"http://xxxx/qy_wechat/1", "token"=>"xxxxxxx", "encodingaeskey"=>"xxxxxxxx"}}-- params: {:access_token=>"E19c5W59EBU3UII5lTKy3THyfw4NLMzp8O-ZdI3rCL8MJ--fhb_YvCSW51Kvx7Ud"}
#<QyWechatApi::ResultHandler:0x007fd113ef85a8 @code=40057, @en_msg="invalid CallBack url/host/token", @cn_msg="不合法的callbackurl", @result={}>

Completed 200 OK in 4789ms (Views: 813.1ms | ActiveRecord: 7.3ms)


Started GET "/qy_wechat/1?msg_signature=ddc35f66c214c9c99fec9d7883db868557d21369&timestamp=1466733287&nonce=477765385&echostr=QKoeRsr9op%2FhErK8r3VSEWBHt2PLxxNeMx7mHldO2XnbRmUX4OAueqWCL%2BfP3InlkK7Y4GjMDBPR1UU0Vv6yCQ%3D%3D" for 127.0.0.1 at 2016-06-24 09:54:49 +0800
Processing by WechatCorpController#verify_url as */*
  Parameters: {"msg_signature"=>"ddc35f66c214c9c99fec9d7883db868557d21369", "timestamp"=>"1466733287", "nonce"=>"477765385", "echostr"=>"QKoeRsr9op/hErK8r3VSEWBHt2PLxxNeMx7mHldO2XnbRmUX4OAueqWCL+fP3InlkK7Y4GjMDBPR1UU0Vv6yCQ==", "wechat_account_id"=>"1"}
  WechatAccount Load (0.5ms)  SELECT  "wechat_accounts".* FROM "wechat_accounts" WHERE "wechat_accounts"."id" = $1 LIMIT 1  [["id", 1]]
current_signature: ddc35f66c214c9c99fec9d7883db868557d21369
  Rendered text template (0.0ms)
Completed 200 OK in 23ms (Views: 4.5ms | ActiveRecord: 0.5ms)

日志中有两个请求 第一个请求是 进行全量覆盖部门操作, 第二个请求是微信服务器进行 callback 的校验请求, 返回都正常通过。 接口验证的时候使用一样的校验,可以通过。

全量覆盖的错误信息如下:

#<QyWechatApi::ResultHandler:0x007fd113ef85a8 @code=40057, @en_msg="invalid CallBack url/host/token", @cn_msg="不合法的callbackurl", @result={}>

新增验证方法

qy_wechat_api ||= QyWechatApi::Client.new(@user_qy_role.corp_id, @user_qy_role.corp_secret)

qy_wechat_api.is_valid? 用来判断,传递的两个是否有效

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.