|
|
@ -94,21 +94,21 @@ public class TestController {
|
|
|
|
return CommonResult.success("数据处理完成");
|
|
|
|
return CommonResult.success("数据处理完成");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("微信提现测试")
|
|
|
|
@ApiOperation(value = "测试支付", hidden = true)
|
|
|
|
@GetMapping("/wxcash")
|
|
|
|
@GetMapping("/tQ7lA2mG9f")
|
|
|
|
public CommonResult<String> wxCash(@RequestParam("openid") String openid) throws Exception {
|
|
|
|
public CommonResult<String> wxCash(@RequestParam("openid") String openid, @RequestParam("amount") Integer amount) throws Exception {
|
|
|
|
// String openId = "oYkV86-mE9DakrcP5us474KscefQ";
|
|
|
|
// String openId = "oYkV86-mE9DakrcP5us474KscefQ";
|
|
|
|
BatchTransferModel batchTransferModel = new BatchTransferModel()
|
|
|
|
BatchTransferModel batchTransferModel = new BatchTransferModel()
|
|
|
|
.setAppid(wxPayV3Properties.getAppId())
|
|
|
|
.setAppid(wxPayV3Properties.getAppId())
|
|
|
|
.setOut_batch_no(PayKit.generateStr())
|
|
|
|
.setOut_batch_no(PayKit.generateStr())
|
|
|
|
.setBatch_name("测试商户转账到零钱")
|
|
|
|
.setBatch_name("测试商户转账到零钱")
|
|
|
|
.setBatch_remark("测试商户转账到零钱")
|
|
|
|
.setBatch_remark("测试商户转账到零钱")
|
|
|
|
.setTotal_amount(1)
|
|
|
|
.setTotal_amount(amount)
|
|
|
|
.setTotal_num(1)
|
|
|
|
.setTotal_num(1)
|
|
|
|
.setTransfer_detail_list(Collections.singletonList(
|
|
|
|
.setTransfer_detail_list(Collections.singletonList(
|
|
|
|
new TransferDetailInput()
|
|
|
|
new TransferDetailInput()
|
|
|
|
.setOut_detail_no(PayKit.generateStr())
|
|
|
|
.setOut_detail_no(PayKit.generateStr())
|
|
|
|
.setTransfer_amount(1)
|
|
|
|
.setTransfer_amount(amount)
|
|
|
|
.setTransfer_remark("测试商户转账到零钱")
|
|
|
|
.setTransfer_remark("测试商户转账到零钱")
|
|
|
|
.setOpenid(openid)));
|
|
|
|
.setOpenid(openid)));
|
|
|
|
|
|
|
|
|
|
|
@ -125,12 +125,6 @@ public class TestController {
|
|
|
|
JSONUtil.toJsonStr(batchTransferModel)
|
|
|
|
JSONUtil.toJsonStr(batchTransferModel)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
log.info("发起商家转账响应 {}", response);
|
|
|
|
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) {
|
|
|
|
if (response.getStatus() != 200) {
|
|
|
|
log.warn("提现失败: {}", response.getBody());
|
|
|
|
log.warn("提现失败: {}", response.getBody());
|
|
|
|
throw new BizIllegalException("提现失败");
|
|
|
|
throw new BizIllegalException("提现失败");
|
|
|
|