@Test public void testGetPublicKey() throws Exception { this.logger.info(this.payService.getEntPayService().getPublicKey()); }
@Override public String getPublicKey() throws WxPayException { WxPayDefaultRequest request = new WxPayDefaultRequest(); request.setMchId(this.payService.getConfig().getMchId()); request.setNonceStr(String.valueOf(System.currentTimeMillis())); request.setSign(SignUtils.createSign(request, null, this.payService.getConfig().getMchKey(), true)); String url = "https: String responseContent = this.payService.post(url, request.toXML(), true); GetPublicKeyResult result = BaseWxPayResult.fromXML(responseContent, GetPublicKeyResult.class); result.checkResult(this.payService, request.getSignType(), true); return result.getPubKey(); }
EntPayServiceImpl implements EntPayService { @Override public String getPublicKey() throws WxPayException { WxPayDefaultRequest request = new WxPayDefaultRequest(); request.setMchId(this.payService.getConfig().getMchId()); request.setNonceStr(String.valueOf(System.currentTimeMillis())); request.setSign(SignUtils.createSign(request, null, this.payService.getConfig().getMchKey(), true)); String url = "https: String responseContent = this.payService.post(url, request.toXML(), true); GetPublicKeyResult result = BaseWxPayResult.fromXML(responseContent, GetPublicKeyResult.class); result.checkResult(this.payService, request.getSignType(), true); return result.getPubKey(); } }
EntPayServiceImpl implements EntPayService { @Override public String getPublicKey() throws WxPayException { WxPayDefaultRequest request = new WxPayDefaultRequest(); request.setMchId(this.payService.getConfig().getMchId()); request.setNonceStr(String.valueOf(System.currentTimeMillis())); request.setSign(SignUtils.createSign(request, null, this.payService.getConfig().getMchKey(), true)); String url = "https: String responseContent = this.payService.post(url, request.toXML(), true); GetPublicKeyResult result = BaseWxPayResult.fromXML(responseContent, GetPublicKeyResult.class); result.checkResult(this.payService, request.getSignType(), true); return result.getPubKey(); } EntPayServiceImpl(WxPayService payService); }
EntPayServiceImpl implements EntPayService { @Override public String getPublicKey() throws WxPayException { WxPayDefaultRequest request = new WxPayDefaultRequest(); request.setMchId(this.payService.getConfig().getMchId()); request.setNonceStr(String.valueOf(System.currentTimeMillis())); request.setSign(SignUtils.createSign(request, null, this.payService.getConfig().getMchKey(), true)); String url = "https: String responseContent = this.payService.post(url, request.toXML(), true); GetPublicKeyResult result = BaseWxPayResult.fromXML(responseContent, GetPublicKeyResult.class); result.checkResult(this.payService, request.getSignType(), true); return result.getPubKey(); } EntPayServiceImpl(WxPayService payService); @Override EntPayResult entPay(EntPayRequest request); @Override EntPayQueryResult queryEntPay(String partnerTradeNo); @Override String getPublicKey(); @Override EntPayBankResult payBank(EntPayBankRequest request); @Override EntPayBankQueryResult queryPayBank(String partnerTradeNo); static void main(String[] args); }
EntPayServiceImpl implements EntPayService { @Override public String getPublicKey() throws WxPayException { WxPayDefaultRequest request = new WxPayDefaultRequest(); request.setMchId(this.payService.getConfig().getMchId()); request.setNonceStr(String.valueOf(System.currentTimeMillis())); request.setSign(SignUtils.createSign(request, null, this.payService.getConfig().getMchKey(), true)); String url = "https: String responseContent = this.payService.post(url, request.toXML(), true); GetPublicKeyResult result = BaseWxPayResult.fromXML(responseContent, GetPublicKeyResult.class); result.checkResult(this.payService, request.getSignType(), true); return result.getPubKey(); } EntPayServiceImpl(WxPayService payService); @Override EntPayResult entPay(EntPayRequest request); @Override EntPayQueryResult queryEntPay(String partnerTradeNo); @Override String getPublicKey(); @Override EntPayBankResult payBank(EntPayBankRequest request); @Override EntPayBankQueryResult queryPayBank(String partnerTradeNo); static void main(String[] args);  }