1 8 package lp.samples; 9 import lp.order.*; 10 18 19 public class SHIPPING extends JLinkPointSample { 20 public SHIPPING() { 21 } 22 protected String getOrderXML() { 23 24 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 26 LPOrderPart op = LPOrderFactory.createOrderPart(); 28 op.put("ordertype","CALCSHIPPING"); 30 order.addPart("orderoptions", op ); 32 33 op.clear(); 34 op.put("configfile",configfile); 36 order.addPart("merchantinfo", op ); 38 39 op.clear(); 40 op.put("carrier","2"); 41 op.put("weight","1.2"); 42 op.put("total","12.99"); 43 op.put("state","CA"); 44 op.put("items","1"); 45 order.addPart("shipping",op); 46 47 return order.toXML(); 48 } 49 50 } | Popular Tags |