⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macro_def.h

📁 在SCO UNIX制定界面程序 可根据文件配制菜单,而不必修改源程序,非常方便
💻 H
字号:
/*=============================================================
功能: 		部份宏定义	
作者:
最后修改日期:	2001/3/20
最后修改者:	王永忠

周国祥:	2001/04/13 added "CARD_NO_LEN", "BANKID_LEN", "HOSTID_LEN"等
	2001/04/17 added SAF_XXXXX, ADV_XXXX for Store_And_Forward
	2001/06/06 added M_system, M_comp, M_tele定义系统名、
			公司名、电话,以便减少变动时源码的修改量

===============================================================*/
#ifndef _MACRO_DEF_H_
#define _MACRO_DEF_H_

/******** 位原宏定义 **********/
#ifdef wyz_mod_010801
#define MSG_ID		0
#define BIT_MAP 	1
#define PAN		2
#define PROC_CODE	3
#define AMOUNT		4
#define TRACE		11
#define LOCAL_TIME	12   /* differen 87,93  :  ( 6,2,0),(12,2,0) */
#define LOCAL_DATE	13
#define EXPIRY		14
#define TR_ID		18
#define MODE		22   /* differen 87,93  :  ( 3,2,0),(12,0,0) */
#define NET_ID		24
#define SERVER_CODE	25   /* differen 87,93  :  ( 2,2,0),( 4,2,0) */
#define SETTLE_DATE	28   /* differen 87,93  :  ( 8,3,0),( 6,2,0) */
#define SD_BANKID	32
#define SRC_BANKID	33
#define TRACK_2 	35
#define TRACK_3 	36
#define RETR_NUM	37
#define AUTH_ID 	38
#define RET_CODE	39   /* differen 87,93  :  ( 2,0,0),( 3,2,0) */
#define POS_ID		41
#define CUSTOM_ID	42
#define	MERCHANT_NAME 	43   /* differen 87,93  :  (40,0,0),(99,0,1) */
#define ADDI_RESPONSE	44   /* differen 87,93  :  (25,0,0),(99,0,1) */
#define CARDNO2 	48
#define CUR_TRAN	49
#define CUR_SETT	50
#define FUNDTYPE	51
#define PIN_DATA	52
#define EXT_DATA	53   /* differen 87,93  :  (16,2,0),(48,8,0) */
#define ADDI_AMOUNT	54
#define CURRENCY_TYPE	54
#define OPERATOR	60
#define ORI_AMOUNT	60
#define PEOPLE_ID	61
#define CARD_TYPE	61
#define INVOICE		62
#define SETTLEMENT	63
#define PERSON_ID	63
#define MAC1		64
#define LOGIC_DATE	73   /* 逻缉工作日 */
#define CREDIT_NUM	74
#define REV_CREDIT_NUM	75
#define DEBIT_NUM	76
#define REV_DEBIT_NUM	77
#define TRANS_NUM	78
#define REV_TRANS_NUM	79
#define AUTH_NUM	81
#define CREDIT_AMT	86
#define REV_CREDIT_AMT	87
#define DEBIT_AMT	88
#define REV_DEBIT_AMT	89 
#define FK_BANKID	93   /* differen 87,93  :  ( 5,0,0),(11,2,1) */
#define SETTLE_AMT	97
#define TGT_BANKID	100
#define CARD_NO2	103
#define MAC_KEY_INDEX	110
#define RET_BANK	121
#define RET_DATA	122
#define NEW_PIN		123
#define MAC		128
#else
#define MSG_ID		0
#define BIT_MAP 	1
#define PAN		2
#define PROC_CODE	3
#define AMOUNT		4
#ifndef wyz_add_010802
#define	TRAN_SYS_TM	7
#endif
#define TRACE		11
#define LOCAL_TIME	12   /* differen 87,93  :  ( 6,2,0),(12,2,0) */
#define LOCAL_DATE	13
#define EXPIRY		14
#define TR_ID		18
#define MODE		22   /* differen 87,93  :  ( 3,2,0),(12,0,0) */
#define NET_ID		24
#define SERVER_CODE	25   /* differen 87,93  :  ( 2,2,0),( 4,2,0) */
#define SETTLE_DATE	28   /* differen 87,93  :  ( 8,3,0),( 6,2,0) */
#define SD_BANKID	32
#define SRC_BANKID	33
#define TRACK_2 	35
#define TRACK_3 	36
#define RETR_NUM	37
#define AUTH_ID 	38
#define RET_CODE	39   /* differen 87,93  :  ( 2,0,0),( 3,2,0) */
#define POS_ID		41
#define CUSTOM_ID	42
#define	MERCHANT_NAME 	43   /* differen 87,93  :  (40,0,0),(99,0,1) */
#define ADDI_RESPONSE	44   /* differen 87,93  :  (25,0,0),(99,0,1) */
#define CARDNO2 	48
#define CUR_TRAN	49
#define CUR_SETT	50
#define FUNDTYPE	51
#define PIN_DATA	52
#define EXT_DATA	53   /* differen 87,93  :  (16,2,0),(48,8,0) */
#define ADDI_AMOUNT	54
#define CURRENCY_TYPE	54
#define OPERATOR	60
#define ORI_AMOUNT	60
#define PEOPLE_ID	61
#define CARD_TYPE	61
#define INVOICE		62
#define SETTLEMENT	63
#define PERSON_ID	63
#define MAC1		64
#define LOGIC_DATE	73   /* 逻缉工作日 */
#define CREDIT_NUM	74
#define REV_CREDIT_NUM	75
#define DEBIT_NUM	76
#define REV_DEBIT_NUM	77
#define TRANS_NUM	78
#define REV_TRANS_NUM	79
#define AUTH_NUM	81
#define CREDIT_AMT	86
#define REV_CREDIT_AMT	87
#define DEBIT_AMT	88
#define REV_DEBIT_AMT	89 
#define FK_BANKID	93   /* differen 87,93  :  ( 5,0,0),(11,2,1) */
#define SETTLE_AMT	97
#define TGT_BANKID	100
#define CARD_NO2	103
#ifndef wyz_add_010814
#define	RET_HOST	124
#endif
#define MAC_KEY_INDEX	110
#define RET_BANK	127
#define MAC		128
#endif

