1 9 10 package com.sun.javaee.blueprints.paypal; 11 12 import java.util.ArrayList ; 13 import java.math.BigDecimal ; 14 import com.sun.j2ee.blueprints.ui.shopping.BuyNowPostData; 15 19 public class PayPalBean { 20 21 BuyNowPostData postData=null; 22 ArrayList <LineItem> arLineItems=new ArrayList (); 23 24 25 public PayPalBean() { 26 postData=new BuyNowPostData(); 27 postData.setShippingCost(new BigDecimal ("100")); 28 postData.setTax(new BigDecimal ("200")); 29 postData.setUndefinedQuantity("1"); 30 postData.setSubmissionMethod("GET"); 31 32 arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name1", 1, new BigDecimal ("10.00"), "Donation", "PayPal")); 33 arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name2", 1, new BigDecimal ("20.00"), "Donation", "PayPal")); 34 arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name3", 1, new BigDecimal ("30.00"), "Donation", "PayPal")); 35 arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name4", 1, new BigDecimal ("40.00"), "Donation", "PayPal")); 36 arLineItems.add(new LineItem("donate@animalfoundation.com", "test item name5", 1, new BigDecimal ("50.00"), "Donation", "PayPal")); 37 } 38 39 public BuyNowPostData getPostData() { 40 return postData; 41 } 42 43 public ArrayList getLineItems() { 44 return arLineItems; 45 } 46 47 48 } 49 | Popular Tags |