| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.math.BigDecimal; |
| | | import java.net.*; |
| | |
| | | * 接收报文url |
| | | */ |
| | | // private static final String URL = "http://127.0.0.1:9080/directlink/httpAccess"; |
| | | // private static final String URL = "http://220.168.79.89:9080/directlink/httpAccess"; |
| | | private static final String URL = "http://747f9407.r3.cpolar.top/directlink/httpAccess"; |
| | | // private static final String URL = "http://1d6d-220-168-79-89.ngrok.io/directlink/httpAccess"; |
| | | private static final String URL = "http://n5z7ej.natappfree.cc/directlink/httpAccess"; |
| | | /** |
| | | * 签名ip |
| | | */ |
| | | // private static final String VERIFY_IP = "127.0.0.1"; |
| | | private static final String VERIFY_IP = "3b425db8.r10.cpolar.top"; |
| | | // private static final String VERIFY_IP = "747f9407.r3.cpolar.top"; |
| | | private static final String VERIFY_IP = "server.natappfree.cc"; |
| | | /** |
| | | * 付款账号 |
| | | */ |
| | |
| | | /** |
| | | * 签名端口 |
| | | */ |
| | | private static final int VERIFY_PORT = 8010; |
| | | private static final int VERIFY_PORT = 41933; |
| | | // private static final int VERIFY_PORT = 8010; |
| | | |
| | | /** |
| | | * cookies |
| | |
| | | try { |
| | | |
| | | InetAddress addr = InetAddress.getByName(VERIFY_IP); |
| | | String hostName = addr.getHostName(); |
| | | // Socket socket = new Socket(hostName, VERIFY_PORT); |
| | | String hostAddress = addr.getHostAddress(); |
| | | SocketAddress address = new InetSocketAddress(VERIFY_IP, 8010); |
| | | Socket socket = new Socket(addr, VERIFY_PORT); |
| | | |
| | | Proxy proxy = new Proxy(Proxy.Type.HTTP, address); |
| | | Socket socket = new Socket(proxy); |
| | | int port = socket.getPort(); |
| | | System.out.println("发送登录请求:"+addr); |
| | | System.out.println("发送登录请求:"+address); |
| | | System.out.println("发送登录请求:"+hostName); |
| | | System.out.println("发送登录请求:"+port); |
| | | System.out.println("发送登录请求:"+socket.getKeepAlive()); |
| | | // System.out.println("发送登录请求:"); |
| | | // test.executeServerHttpService("srv001_signOn"); |
| | | // System.out.println("\n发送转账结果查询请求:"); |
| | | // executeServerHttpService("srv008_transferResultInfoQuery","转账结果查询","2023032910585227466"); |
| | | // System.out.println("\n发送跨行转账请求:"); |
| | | // test.executeServerHttpService("srv007_singleOuterTransfer","跨行转账",null); |
| | | // System.out.println("\n发送行内转账请求:"); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private MallMemberWithdrawMapper mallMemberWithdrawMapper; |
| | | @Autowired |
| | | @Resource |
| | | private MallMemberWithdrawMsgMapper mallMemberWithdrawMsgMapper; |
| | | @Autowired |
| | | @Resource |
| | | private MallMemberBankMapper mallMemberBankMapper; |
| | | |
| | | @Override |
| | |
| | | try { |
| | | addr = InetAddress.getByName(VERIFY_IP); |
| | | socket = new Socket(addr, VERIFY_PORT); |
| | | // InetAddress localHost = addr.getLocalHost(); |
| | | // socket = new Socket(localHost, VERIFY_PORT); |
| | | // 发送 |
| | | BufferedWriter wr = new BufferedWriter(new OutputStreamWriter( |
| | | socket.getOutputStream(),"GBK")); |