/****************  交易类型定义  ***************/
#define PURCHASE	1	/* 消    费 */
#define AUTH_PUR	2	/* 授权消费 */
#define WITHDRAWAL	3	/* 取    现 */
#define PRE_AUTH	4	/* 预 授 权 */
#define CONFIRM 	5	/* 确    认 */
#define TRANS_OUT	6	/* 转    出 */
#define DEPOSIT 	7	/* 存    款 */
#define	ADJUST		8	/* 帐务调整 */
#define REFUND		9	/* 退    货 */
#define TRANS_IN	10	/* 转    入 */
#define POS_VOID	12	/* 撤    消 */
#define OFFLINE		13	/* 离线交易 */
#define TRANS_DUP	14	/* 双向转账 */

#define INQUERY 	20	/* 查询余额 */
#define	MUL_QUY		21	/* 多笔查询 */
#define CHECK_WB	22	/* 查 止 付 */
#define CHG_PWD		23	/* 改 卡 密 */
#define	ISS_CARD	24	/* 领卡交易 */
#define	DISUSE_CARD	25	/* 销卡交易 */ 
#define	EXPIRE		26	/* 挂失交易 */
#define	OPEN_ACC	27	/* 开户 */
#define	DISUSE_ACC	28	/* 销户 */
#define DOWNLOAD	31	/* 下装参数 jxy 2001/07/12*/

