1 8 package lp.samples; 9 import lp.order.*; 10 18 19 public class PB_CANCEL extends JLinkPointSample { 20 public PB_CANCEL() { 21 } 22 public PB_CANCEL(String _oid) { 23 oid = _oid; 24 } 25 protected String getOrderXML() { 26 LPOrderPart order = LPOrderFactory.createOrderPart("order"); 28 29 LPOrderPart op = LPOrderFactory.createOrderPart(); 31 32 33 op.put("result","GOOD"); 36 op.put("ordertype","SALE"); 37 order.addPart("orderoptions", op ); 39 40 41 op.clear(); 43 op.put("configfile",configfile); 44 order.addPart("merchantinfo", op ); 46 47 48 op.clear(); 50 op.put("cardnumber","4111-1111-1111-1111"); 51 op.put("cardexpmonth","03"); 52 op.put("cardexpyear","05"); 53 order.addPart("creditcard", op ); 55 56 op.clear(); 58 op.put("addrnum","123"); 59 op.put("zip","12345"); 60 order.addPart("billing", op ); 62 63 op.clear(); 65 op.put("chargetotal","14.99"); 66 order.addPart("payment", op ); 68 69 op.clear(); 71 op.put("action","CANCEL"); 72 op.put("startdate","immediate"); 73 op.put("periodicity","monthly"); 74 op.put("installments","3"); 75 op.put("threshold","3"); 76 order.addPart("periodic", op ); 78 79 op.clear(); 81 op.put("oid",oid); 82 order.addPart("transactiondetails", op ); 84 85 return order.toXML(); 86 } 87 88 private String oid=""; 89 } | Popular Tags |