| | |
| | | // 存储支付记录 |
| | | sysPayRecordService.saveData(orderNo, userId, sysOtherConfig.getAiPrice(), 1); |
| | | // 调用支付方法 |
| | | Map<String, Object> result = wxV3Pay.jsApi(orderNo, totalPrice, openId, weixinPayProperties.getV3().getNotifyPayUrl(),"AI检测报告支付"); |
| | | Map<String, Object> result = wxV3Pay.jsApi(orderNo, totalPrice, openId,"AI检测报告支付"); |
| | | log.info("支付参数:{}", result); |
| | | return R.ok(result); |
| | | } |
| | |
| | | * @author xiaochen |
| | | * @date 2022-03-22 12:47 |
| | | */ |
| | | public Map<String, Object> jsApi(String tradeNo, Integer amount, String openid, String notify_url, String description) { |
| | | public Map<String, Object> jsApi(String tradeNo, Integer amount, String openid, String description) { |
| | | WxPaymentInfoModel requestBody = WxPaymentInfoModel.builder() |
| | | .mchid(this.config.getMchId()) |
| | | .appid(this.config.getAppId()) |
| | | .description(description) |
| | | .out_trade_no(tradeNo) |
| | | .notify_url(notify_url) |
| | | // .attach("") |
| | | .amount(WxPaymentInfoModel.Amount.builder().total(amount).build()) |
| | | .payer(WxPaymentInfoModel.Payer.builder().openid(openid).build()) |