1 8 package lp.samples; 9 import lp.order.*; 10 18 19 public class PB_NEW extends JLinkPointSample { 20 public PB_NEW() { 21 } 22 protected String getOrderXML() { 23 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 25 26 LPOrderPart op = LPOrderFactory.createOrderPart(); 28 29 30 op.put("result","GOOD"); 33 op.put("ordertype","SALE"); 34 order.addPart("orderoptions", op ); 36 37 38 op.clear(); 40 op.put("configfile",configfile); 41 order.addPart("merchantinfo", op ); 43 44 45 op.clear(); 47 op.put("cardnumber","4111-1111-1111-1111"); 48 op.put("cardexpmonth","03"); 49 op.put("cardexpyear","05"); 50 order.addPart("creditcard", op ); 52 53 op.clear(); 55 op.put("addrnum","123"); 56 op.put("zip","12345"); 57 order.addPart("billing", op ); 59 60 op.clear(); 62 op.put("chargetotal","12.99"); 63 order.addPart("payment", op ); 65 66 op.clear(); 68 op.put("action","SUBMIT"); 69 op.put("startdate","immediate"); 70 op.put("periodicity","monthly"); 71 op.put("installments","3"); 72 op.put("threshold","3"); 73 74 order.addPart("periodic", op ); 76 77 return order.toXML(); 78 } 79 80 } | Popular Tags |