1 8 package lp.samples; 9 import lp.order.*; 10 18 19 public class RETAIL_SWIPE extends JLinkPointSample { 20 public RETAIL_SWIPE() { 21 } 22 protected String getOrderXML() { 23 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 25 26 LPOrderPart op = LPOrderFactory.createOrderPart(); 28 29 op.put("ordertype","SALE"); 31 order.addPart("orderoptions", op ); 33 34 35 op.clear(); 37 op.put("configfile",configfile); 38 order.addPart("merchantinfo", op ); 40 41 op.clear(); 43 op.put("terminaltype","POS"); 49 op.put("transactionorigin","RETAIL"); 50 order.addPart("transactiondetails", op ); 52 53 54 op.clear(); 56 op.put("track","1298361023614908"); 57 order.addPart("creditcard", op ); 59 60 op.clear(); 62 op.put("chargetotal","12.99"); 63 order.addPart("payment", op ); 65 66 70 return order.toXML(); 71 } 72 73 } | Popular Tags |