#
代碼 POS顯示的內容原因/操作員應采取的措施
00 交易成功 承兌或交易成功
01 交易失敗 請聯系發卡行 查發卡行
02 交易失敗 請聯系發卡行向發卡行查詢
03 商戶未登記 聯系銀行卡服務中心處理
04 沒收卡 請聯系收單行 操作員沒收卡
05 交易失敗 請聯系發卡行 發卡不予承兌,與發銀行聯系查詢
06 交易失敗 請聯系發卡行發卡行故障
07 沒收卡 請聯系收單行 特殊條件下沒收卡
09 交易失敗 請重試 重做該交易
12 交易失敗 請重試 發卡行不支持的交易
13 交易金額超限 請重試交易金額無效,采用小金額交易或與發卡行聯系
14 無效卡號 請聯系發卡行無效卡號,與銀行卡服務中心或發卡行聯系
15 此卡不能受理 請與銀行卡服務中心聯系處理
19 交易失敗 請聯系發卡行 刷卡讀取數據有誤,重新刷卡
20 交易失敗 請聯系發卡行 與銀行卡服務中心或發卡行聯系
21 交易失敗 請聯系發卡行 與銀行卡服務中心或發卡行聯系
22 操作有誤 請重試 POS狀態與中心不符,重新簽到
23 交易失敗 請聯系發卡行 不可接受的交易費
25 交易失敗 請聯系發卡行發卡行未能找到有關記錄,核對有關資料重做該交易或與發卡行聯系
30 交易失敗 請重試 檢查卡磁條是否完好或反方向刷卡
31 此卡不能受理 此發卡方未與中心開通業務
33 過期卡 請聯系發卡行 過期的卡或與發卡行聯系
34 沒收卡 請聯系收單行 有作弊嫌疑的卡,操作員可以沒收
35 沒收卡 請聯系收單行 有作弊嫌疑的卡,操作員可以沒收
36 此卡有誤 請換卡重試 有作弊嫌疑的卡,操作員可以沒收
37 沒收卡 請聯系收單行 有作弊嫌疑的卡,操作員可以沒收
38 密碼錯誤次數超限 密碼輸錯的次數超限
39 交易失敗 請聯系發卡行 可能刷卡操作有誤
40 交易失敗 請聯系發卡行 發卡行不支持的交易類型
41 沒收卡 請聯系收單行 掛失的卡,與發卡行聯系處理
42 交易失敗 請聯系發卡方 發卡行找不到此帳戶
43 沒收卡 請聯系收單行 被竊卡, 操作員可以沒收
44 交易失敗 請聯系發卡行 可能刷卡操作有誤
51 余額不足 請查詢 帳戶內余額不足
52 交易失敗 請聯系發卡行 無此支票賬戶
53 交易失敗 請聯系發卡行 無此儲蓄卡賬戶
54 過期卡 請聯系發卡行 過期的卡
55 密碼錯 請重試 密碼輸錯,可重新輸入
56 交易失敗 請聯系發卡行 發卡行找不到此帳戶,與發卡行聯系
57 交易失敗 請聯系發卡行不允許持卡人進行的交易,與發卡行聯系
58 終端無效 請聯系收單行或銀聯重新簽到再試或與銀行卡服務中心聯系
59 交易失敗 請聯系發卡行 與發卡行聯系
60 交易失敗 請聯系發卡行 與發卡行聯系
61 金額太大 超出去款金額限制
62 交易失敗 請聯系發卡行 受限制的卡
63 交易失敗 請聯系發卡行 違反安全保密規定
64 交易失敗 請聯系發卡行原始金額不正確,核對原始資料或與發卡行聯系
65 超出取款次數限制 超出取款次數限制
66 交易失敗 請聯系收單行或銀聯 與發卡放聯系處理
67 沒收卡 沒收卡
68 交易超時 請重試發卡行規定時間內沒有應答,與銀行卡服務中心或發卡行聯系
75 密碼錯誤次數超限允許的輸入PIN次數超限 該卡要重置密碼方能使用
77 請向網絡中心簽到 重做簽到
79 POS終端重傳脫機數據 POS終端上傳的脫機數據對帳不平
90 交易失敗 請稍后重試日期切換正在處理,與銀行卡服務中心或發卡行聯系
91 交易失敗 請稍后重試 電話查詢發卡方或銀聯,可重作
92 交易失敗 請稍后重試銀行通訊故障,電話查詢發卡方或網絡中心
93 交易失敗 請聯系發卡行 交易違法、不能完成。重新簽到后再試
94 交易失敗 請稍后重試重新簽到后再交易或與銀行卡服務中心聯系
95 交易失敗 請稍后重試發卡行調節控制錯,與發卡行聯系
96 交易失敗 請稍后重試 與發卡行或銀行卡服務中心聯系
97 終端未登記 請聯系收單行或銀聯與銀行卡服務中心聯系
98 交易超時 請重試銀聯收不到發卡行應答,與銀行卡服務中心或發卡行聯系
99 校驗錯 請重新簽到 重新簽到再作交易
A0 校驗錯 請重新簽到 重新簽到作交易
摘要: POS機的主要功能點: 1. 簽到 2. 輸入密碼 3. 消費 4. 余額查詢 5. 撤銷 6. 系統設置 我公司建議: 1:為統一格式及今后擴展,近可能按照銀聯標準開發: 2:增加“批結算”功能; 3:建議把卡號信息寫在磁條卡“2磁道”; 4:報文格式: TPDU(10字節) + 報文頭(12字節)+ 消息類型(4字節)+ 位圖(8字節)+位圖保護...
閱讀全文
-------------------------------------
MyEclipse 快捷鍵1(CTRL)
-------------------------------------
Ctrl+1 快速修復
Ctrl+D: 刪除當前行
Ctrl+Q 定位到最后編輯的地方
Ctrl+L 定位在某行
Ctrl+O 快速顯示 OutLine
Ctrl+T 快速顯示當前類的繼承結構
Ctrl+W 關閉當前Editer
Ctrl+K 快速定位到下一個
Ctrl+E 快速顯示當前Editer的下拉列表
Ctrl+J 正向增量查找(按下Ctrl+J后,你所輸入的每個字母編輯器都提供快速匹配定位到某個單詞,如果沒有,則在stutes line中顯示沒有找到了,)
Ctrl+Z 返回到修改前的狀態
Ctrl+Y 與上面的操作相反
Ctrl+/ 注釋當前行,再按則取消注釋
Ctrl+D刪除當前行。
Ctrl+Q跳到最后一次的編輯處
Ctrl+M切換窗口的大小
Ctrl+I格式化激活的元素Format Active Elements。
Ctrl+F6切換到下一個Editor
Ctrl+F7切換到下一個Perspective
Ctrl+F8切換到下一個View
------------------------------------------
MyEclipse 快捷鍵2(CTRL+SHIFT)
------------------------------------------
Ctrl+Shift+E 顯示管理當前打開的所有的View的管理器(可以選擇關閉,激活等操作)
Ctrl+Shift+/ 自動注釋代碼
Ctrl+Shift+\自動取消已經注釋的代碼
Ctrl+Shift+O 自動引導類包
Ctrl+Shift+J 反向增量查找(和上條相同,只不過是從后往前查)
Ctrl+Shift+F4 關閉所有打開的Editer
Ctrl+Shift+X 把當前選中的文本全部變為小寫
Ctrl+Shift+Y 把當前選中的文本全部變為小寫
Ctrl+Shift+F 格式化當前代碼
Ctrl+Shift+M(先把光標放在需導入包的類名上) 作用是加Import語句
Ctrl+Shift+P 定位到對于的匹配符(譬如{}) (從前面定位后面時,光標要在匹配符里面,后面到前面,則反之)
Ctrl+Shift+F格式化文件Format Document。
Ctrl+Shift+O作用是缺少的Import語句被加入,多余的Import語句被刪除。
Ctrl+Shift+S保存所有未保存的文件。
Ctrl+Shift+/ 在代碼窗口中是這種/*~*/注釋,在JSP文件窗口中是 <!--~-->。
Shift+Ctrl+Enter 在當前行插入空行(原理同上條)
-----------------------------------------
MyEclipse 快捷鍵3(ALT)
-----------------------------------------
Alt+/ 代碼助手完成一些代碼的插入 ,自動顯示提示信息
Alt+↓ 當前行和下面一行交互位置(特別實用,可以省去先剪切,再粘貼了)
Alt+↑ 當前行和上面一行交互位置(同上)
Alt+← 前一個編輯的頁面
Alt+→ 下一個編輯的頁面(當然是針對上面那條來說了)
Alt+Enter 顯示當前選擇資源(工程,or 文件 or文件)的屬性
MyEclipse 快捷鍵4(ALT+CTRL)
Alt+CTRL+↓ 復制當前行到下一行(復制增加)
Alt+CTRL+↑ 復制當前行到上一行(復制增加)
-------------------------------------------
MyEclipse 快捷鍵5(ALT+SHIFT)
-------------------------------------------
Alt+Shift+R 重命名
Alt+Shift+M 抽取方法
Alt+Shift+C 修改函數結構(比較實用,有N個函數調用了這個方法,修改一次搞定)
Alt+Shift+L 抽取本地變量
Alt+Shift+F 把Class中的local變量變為field變量
Alt+Shift+I 合并變量
Alt+Shift+V 移動函數和變量
Alt+Shift+Z 重構的后悔藥(Undo) Shift+Enter 在當前行的下一行插入空行(這時鼠標可以在當前行的任一位置,不一定是最后)
Alt+Shift+O(或點擊工具欄中的Toggle Mark Occurrences按鈕) 當點擊某個標記時可使本頁面中其他地方的此標記黃色凸顯,并且窗口的右邊框會出現白色的方塊,點擊此方塊會跳到此標記處。
下面的快捷鍵是重構里面常用的,本人就自己喜歡且常用的整理一下(注:一般重構的快捷鍵都是Alt+Shift開頭的了)
--------------------------------------------
MyEclipse 快捷鍵(6)
--------------------------------------------
F2當鼠標放在一個標記處出現Tooltip時候按F2則把鼠標移開時Tooltip還會顯示即Show Tooltip Description。
F3跳到聲明或定義的地方。
F5單步調試進入函數內部。
F6單步調試不進入函數內部,如果裝了金山詞霸2006則要把“取詞開關”的快捷鍵改成其他的。
F7由函數內部返回到調用處。
F8一直執行到下一個斷點。
Java對象的持久化主要使用
ObjectInputStream與ObjectOutputStream類 來實現!
public class Student implements Serializable {
String name;
int id ;
int age;
String department;
public Student(String name, int id, int age, String department) {
this.age = age;
this.department = department;
this.id = id;
this.name = name;
}
public static void saveObjects(Student student, String fileName) {
FileOutputStream os = new FileOutputStream("fileName.dat");
ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(student);
}
public static Student readObjects(String fileName) {
Student student;
Object obj;
try{
FileInputStream is = new FileInputStream("fileName.dat");
ObjectInputStream ois = new ObjectInputStream(is);
obj = ois.readObject();
}catch (Exception e) {
e.printStackTrace();
}
if(obj instanceof Student){
Student stu= (Student)obj;
return stu;
}
return null;
}
JAVA獲取文件絕對路徑:Thread.currentThread().getContextClassLoader().getResource("abc.properties");
配置文件:XXX.properties 常用操作
1:加載properties配置文件 /** * 根據key從Properties對象中得到相應的值
* @param key
* @return 對應的值
*/ public static String getValue(String key) {
if (p !=
null) {
return p.getProperty(key);
}
String property =
null;
InputStream in =
null;
try {
System.out.println("gleepay.properties is path : " + gleepayURL.getFile());
File file =
new File(gleepayURL.getFile());
in =
new FileInputStream(file);
p =
new Properties();
p.load(in);
property = p.getProperty(key);
}
catch (FileNotFoundException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
finally {
if (in !=
null) {
try {
in.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
return property;
}
2:寫入propertis配置信息/**
* 寫入properties信息
* @param parameterKey
* @param parameterValue
*
* @return
*/
public static void writeProperties_MACkey(String parameterKey, String parameterValue) {
String filePath = MACkeyURL.getFile();
Properties prop = new Properties();
try {
InputStream fis = new FileInputStream(filePath);
// 從輸入流中讀取屬性列表(鍵和元素對)
prop.load(fis);
// 調用 Hashtable 的方法 put。使用 getProperty 方法提供并行性。
// 強制要求為屬性的鍵和值使用字符串。返回值是 Hashtable 調用 put 的結果。
OutputStream fos = new FileOutputStream(filePath);
prop.setProperty(parameterKey, parameterValue);
// 以適合使用 load 方法加載到 Properties 表中的格式,
// 將此 Properties 表中的屬性列表(鍵和元素對)寫入輸出流
prop.store(fos, "Update '" + parameterKey + "' value");
} catch (IOException e) {
System.err.println("Visit " + filePath + " for updating "
+ parameterKey + " value error");
e.printStackTrace();
}
}
3:根據key讀取propertis文件value值
/**
* 根據key讀取value
* @param filePath
* @param key
* @return 對應的值
*/
public static String readValueByKey(String filePath, String key) {
System.out.println("properties file is path : " + filePath);
Properties props = new Properties();
try {
InputStream in = new BufferedInputStream(new FileInputStream(filePath));
props.load(in);
String value = props.getProperty(key);
System.out.println(" --> " + key + "=" + value);
return value;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
4:讀取properties配置文件所有信息
/**
* 讀取properties的全部信息
* @param filePath
* @return
*/
@SuppressWarnings("unchecked")
public static void readPropertiesAll(String filePath) {
System.out.println("properties file is path : " + filePath);
Properties props = new Properties();
try {
InputStream in = new BufferedInputStream(new FileInputStream(filePath));
props.load(in);
Enumeration en = props.propertyNames();
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
String Property = props.getProperty(key);
System.out.println(" --> " + key + "=" + Property);
}
} catch (Exception e) {
e.printStackTrace();
}
}
摘要: JAVA 對象拷貝 為什么需要有對象拷貝? 對象拷貝相對的自然是引用拷貝。java初學者經常會問,我這個方法要改變一個對象的屬性,可以把參數傳進去了,為什么沒有改變了? ——基本數據類型傳值,而對象傳引用或引用的拷貝。 而有時候我們要獲取到一個當前狀態的對象復制品,他們是兩個獨立對象。不再是引用或者引用拷貝(實質都是指向對象本身)。就是說a是b的拷貝,b發生變化的時候,不要...
閱讀全文
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Properties;
public class TestMain {
//根據key讀取value
public static String readValue(String filePath,String key) {
Properties props = new Properties();
try {
InputStream in = new BufferedInputStream (new FileInputStream(filePath));
props.load(in);
String value = props.getProperty (key);
System.out.println(key+value);
return value;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
//讀取properties的全部信息
public static void readProperties(String filePath) {
Properties props = new Properties();
try {
InputStream in = new BufferedInputStream (new FileInputStream(filePath));
props.load(in);
Enumeration en = props.propertyNames();
while (en.hasMoreElements()) {
String key = (String) en.nextElement();
String Property = props.getProperty (key);
System.out.println(key+Property);
}
} catch (Exception e) {
e.printStackTrace();
}
}
//寫入properties信息
public static void writeProperties(String filePath,String parameterName,String parameterValue) {
Properties prop = new Properties();
try {
InputStream fis = new FileInputStream(filePath);
//從輸入流中讀取屬性列表(鍵和元素對)
prop.load(fis);
//調用 Hashtable 的方法 put。使用 getProperty 方法提供并行性。
//強制要求為屬性的鍵和值使用字符串。返回值是 Hashtable 調用 put 的結果。
OutputStream fos = new FileOutputStream(filePath);
prop.setProperty(parameterName, parameterValue);
//以適合使用 load 方法加載到 Properties 表中的格式,
//將此 Properties 表中的屬性列表(鍵和元素對)寫入輸出流
prop.store(fos, "Update '" + parameterName + "' value");
} catch (IOException e) {
System.err.println("Visit "+filePath+" for updating "+parameterName+" value error");
}
}
public static void main(String[] args) {
readValue("info.properties","url");
writeProperties("info.properties","age","21");
readProperties("info.properties" );
System.out.println("OK");
}
}
今天介紹的Scanner這個類是java 5新增加的類,不僅使用方便,功能更是強大。先來看一個簡單的例子:
import java.util.*;
public class ScannerTest {
public static void main(String[] args){
Scanner scanner=new Scanner(System.in);
double a=scanner.nextDouble();
System.out.println(a);
}
} 運行
輸入 一個任意數然后輸出這個數
注意粗體字的地方,這一行就實現了從控制臺輸入數字的功能,如果要輸入字符串
可以用
String a=scanner.next();//注意不是nextString()
Scanner還可以直接掃描文件。比如(有點長,耐心一點):
import java.util.*;
import java.io.*;
public class ScannerTest {
public static void main(String[] args) throws IOException{//這里涉及到文件io操作
double sum=0.0;
int count=0;
FileWriter fout=new FileWriter("text.txt");
fout.write("2 2.2 3 3.3 4 4.5 done");//往文件里寫入這一字符串
fout.close();
FileReader fin=new FileReader("text.txt");
Scanner scanner=new Scanner(fin);//注意這里的參數是FileReader類型的fin
while(scanner.hasNext()){//如果有內容
if(scanner.hasNextDouble()){//如果是數字
sum=sum+scanner.nextDouble();
count++;
}else{
String str=scanner.next();
if(str.equals("done")){
break;
}else{
System.out.println("文件格式錯誤!");
return;