我正在使用具有以下依赖关系的 Spring Boot 中的套接字实现自定义 ISO8583 协议,我们已通过正确长度的所有必需数据元素
<dependency>
<groupId>net.sf.j8583</groupId>
<artifactId>j8583</artifactId>
<version>1.17.0</version>
</dependency>
我的 xml 文件如下所示 -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE j8583-config PUBLIC "-//J8583//DTD CONFIG 1.0//EN" "http://j8583.sourceforge.net/j8583.dtd">
<j8583-config>
<!-- These are the ISO headers to be prepended to the message types specified -->
<header type="0200">ISO015000050</header>
<header type="0210">ISO015000055</header>
<header type="0400">ISO015000050</header>
<header type="0410">ISO015000055</header>
<header type="0800">ISO015000015</header>
<header type="0810">ISO015000015</header>
<header type="0100">ISO015000050</header>
<header type="0110">ISO015000055</header>
<template type="0100">
<!-- Membership Number -->
<field num="2" type="LLVAR" length="19"></field>
<!-- Transaction Amount -->
<field num = "4" type="NUMERIC" length="12"></field>
<!-- Expiration Date -->
<field num="14" type="NUMERIC" length="4"/>
<!-- Merchant Category Code -->
<field num="18" type="NUMERIC" length="4"></field>
<!-- Acquiring Institution country Code -->
<field num="19" type="NUMERIC" length="3"></field>
<!-- Acquiring Institution ID Code -->
<field num="32" type="NUMERIC" length="6"></field>
<!-- Terminal ID -->
<field num="41" type="ALPHA" length="8"></field>
<!-- Merchant ID -->
<field num="42" type="ALPHA" length="15"></field>
<!-- Merchant Name and Location -->
<field num="43" type="LLVAR" length="40"></field>
<!-- Transaction Currency Code -->
<field num="49" type="NUMERIC" length="3"/>
<!-- Transaction Fee Amount-->
<field num="28" type="NUMERIC" length="9"/>
</template>
<!-- Transaction Request 100 -->
<parse type="0100">
<!-- Membership Number -->
<field num="2" type="LLVAR" length="19"></field>
<!-- Transaction Amount -->
<field num = "4" type="NUMERIC" length="12"></field>
<!-- Expiration Date -->
<field num="14" type="NUMERIC" length="4"/>
<!-- Merchant Category Code -->
<field num="18" type="NUMERIC" length="4"></field>
<!-- Acquiring Institution country Code -->
<field num="19" type="NUMERIC" length="3"></field>
<!-- Acquiring Institution ID Code -->
<field num="32" type="NUMERIC" length="11"></field>
<!-- Terminal ID -->
<field num="41" type="ALPHA" length="8"/>
<!-- Merchant ID -->
<field num="42" type="ALPHA" length="15"></field>
<!-- Merchant Name and Location -->
<field num="43" type="LLVAR" length="40"></field>
<!-- Transaction Currency Code -->
<field num="49" type="NUMERIC" length="3"/>
<!-- Transaction Fee Amount-->
<field num="28" type="NUMERIC" length="8"/>
</parse>
<!-- Transaction Response 110 -->
<parse type="0110">
<!-- Membership Number -->
<field num="2" type="LLVAR" length="19"></field>
<!-- Transaction Amount -->
<field num = "4" type="NUMERIC" length="12"></field>
<!-- Expiration Date -->
<field num="14" type="DATE4" length="4"/>
<!-- Merchant Category Code -->
<field num="18" type="NUMERIC" length="4"></field>
<!-- Acquiring Institution country Code -->
<field num="19" type="NUMERIC" length="3"></field>
<!-- Acquiring Institution ID Code -->
<field num="32" type="NUMERIC" length="11"></field>
<!-- Terminal ID -->
<field num="41" type="ALPHA" length="8"/>
<!-- Merchant ID -->
<field num="42" type="ALPHA" length="15"></field>
<!-- Transaction Currency Code -->
<field num="49" type="NUMERIC" length="3"/>
<!-- Transaction Fee Amount-->
<field num="28" type="NUMERIC" length="8"/>
<!-- Merchant Name and Location -->
</parse>
</j8583-config>
每当我们尝试在服务器上发送示例 ISO 消息时,我们都会遇到以下错误。
LLVAR 标头数据不足,位置 118