@Test public void testPayBank() throws Exception { EntPayBankResult result = this.payService.getEntPayService().payBank(EntPayBankRequest.builder() .bankCode("aa") .amount(1) .encBankNo("1") .encTrueName("2") .partnerTradeNo("3") .description("11") .build()); this.logger.info(result.toString()); }
@Override public EntPayBankResult payBank(EntPayBankRequest request) throws WxPayException { File publicKeyFile = this.buildPublicKeyFile(); request.setEncBankNo(this.encryptRSA(publicKeyFile, request.getEncBankNo())); request.setEncTrueName(this.encryptRSA(publicKeyFile, request.getEncTrueName())); publicKeyFile.deleteOnExit(); request.checkAndSign(this.payService.getConfig()); String url = this.payService.getPayBaseUrl() + "/mmpaysptrans/pay_bank"; String responseContent = this.payService.post(url, request.toXML(), true); EntPayBankResult result = BaseWxPayResult.fromXML(responseContent, EntPayBankResult.class); result.checkResult(this.payService, request.getSignType(), true); return result; }
EntPayServiceImpl implements EntPayService { @Override public EntPayBankResult payBank(EntPayBankRequest request) throws WxPayException { File publicKeyFile = this.buildPublicKeyFile(); request.setEncBankNo(this.encryptRSA(publicKeyFile, request.getEncBankNo())); request.setEncTrueName(this.encryptRSA(publicKeyFile, request.getEncTrueName())); publicKeyFile.deleteOnExit(); request.checkAndSign(this.payService.getConfig()); String url = this.payService.getPayBaseUrl() + "/mmpaysptrans/pay_bank"; String responseContent = this.payService.post(url, request.toXML(), true); EntPayBankResult result = BaseWxPayResult.fromXML(responseContent, EntPayBankResult.class); result.checkResult(this.payService, request.getSignType(), true); return result; } }
EntPayServiceImpl implements EntPayService { @Override public EntPayBankResult payBank(EntPayBankRequest request) throws WxPayException { File publicKeyFile = this.buildPublicKeyFile(); request.setEncBankNo(this.encryptRSA(publicKeyFile, request.getEncBankNo())); request.setEncTrueName(this.encryptRSA(publicKeyFile, request.getEncTrueName())); publicKeyFile.deleteOnExit(); request.checkAndSign(this.payService.getConfig()); String url = this.payService.getPayBaseUrl() + "/mmpaysptrans/pay_bank"; String responseContent = this.payService.post(url, request.toXML(), true); EntPayBankResult result = BaseWxPayResult.fromXML(responseContent, EntPayBankResult.class); result.checkResult(this.payService, request.getSignType(), true); return result; } EntPayServiceImpl(WxPayService payService); }
EntPayServiceImpl implements EntPayService { @Override public EntPayBankResult payBank(EntPayBankRequest request) throws WxPayException { File publicKeyFile = this.buildPublicKeyFile(); request.setEncBankNo(this.encryptRSA(publicKeyFile, request.getEncBankNo())); request.setEncTrueName(this.encryptRSA(publicKeyFile, request.getEncTrueName())); publicKeyFile.deleteOnExit(); request.checkAndSign(this.payService.getConfig()); String url = this.payService.getPayBaseUrl() + "/mmpaysptrans/pay_bank"; String responseContent = this.payService.post(url, request.toXML(), true); EntPayBankResult result = BaseWxPayResult.fromXML(responseContent, EntPayBankResult.class); result.checkResult(this.payService, request.getSignType(), true); return result; } 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 EntPayBankResult payBank(EntPayBankRequest request) throws WxPayException { File publicKeyFile = this.buildPublicKeyFile(); request.setEncBankNo(this.encryptRSA(publicKeyFile, request.getEncBankNo())); request.setEncTrueName(this.encryptRSA(publicKeyFile, request.getEncTrueName())); publicKeyFile.deleteOnExit(); request.checkAndSign(this.payService.getConfig()); String url = this.payService.getPayBaseUrl() + "/mmpaysptrans/pay_bank"; String responseContent = this.payService.post(url, request.toXML(), true); EntPayBankResult result = BaseWxPayResult.fromXML(responseContent, EntPayBankResult.class); result.checkResult(this.payService, request.getSignType(), true); return result; } 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);  }