#define TEST_TRAN	40	/* 测试交易 */
#define REVERSAL	41	/* 冲    正 */
#define	ACQ_ADVICE	42	/* 收单行通知 */
#define	ACQ_REV_ADVICE	43	/* 收单行冲正交易通知 */
#define	ISS_ADVICE	44	/* 发卡行通知 */
#define	ISS_REV_ADVICE	45	/* 发卡行冲正交易通知 */

#define POS_LOGIN	60	/* EDC 签到 */
#define	POS_SETTLE	61	/* POS 对帐 */
#define POS_SETTLE_2	62	/* POS二次结算 */
#define POS_BATCH_UP	63	/* POS批 上 送 */
#define POS_LOGOUT	64	/* EDC 签退 */

#define NET_LOGIN	80	/* 网络签到 */
#define NET_LOGOUT	81	/* 网络签退 */
#define NET_CHGKEY	82	/* 网间密钥交换*/
#define CUT_START	83	/* 日终切换开始 */
#define CUT_END		84	/* 日终切换结束 */
#define	HOST_LOGIN	85	/* HOST签到 */
#define	HOST_LOGOUT	86	/* HOST签退 */
#define HOST_BATCH_UP	87	/* HOST批 上 送 */
#define	NET_SETTLE	88	/* 网间对帐 */
#define	HOST_SETTLE	89	/* 主机对帐 */
#define MAX_TRANS	89	/* 最大的交易类型, 用于表明交易类型的结束 */

#ifdef wyz_mod_0429
#define PURCHASE	0x01	/* 消    费 */
#define AUTH_PUR	0x02	/* 授权消费 */
#define WITHDRAWAL	0x04	/* 取    现 */
#define PRE_AUTH	0x08	/* 预 授 权 */
#define CONFIRM 	0x10	/* 确    认 */
#define TRANS_OUT	0x20	/* 转    出 */
#define DEPOSIT 	0x40	/* 存    款 */
#define	ADJUST		0x80	/* 帐务调整 */
#define REFUND		0x100	/* 退    货 */
#define TRANS_IN	0x200	/* 转    入 */
#define POS_VOID	0x400	/* 撤    消 */
#define OFFLINE		0x800	/* 离线交易 */
#define TRANS_DUP	0x1000	/* 双向转账 */

#define INQUERY 	0x2000	/* 查询余额 */
#define	MUL_QUY		0x4000	/* 多笔查询 */
#define CHECK_WB	0x8000	/* 查 止 付 */
#define CHG_PWD		0x10000	/* 改 卡 密 */
#define	ISS_CARD	0x20000	/* 领卡交易 */
#define	DISUSE_CARD	0x40000	/* 销卡交易 */ 
#define	EXPIRE		0x80000	/* 挂失交易 */
#define	OPEN_ACC	0x100000	/* 开户 */
#define	DISUSE_ACC	0x200000	/* 销户 */

#define TEST_TRAN	0x400000	/* 测试交易 */
#define REVERSAL	0x800000	/* 冲    正 */
#define	ACQ_ADVICE	0x1000000	/* 收单行通知 */
#define	ACQ_REV_ADVICE	0x2000000	/* 收单行冲正交易通知 */
#define	ISS_ADVICE	0x4000000	/* 发卡行通知 */
#define	ISS_REV_ADVICE	0x8000000	/* 发卡行冲正交易通知 */

#define POS_LOGIN	0x10000000	/* EDC 签到 */
#define	POS_SETTLE	0x20000000	/* POS 对帐 */
#define POS_SETTLE_2	0x40000000	/* POS二次结算 */
#define POS_BATCH_UP	0x80000000	/* POS批 上 送 */
#define POS_LOGOUT	0x100000000	/* EDC 签退 */

