| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import cn.com.jit.mof.bean.MOFVerifyResult; |
| | | import cn.com.jit.new_vstk.Bean.SignResult; |
| | | import cn.com.jit.new_vstk.Bean.VerifyResult; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.pay.dto.rep.CoalPayRepDto; |
| | |
| | | import com.gkhy.exam.pay.mapper.CoalPayMapper; |
| | | import com.gkhy.exam.pay.service.CoalPayService; |
| | | import com.gkhy.exam.pay.service.CoalPayStudentService; |
| | | import com.gkhy.exam.pay.utils.PayUtils; |
| | | import com.gkhy.exam.pay.utils.ResultVo; |
| | | import com.gkhy.exam.pay.utils.Sign; |
| | | import com.gkhy.exam.pay.utils.SignDto; |
| | | import com.gkhy.exam.pay.utils.*; |
| | | import com.ruoyi.common.constant.ResultConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVo topay() throws IOException { |
| | | public ResultVo topay() throws IOException, BillSignException { |
| | | PayReqData payReqData = new PayReqData(); |
| | | PayReqData.Feedata feedatas = new PayReqData.Feedata(); |
| | | |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | log.info("票据原文为:" + document.asXML()); |
| | | BillSign billSign = new BillSign(); |
| | | String s = billSign.readRefSignDto(document); |
| | | Element rootElement = document.getRootElement(); |
| | | SignResult sign = payUtils.sign(fileData); |
| | | VerifyResult verify = payUtils.verify(sign.getSignData(), fileData); |
| | | SignDto signDto = new SignDto(new Date(), verify.getSubjectdn(), verify.getSn(), verify.getIssure()); |
| | | SignResult sign = payUtils.sign(s); |
| | | MOFVerifyResult verify = payUtils.verify(sign.getSignData(), s); |
| | | SignDto signDto = new SignDto(verify.getSignTime(), new String(Base64.getEncoder().encode(sign.getSignData())), verify.getIssure(), verify.getSn()); |
| | | log.info("拼接对象为:" + JSONObject.toJSONString(signDto)); |
| | | Sign sign1 = new Sign(); |
| | | Document signature = sign1.getSignature(signDto); |