KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > lp > samples > VCHECK_VOID


1 /*****************************************************************************
2 ' Copyright 2003 LinkPoint International, Inc. All Rights Reserved.
3 '
4 ' This software is the proprietary information of LinkPoint International, Inc.
5 ' Use is subject to license terms.
6 '
7 '******************************************************************************/

8 package lp.samples;
9 import lp.order.*;
10 /**
11  * <p>Title: </p>
12  * <p>Description: </p>
13  * <p>Copyright: Copyright (c) 2003</p>
14  * <p>Company: LinkPoint International</p>
15  * @author Sergey Chudnovsky
16  * @version 1.0
17  */

18
19 public class VCHECK_VOID extends JLinkPointSample {
20   public VCHECK_VOID() {
21   }
22
23   public VCHECK_VOID(String JavaDoc _oid) {
24   oid = _oid;
25   }
26
27   protected String JavaDoc getOrderXML() {
28     // Create an empty order
29
LPOrderPart order = LPOrderFactory.createOrderPart("order");
30
31   // Create a part we will use to build the order
32
LPOrderPart op = LPOrderFactory.createOrderPart();
33
34   // Build 'orderoptions'
35
op.put("ordertype","VOID");
36   // add 'orderoptions to order
37
order.addPart("orderoptions", op );
38
39       // Build 'merchantinfo'
40
op.clear();
41       op.put("configfile",configfile);
42   // add 'merchantinfo to order
43
order.addPart("merchantinfo", op );
44
45       // Build 'telecheck' part
46
op.clear();
47       op.put("void","1");
48   // add 'telecheck' to order
49
order.addPart("telecheck", op );
50
51
52        // Build 'payment'
53
op.clear();
54       op.put("chargetotal","12.99");
55   // add 'payment to order
56
order.addPart("payment", op );
57
58       // Add oid
59
op.clear();
60       op.put("oid",oid);
61   // add 'transactiondetails to order
62
order.addPart("transactiondetails", op );
63
64   return order.toXML();
65  }
66
67 private String JavaDoc oid="";
68 }
Popular Tags