Commit 62fa59be3c220e91ee473bf3b2fd81a47ca9331b
Committed by
[uynil]
1 parent
f4ad4cff
Exists in
master
[IMP] Remove commented codes
Showing
1 changed file
with
0 additions
and
33 deletions
Show diff stats
lib/wx_pay/service.rb
... | ... | @@ -5,39 +5,6 @@ module WxPay |
5 | 5 | module Service |
6 | 6 | GATEWAY_URL = 'https://api.mch.weixin.qq.com' |
7 | 7 | |
8 | - # def self.get_oauth_url_code(self, redirectUrl): | |
9 | - # """生成可以获得code的url""" | |
10 | - # urlObj = {} | |
11 | - # urlObj["appid"] = WxPay.appid | |
12 | - # urlObj["redirect_uri"] = redirectUrl | |
13 | - # urlObj["response_type"] = "code" | |
14 | - # urlObj["scope"] = "snsapi_base" | |
15 | - # urlObj["state"] = "STATE#wechat_redirect" | |
16 | - # bizString = self.formatBizQueryParaMap(urlObj, False) | |
17 | - # return "https://open.weixin.qq.com/connect/oauth2/authorize?"+bizString | |
18 | - | |
19 | - # def createOauthUrlForOpenid(self): | |
20 | - # """生成可以获得openid的url""" | |
21 | - # urlObj = {} | |
22 | - # urlObj["appid"] = WxPay.appid | |
23 | - # urlObj["secret"] = WxPay.APPSECRET | |
24 | - # urlObj["code"] = self.code | |
25 | - # urlObj["grant_type"] = "authorization_code" | |
26 | - # bizString = self.formatBizQueryParaMap(urlObj, False) | |
27 | - # return "https://api.weixin.qq.com/sns/oauth2/access_token?"+bizString | |
28 | - | |
29 | - # def self.invoice_getopenid(params) | |
30 | - # """通过curl向微信提交code,以获取openid""" | |
31 | - # code = "12313132" | |
32 | - # params = { | |
33 | - # appid: WxPay.appid, | |
34 | - # secret: WxPay.appsecret, | |
35 | - # code: code, | |
36 | - # grant_type: "authorization_code" | |
37 | - # } | |
38 | - # r = invoke_remote("https://api.weixin.qq.com/sns/oauth2/access_token?", make_payload(params)) | |
39 | - # openid = r['openid'] | |
40 | - # end | |
41 | 8 | def self.authenticate_openid(params) |
42 | 9 | # 当session中没有openid时,则为非登录状态 |
43 | 10 | code = params[:code] | ... | ... |