#define NET_LOGIN	0x200000000	/* 网络签到 */
#define NET_LOGOUT	0x400000000	/* 网络签退 */
#define NET_CHGKEY	0x800000000	/* 网间密钥交换*/
#define CUT_START	0x1000000000	/* 日终切换开始 */
#define CUT_END		0x2000000000	/* 日终切换结束 */
#define	HOST_LOGIN	0x4000000000	/* HOST签到 */
#define	HOST_LOGOUT	0x8000000000	/* HOST签退 */
#define HOST_BATCH_UP	0x10000000000	/* HOST批 上 送 */
#define	NET_SETTLE	0x20000000000	/* 网间对帐 */
#define	HOST_SETTLE	0x40000000000	/* 主机对帐 */
#endif
/************ ISO8583 响应码定义 *********************/
#define	SUCCESS			"00"		//交易成功
#define	CHK_CARD_ISSUER		"01"		//查发卡方  
#define	INVALID_MERCHANT	"03"		//非法商户
#define	HMD_CARD		"04"		//止付卡 
#define	DISHONOR		"05"		//不承兑  
#define	CALLBANK		"09"		//CALLBANK 
#define	INVALID_PACK		"10"		//数据包错  
#define	INVALID_TRANS		"12"		//非法交易  
#define	INVALID_AMOUNT		"13"		//无效金额  
#define	INVALID_CARD_NO		"14"		//无此卡号
#define	NO_SUCH_ISSUER		"15"		//他行卡
#define	RE_ENTER_TRANS		"19"		//交易重传
#define	UNACCEPT_AMOUNT		"23"		//非法金额
#define	LAWLESS_RECORD		"25"		//非法记录
#define	FORMAT_ERR		"30"		//格式错误无此交易记录"  
#define	BANK_NOT_CONNECT	"31"		//尚未联网
#define	SEIZURE_EXPIRED_CARD	"33"		//没收过期卡
#define	SEIZURE_FORGE_CARD	"34"		//没收伪造卡
#define	LIMIT_CARD		"36"		//受限制卡
#define	TRANS_NOT_SUPPORT	"40"		//交易受限
#define	LOST_CARD		"41"		//丢失卡
#define	STOLEN_CARD		"43"		//被盗窃卡
#define	NO_MONEY		"51"		//余额不足
#define	NO_ACCOUNT		"53"		//无帐户
#define	EXPIRED_CARD		"54"		//过期卡
#define	PIN_ERR			"55"		//PIN错误
#define	BANK_NOT_SUPPORT	"56"		//未联网行
#define	TRANS_NOT_PERMIT	"57"		//受限交易
#define	INVALID_TRAN		"58"		//无效交易
#define	OVER_TRANS_AMOUNT	"61"		//交易超额
#define	OVERDRAFT		"63"		//透支止付
#define	OVER_TRANS_TIMES	"64"		//交易超次
#define	TIME_OUT		"68"		//处理超时
#define	OVER_ENTER_PIN_TIMES	"75"		//密码超次
#define	PROD_CODE_ERR		"76"		//产品码错
#define	TRACE_NO_ERR		"78"		//流水号错
#define	ACCOUNT_TIMEOUT		"79"		//帐务超时
#define	MAC_ERR			"80"		//MAC错误
#define	NET_MAC_ERR		"81"		//网络MAC错误
#define	BATCH_NO_ERR		"83"		//批次号错
#define ONLY_LOCAL		"84"		//限本地卡
#define ONLY_REMOTE		"85"		//限异地卡
#define	CHECKSUM_ERR		"86"		//核对有误
#define	KEY_DIFFER		"87"		//密钥不一致
#define	NET_FAIL		"88"		//网络错
#define	POS_NO_ERR		"89"		//POS号错
#define	SYS_PAUSE		"90"		//系统崭停
#define	COMM_ERR		"91"		//网络故障
#define	ROUTER_ERR		"92"		//路由错
#define	DUPLICATE_TRANS		"94"		//交易重复
#define	SETTLE_ERR		"95"		//对帐不平
#define	SYS_FAIL		"96"		//系统出错
#define	SWAP_KEY_ERR		"97"		//换密钥错
#define	KEY_ERR			"98"		//密钥错
#define	NOT_SUPPORT_CODE	"**"		//系统不支持的响应码

