KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > javaee > blueprints > paypal > PayPalBean


1 /*
2  * PayPalBean.java
3  *
4  * Created on March 14, 2006, 7:50 AM
5  *
6  * To change this template, choose Tools | Template Manager
7  * and open the template in the editor.
8  */

9
10 package com.sun.javaee.blueprints.paypal;
11
12 import java.util.ArrayList JavaDoc;
13 import java.math.BigDecimal JavaDoc;
14 import com.sun.j2ee.blueprints.ui.shopping.BuyNowPostData;
15 /**
16  *
17  * @author basler
18  */

19 public class PayPalBean {
20     
21     BuyNowPostData postData=null;
22     ArrayList JavaDoc<LineItem> arLineItems=new ArrayList JavaDoc();
23     
24     /** Creates a new instance of PayPalBean */
25     public PayPalBean() {
26         postData=new BuyNowPostData();
27         postData.setShippingCost(new BigDecimal JavaDoc("100"));
28         postData.setTax(new BigDecimal JavaDoc("200"));
29         postData.setUndefinedQuantity("1");
30         postData.setSubmissionMethod("GET");
31         
32         arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name1", 1, new BigDecimal JavaDoc("10.00"), "Donation", "PayPal"));
33         arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name2", 1, new BigDecimal JavaDoc("20.00"), "Donation", "PayPal"));
34         arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name3", 1, new BigDecimal JavaDoc("30.00"), "Donation", "PayPal"));
35         arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name4", 1, new BigDecimal JavaDoc("40.00"), "Donation", "PayPal"));
36         arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name5", 1, new BigDecimal JavaDoc("50.00"), "Donation", "PayPal"));
37     }
38     
39     public BuyNowPostData getPostData() {
40         return postData;
41     }
42     
43     public ArrayList JavaDoc getLineItems() {
44         return arLineItems;
45     }
46     
47     
48 }
49
Popular Tags