|
|
@@ -166,7 +166,7 @@ public class COSConstant { |
|
|
|
if (moneyHex.length() > 8) |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -182,7 +182,7 @@ public class COSConstant { |
|
|
|
if (money < 0) |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -205,7 +205,7 @@ public class COSConstant { |
|
|
|
if (moneyHex.length() > 8) |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
return initializeLoad.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -222,9 +222,9 @@ public class COSConstant { |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
if (cardVersion >= 48) { |
|
|
|
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@@ -241,7 +241,7 @@ public class COSConstant { |
|
|
|
if (money < 0) |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
return initializeLoad.replace("MMMMMMMM", moneyHex.toUpperCase()).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad.replace("MMMMMMMM", moneyHex.toUpperCase()).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -258,9 +258,9 @@ public class COSConstant { |
|
|
|
return null; |
|
|
|
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex; |
|
|
|
if (cardVersion == 41) { |
|
|
|
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009"); |
|
|
|
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
public static String selectAndRead0015 = selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015; |
|
|
@@ -309,7 +309,7 @@ public class COSConstant { |
|
|
|
*/ |
|
|
|
public static String cardChargeInitialize(Long money, String terminalId) { |
|
|
|
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, "520000000009"); |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
@@ -317,7 +317,7 @@ public class COSConstant { |
|
|
|
*/ |
|
|
|
public static String cardChargeInitializeV2(Long money, String terminalId) { |
|
|
|
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify_second |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, "520000000009"); |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
@@ -325,7 +325,7 @@ public class COSConstant { |
|
|
|
*/ |
|
|
|
public static String cardChargeInitializeByVfj(Long money, String terminalId, int cardVersion) { |
|
|
|
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, "520000000009", cardVersion); |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, terminalId, cardVersion); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
@@ -333,7 +333,7 @@ public class COSConstant { |
|
|
|
*/ |
|
|
|
public static String cardChargeInitializeV2ByVfj(Long money, String terminalId, int cardVersion) { |
|
|
|
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify_second |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, "520000000009", cardVersion); |
|
|
|
+ COS_SEPERATOR + initializeLoad(money, terminalId, cardVersion); |
|
|
|
} |
|
|
|
|
|
|
|
// 00A40000023F00,00A40000021001,805C000204 |
|
|
@@ -345,7 +345,7 @@ public class COSConstant { |
|
|
|
|
|
|
|
public static String cardChargeInitialize(String moneyHex, String terminalId) { |
|
|
|
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify |
|
|
|
+ COS_SEPERATOR + initializeLoad(moneyHex, "520000000009"); |
|
|
|
+ COS_SEPERATOR + initializeLoad(moneyHex, terminalId); |
|
|
|
} |
|
|
|
|
|
|
|
/** |