package com.mind.pay.abc.ap;
import com.mind.common.constant.AbcApConstant;
import com.mind.common.utils.DateFromtUtils;
import java.net.Socket;
import java.util.Date;
/**
* Demo class
*
* @author jieYW
* @date 2018/5/29
*/
public class Test {
public static void main(String[] args) throws Exception{
ApXmlBuilder builder = new ApXmlBuilder();
//String s = "<ap><CCTransCode>CQRA06</CCTransCode><ProductID>ICC</ProductID><ChannelType>ERP</ChannelType><CorpNo></CorpNo><OpNo></OpNo><AuthNo></AuthNo><ReqSeqNo>605311032550611</ReqSeqNo><ReqDate>20160531</ReqDate><ReqTime>102757</ReqTime><Sign></Sign><Amt>2800.00</Amt><Cmp><DbProv>05</DbProv><DbAccNo>381101040000460</DbAccNo><DbLogAccNo></DbLogAccNo><DbCur>01</DbCur><CrProv>05</CrProv><CrAccNo>6228483078008989579</CrAccNo><CrLogAccNo></CrLogAccNo><CrCur>01</CrCur><ConFlag>1</ConFlag></Cmp><Corp><PsFlag></PsFlag><BookingFlag>0</BookingFlag><BookingDate></BookingDate><BookingTime></BookingTime><UrgencyFlag>0</UrgencyFlag><OthBankFlag>0</OthBankFlag><CrBankType></CrBankType><CrAccName>赵尚文</CrAccName><CrBankName>农业银行鄂尔多斯分行东煤支行营业室</CrBankName><CrBankNo></CrBankNo><DbAccName>内蒙古汇能集团尔林兔煤炭有限公司</DbAccName></Corp></ap>";
//1.查询账户余额
/* ApRoot apRoot = new ApRoot();
apRoot.setCCTransCode("CQRA06");
builder.setRoot(apRoot);
ApCmp apCmp = new ApCmp();
apCmp.setDbAccNo("381101040000460");
apCmp.setDbCur("01");
apCmp.setDbProv("05");
builder.setCmp(apCmp);*/
//2.实时待付
/* ApRoot apRoot = new ApRoot();
apRoot.setCCTransCode("CFRTD1");
apRoot.setAmt("10.00");
builder.setRoot(apRoot);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("361101040010679");
cmp.setDbProv("05");
cmp.setDbCur("01");
cmp.setCrAccNo("381101040000460");
cmp.setCrCur("01");
cmp.setCrProv("05");
cmp.setConFlag("1");
cmp.setCheckNameFlag("1");
builder.setCmp(cmp);
ApCorp corp = new ApCorp();
corp.setPayInt("1");
corp.setAgtDbInd("0");
corp.setNVoucherType("029999");
corp.setCshDraFlag("0")
//corp.setCustomNo("213131313213");
builder.setCorp(corp);;*/
//3.查询代收代付交易结果
/* ApRoot apRoot = new ApRoot();
apRoot.setCCTransCode("CQRT04");
builder.setRoot(apRoot);
ApCmp cmp = new ApCmp();
cmp.setDbProv("05");
cmp.setDbCur("01");
cmp.setDbAccNo("361101040010679");
cmp.setCmeSeqNo("20180601095656511063");
builder.setCmp(cmp);*/
//4.实时代收
/* ApRoot root = new ApRoot();
root.setCCTransCode("CFRTD2");
root.setAmt("10.22");
builder.setRoot(root);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("381101040000460");
cmp.setDbCur("01");
cmp.setDbProv("05");
cmp.setCrProv("11");
cmp.setCrAccNo("6228480018880729571");
cmp.setCrCur("01");
cmp.setCheckNameFlag("1");
cmp.setConFlag("1");
builder.setCmp(cmp);
ApCorp corp = new ApCorp();
corp.setPayInt("1");
corp.setAgtDbInd("0");
corp.setNVoucherType("019999");
corp.setCshDraFlag("0");
builder.setCorp(corp);*/
//5.汇兑-单笔对私
ApRoot root = new ApRoot();
root.setCCTransCode("CFRT21");
root.setAmt("9.10");
builder.setRoot(root);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("361101040010679");
cmp.setDbProv("05");
cmp.setDbCur("01");
cmp.setDbLogAccNo("");
cmp.setCrAccNo("6228453296002816764");
cmp.setCrProv("");
cmp.setCrCur("01");
cmp.setCrLogAccNo("");
cmp.setConFlag("1");
builder.setCmp(cmp);
ApCorp corp = new ApCorp();
corp.setPsFlag("");
corp.setBookingFlag("0");
corp.setBookingDate("");
corp.setBookingTime("");
corp.setUrgencyFlag("0");
corp.setOthBankFlag("0");
corp.setCrAccName("郑春广");
corp.setDbAccName("内猛关仪太彩悟佑慊古丝");
corp.setWhyUse("测试");
corp.setPostscript("测试");
builder.setCorp(corp);
//6.单笔对公
/*ApRoot root = new ApRoot();
root.setCCTransCode("CFRT02");
root.setAmt("50002.00");
builder.setRoot(root);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("361101040010679");
cmp.setDbProv("05");
cmp.setDbCur("01");
cmp.setDbLogAccNo("");
cmp.setCrAccNo("381101040000460");
cmp.setCrProv("99");
cmp.setCrCur("01");
cmp.setCrLogAccNo("");
cmp.setConFlag("1");
builder.setCmp(cmp);
ApCorp corp = new ApCorp();
corp.setPsFlag("");
corp.setBookingFlag("0");
corp.setBookingDate("");
corp.setBookingTime("");
corp.setUrgencyFlag("0");
corp.setOthBankFlag("0");
corp.setCrAccName("内猛关曼书酸薨及娃蹬笔佑慊古丝");
corp.setCrBankNo("103100000026");
corp.setCrBankType("103");
corp.setCrBankName("中国农业银行资金清算中心");
corp.setDbAccName("内猛关仪太彩悟佑慊古丝");
corp.setWhyUse("测试");
corp.setPostscript("测试");
builder.setCorp(corp);*/
//7.查询落地处理情况
/* ApRoot root = new ApRoot();
root.setCCTransCode("CQRA61");
builder.setRoot(root);
ApCorp corp = new ApCorp();
corp.setBookingDate("20180601095656511063");
builder.setCorp(corp);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("361101040010679");
cmp.setDbCur(AbcApConstant.AP_CUR_RMB);
cmp.setDbProv("05");
builder.setCmp(cmp);*/
//8.查询联行行号
/* ApRoot root = new ApRoot();
root.setCCTransCode(AbcApConstant.AP_TRANS_CODE_QUERY_BANKNO);
builder.setRoot(root);
ApCorp corp = new ApCorp();
corp.setCrBankName("锡林浩特");
corp.setCrBankType("402");
builder.setCorp(corp);*/
//9.7.74校验卡号、户名一致性 (CQRA22交易)
/* ApRoot root = new ApRoot();
root.setCCTransCode("CQRA22");
root.setAmt("11.01");
builder.setRoot(root);
ApCmp cmp = new ApCmp();
cmp.setDbAccNo("361101040010679");
builder.setCmp(cmp);
ApCorp corp = new ApCorp();
corp.setDbAccName("内猛关仪太彩悟佑慊古丝");
builder.setCorp(corp);*/
String s = builder.toXmlString(builder);
ApHttpRequest request = new ApHttpRequest();
String s1 = request.socketSendAndReceive("192.168.1.111", 15999, builder.genRequestData(s));
System.out.println("接受数据:" + s1);
}
}
echool丶
- 粉丝: 72
- 资源: 1
最新资源
- 国际象棋检测11-YOLO(v7至v9)、COCO、Darknet、Paligemma、VOC数据集合集.rar
- 使用Python和matplotlib库绘制爱心图形的技术教程
- Java外卖项目(瑞吉外卖项目的扩展)
- 必应图片壁纸Python爬虫代码bing-img.zip
- 基于Pygame库实现新年烟花效果的Python代码
- 浪漫节日代码 - 爱心代码、圣诞树代码
- 睡眠健康与生活方式数据集,睡眠和生活习惯关联分析()
- 2024~2025(1)Oracle数据库技术A卷-22软单、软嵌.doc
- 国际象棋检测10-YOLO(v5至v9)、COCO、CreateML、Paligemma数据集合集.rar
- 100个情侣头像,唯美手绘情侣头像
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
前往页