@Controller
@RequestMapping(value="/wechat")
public class WechatController
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
(专用程序包) java.lang.String |
uploadurl |
(专用程序包) WeChatServiceImpl |
weChatServiceImpl |
(专用程序包) com.github.binarywang.wxpay.service.WxPayService |
wxPayService |
(专用程序包) WxPayServiceManager |
wxPayServiceManagerImpl |
构造器和说明 |
---|
WechatController() |
限定符和类型 | 方法和说明 |
---|---|
RetVo |
getwxAccesstoken(java.lang.String appId,
java.lang.String redirectUrl,
java.lang.String scope)
得到微信的Accesstoken
返回值里面就包含有
|
RetVo |
oauthLogin(java.lang.String code)
微信oauth的accesstoken
|
RetVo |
parCreate(java.lang.String openid,
java.lang.String orderId,
java.lang.String orderDesc,
java.lang.String account,
java.lang.String returnUrl,
java.lang.String notifyUrl)
唤醒微信支付
|
java.lang.String |
parseOrderNotifyResult(java.lang.String xmlData)
微信支付回调
|
RetVo |
regeditandLoginWithOpenId(java.util.Map<java.lang.String,java.lang.Object> params,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
注册并使用openID登录
|
RetVo |
sendBindSmsCode(java.lang.String phone,
java.lang.String vcodekey,
java.lang.String vcode,
java.lang.String orgid)
微信手机号绑定发送验证码
|
RetVo |
sign(java.util.Map<java.lang.String,java.lang.String> params,
javax.servlet.http.HttpServletRequest request)
微信公众号权限签名
|
RetVo |
uploadfile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
上传文件
|
RetVo |
uploadToux(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
上传头像
|
RetVo |
weixinUrlVerify(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
@Autowired WxPayServiceManager wxPayServiceManagerImpl
@Autowired WeChatServiceImpl weChatServiceImpl
@Value(value="${upload-path}") java.lang.String uploadurl
@Autowired com.github.binarywang.wxpay.service.WxPayService wxPayService
@RequestMapping(value="/send/bind/smscode") @ResponseBody public RetVo sendBindSmsCode(@RequestParam(value="phone") java.lang.String phone, @RequestParam(value="vcodekey") java.lang.String vcodekey, @RequestParam(value="vcode") java.lang.String vcode, @RequestParam(name="orgid",required=false) java.lang.String orgid) throws java.lang.Exception
phone
- 电话号码vcodekey
- 验证码keyvcode
- 验证码orgid
- 机构idjava.lang.Exception
- 出错会抛出异常@RequestMapping(value="/sign", method=POST) @ResponseBody public RetVo sign(@RequestBody java.util.Map<java.lang.String,java.lang.String> params, javax.servlet.http.HttpServletRequest request) throws java.lang.Exception
params
- 参数request
- 请求对象java.lang.Exception
- 出错会抛出异常@RequestMapping(value="/uploadfile", method=POST) @ResponseBody public RetVo uploadfile(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- 请求对象response
- 相应对象java.lang.Exception
- 出错会抛出异常@RequestMapping(value="/uploadtoux", method=POST) @ResponseBody public RetVo uploadToux(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
request
- 请求对象response
- 相应对象java.lang.Exception
- 出错会抛出异常@RequestMapping(value="oauthaccesstoken", method=GET) @ResponseBody public RetVo oauthLogin(java.lang.String code) throws java.lang.Exception
code
- 参数java.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="regeditandLoginByOpenId", method=POST) public RetVo regeditandLoginWithOpenId(@RequestBody java.util.Map<java.lang.String,java.lang.Object> params, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
params
- 参数request
- 请求对象response
- 响应对象java.lang.Exception
- 出错会抛出异常@ResponseBody @RequestMapping(value="weixinUrlVerify", method=POST) public RetVo weixinUrlVerify(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.lang.Exception
java.lang.Exception
@RequestMapping(value="/pay/create") public RetVo parCreate(java.lang.String openid, java.lang.String orderId, java.lang.String orderDesc, java.lang.String account, java.lang.String returnUrl, java.lang.String notifyUrl)
openid
- openidorderId
- orderIdorderDesc
- orderDescaccount
- accountreturnUrl
- returnUrlnotifyUrl
- notifyUrl@RequestMapping(value="/notify/order") public java.lang.String parseOrderNotifyResult(@RequestBody java.lang.String xmlData) throws com.github.binarywang.wxpay.exception.WxPayException
xmlData
- 数据com.github.binarywang.wxpay.exception.WxPayException
- 出错抛出异常@RequestMapping(value="getwxAccesstoken", method=GET) public RetVo getwxAccesstoken(java.lang.String appId, java.lang.String redirectUrl, java.lang.String scope) throws java.lang.Exception
appId
- appidredirectUrl
- 重定向地址scope
- 参数java.lang.Exception
- 出错会抛出异常