| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | @ResponseBody |
| | | @PostMapping("/testWeiXinV3") |
| | | @ApiOperation(value = "获取添加人员、选择人员说明文案") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil getContentForStudent() throws Exception { |
| | | // Map<String, Object> stringObjectMap = wechatPaymentService.weChatDoUnifiedOrder(); |
| | | // ... 在你的下单方法中调用 ... |
| | | @PostMapping("/weiXinPartnerPay") |
| | | @ApiOperation(value = "微信服务商版本APP支付") |
| | | public ResultUtil weiXinPartnerPay(){ |
| | | try { |
| | | // 将 payParams 返回给你的APP前端,前端使用这些参数调起微信支付SDK |
| | | ResultUtil resultUtil = payMoneyUtil.weixinpayV3("1720719391","购买玩湃惠民卡","15645654askjak13", |
| | | "/base/huimin/callBack/weixinPayHuiminCallback1","99"); |
| | | return resultUtil; |
| | | |
| | | // 将 payParams 返回给你的APP前端,前端使用这些参数调起微信支付SDK |
| | | // return ResponseEntity.ok(payParams); // 示例 |
| | | |
| | | } catch (Exception e) { |
| | | // 处理异常 |
| | | // return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("下单失败"); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |