1 8 package lp.samples; 9 import lp.order.*; 10 11 19 20 public class RETAIL_KEYED extends JLinkPointSample { 21 public RETAIL_KEYED() { 22 } 23 protected String getOrderXML() { 24 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 26 27 LPOrderPart op = LPOrderFactory.createOrderPart(); 29 30 op.put("ordertype","SALE"); 32 order.addPart("orderoptions", op ); 34 35 36 op.clear(); 38 op.put("configfile",configfile); 39 order.addPart("merchantinfo", op ); 41 42 op.clear(); 44 op.put("terminaltype","POS"); 50 op.put("transactionorigin","RETAIL"); 51 order.addPart("transactiondetails", op ); 53 54 55 op.clear(); 57 op.put("cardnumber","4111-1111-1111-1111"); 58 op.put("cardexpmonth","03"); 59 op.put("cardexpyear","05"); 60 order.addPart("creditcard", op ); 62 63 op.clear(); 65 op.put("chargetotal","12.99"); 66 order.addPart("payment", op ); 68 69 return order.toXML(); 71 } 72 73 } | Popular Tags |