diff --git a/nxhs-service/src/main/java/cc/yunxi/controller/TestController.java b/nxhs-service/src/main/java/cc/yunxi/controller/TestController.java index ae7de5d..13a9dad 100644 --- a/nxhs-service/src/main/java/cc/yunxi/controller/TestController.java +++ b/nxhs-service/src/main/java/cc/yunxi/controller/TestController.java @@ -94,21 +94,21 @@ public class TestController { return CommonResult.success("数据处理完成"); } - @ApiOperation("微信提现测试") - @GetMapping("/wxcash") - public CommonResult wxCash(@RequestParam("openid") String openid) throws Exception { + @ApiOperation(value = "测试支付", hidden = true) + @GetMapping("/tQ7lA2mG9f") + public CommonResult wxCash(@RequestParam("openid") String openid, @RequestParam("amount") Integer amount) throws Exception { // String openId = "oYkV86-mE9DakrcP5us474KscefQ"; BatchTransferModel batchTransferModel = new BatchTransferModel() .setAppid(wxPayV3Properties.getAppId()) .setOut_batch_no(PayKit.generateStr()) .setBatch_name("测试商户转账到零钱") .setBatch_remark("测试商户转账到零钱") - .setTotal_amount(1) + .setTotal_amount(amount) .setTotal_num(1) .setTransfer_detail_list(Collections.singletonList( new TransferDetailInput() .setOut_detail_no(PayKit.generateStr()) - .setTransfer_amount(1) + .setTransfer_amount(amount) .setTransfer_remark("测试商户转账到零钱") .setOpenid(openid))); @@ -125,12 +125,6 @@ public class TestController { JSONUtil.toJsonStr(batchTransferModel) ); log.info("发起商家转账响应 {}", response); -// 根据证书序列号查询对应的证书来验证签名结果 -// boolean verifySignature = WxPayKit.verifySignature(response, wxPayV3Properties.getPlatformCertPath()); -// log.info("verifySignature: {}", verifySignature); -// if (response.getStatus() == OK && verifySignature) { -// return response.getBody(); -// } if (response.getStatus() != 200) { log.warn("提现失败: {}", response.getBody()); throw new BizIllegalException("提现失败");