예제 #1
0
 private Message getTestMessage() throws ParseException {
   final Date testDate = (new SimpleDateFormat("ddMMyyyy:HHmmss")).parse("12122012:121200");
   return factory.createByNames(
       MTI.create(0x0200),
       new HashMap<String, Object>() {
         {
           put("cardNumber", 5432818929192L);
           put("processingCode", 1010);
           put("amount", new BigInteger("1200"));
           put("transDateTime", testDate);
           put("stan", 666666);
           put("transTimeLocal", testDate);
           put("transDateLocal", testDate);
           put("acquierID", 1029);
           put("extReference", 937278626262L);
           put("cardTermId", "ATM-10101");
           put("cardTermName", "DUB87");
           put("msisdn", 353863579271L);
           put("currencyCode", 840);
           put("originalData", BigInteger.TEN);
         }
       });
 }
예제 #2
0
 /** {@inheritDoc} */
 @Override
 public void appendMTI(final MTI type, final DataOutputStream output) throws IOException {
   final int mti = type.intValue();
   write(new byte[] {(byte) (mti >> 8), (byte) mti}, output);
 }