/************** 银行类型编码定义 ************************/
//用于public结构中银行类型(bank_type)
#define	POBC_BANK		"01"			//人民银行
#define ACBC_BANK		"02"			//工商银行
#define ABOC_BANK		"03"			//农业银行
#define BOC_BANK		"04"			//中国银行
#define CCB_BANK		"05"			//建设银行
#define CB_BANK 		"06"			//交通银行
#define FOREIGN_BANK	"50"		//国外银行

#ifdef zgx010413_modiied_added
#define BOC_CENTER		"0004"			//中行总行的行号
#else
#define BOC_CENTER		"0004"			//中行总行的行号
/*
 * 定义总行行号
 */
#define BOC_CENTER4		BOC_CENTER		//中行总行的行号
#define BOC_CENTER9		"0009"

#define CARD_NO_LEN		19	/* 卡号最大长度 */
#define	BANKID_LEN		11	/* 联行行号最大长度 */
#define	HOSTID_LEN		2	/* 主机号最大长度 */

#endif	/* zgx010413_add */

/************** 卡类型编码定义 **************************/
//用于public结构中卡类型(card_type)
#define CREDIT_CARD			"01"		//信用卡
#define	DEBIT_CARD			"02"		//借记卡
#define	UNION_CARD			"03"		//中行银联卡
#define	FOREIGN_CARD			"50"		//外卡起始
#define	VISA_CARD			"51"		//VISA 卡
#define MC_CARD				"52"		//万事达卡
#define AE_CARD				"53"		//运通卡
#define DINER_CARD			"54"		//大莱卡
#define JCB_CARD			"55"		//jcb卡
#define	FOREIGN_CARD_MAX		"56"		//外卡结束

#define	MAX_HOSTLS	999999	//用于确定最大流水号

#ifndef zgx010417_added
/* saf_ls表中adv_flag */
#define	ADV_NONE	'0'	/* 非通知交易	*/
#define	ADV_NEED	'1'	/* 需通知交易	*/
#define	ADV_OK		'2'	/* 已通知	*/
/* saf_ls表中saf_flag */
#define	SAF_REQUEST	'R'	/* 请求转发	*/
#define	SAF_FORWARD	'P'	/* 转发处理	*/
#define	SAF_STORE	'B'	/* 存储处理	*/
#define	SAF_FINISH	'C'	/* 转发完毕	*/
#define	SAF_FORCE	'D'	/* 强制转发完毕	*/

/* 先从etc/sysparam.tab中读配置, 若未配置则使用如下缺省 */
#define	M_system	"中国银行新一代 BTS"
#define	M_comp		"北京亚大通讯网络有限责任公司"
#define	M_tele		"(010)84990188"
#define	M_filehead	"中国银行 BTS 系统"
extern char	G_system[128], G_comp[128], G_tele[128], GV_filehead[128];

#endif	//zgx010417_added

#if 0
#ifdef VOID
#undef VOID
#define VOID	POS_VOID
#else
#define VOID	POS_VOID
#endif  /*redefine VOID to POS_VOID*/
#endif

#define	TRACK2_LEN		37
#define	TRACK3_LEN		104

#define	RCVNAS_LISTEN_PORT	8999	//rcvnas侦听端口
#define	TONAS_PORTS		9000	//设置tonas进程侦听端口起始
#define TONAS_TIMEOUT		30	//网间通信超时时间
#endif		//End of #ifndef _MACRO_DEF_H_

/*================== WuBin 2001-8-28 22:09 ======Start==============*/
#define ISS_INCOME		0.005	/* 发卡行收益比例(手续费×ISS_INCOME) */
#define PAGE_ROW_NUM	30		/* 打印分页时,每页的行数 */
/*===========================2001-8-28 22:09=======End==============*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -