1 8 package lp.samples; 9 import lp.order.*; 10 18 19 public class PREAUTH extends JLinkPointSample { 20 public PREAUTH() { 21 } 22 protected String getOrderXML() { 23 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 25 26 LPOrderPart op = LPOrderFactory.createOrderPart(); 28 29 op.put("result","GOOD"); 32 op.put("ordertype","PREAUTH"); 33 order.addPart("orderoptions", op ); 35 36 37 op.clear(); 39 op.put("configfile",configfile); 40 order.addPart("merchantinfo", op ); 42 43 44 op.clear(); 46 op.put("cardnumber","4111-1111-1111-1111"); 47 op.put("cardexpmonth","03"); 48 op.put("cardexpyear","05"); 49 order.addPart("creditcard", op ); 51 52 op.clear(); 54 op.put("addrnum","123"); 55 op.put("zip","12345"); 56 order.addPart("billing", op ); 58 59 op.clear(); 61 op.put("chargetotal","12.99"); 62 order.addPart("payment", op ); 64 65 return order.toXML(); 66 } 67 68 } | Popular Tags |