Credit Cards and the Wallet

Now that you have addresses, you can write the wallet. A lot of the credit card code (see Listing 11.11) is very similar to the address code. I'm just going to discuss the areas that are different.

Listing 11.11. CreditCard.java
 package com.bfg.customer; import java.util.Vector; import java.util.HashMap; import java.util.Iterator; import org.apache.turbine.services.db.TurbineDB; import org.apache.turbine.util.db.pool.DBConnection; import org.apache.turbine.util.TurbineConfig; import com.bfg.exceptions.CustomerActivityException; import java.sql.*; import java.util.ResourceBundle; import org.apache.log4j.Category; import javax.naming.NamingException; import javax.naming.Context; import javax.naming.InitialContext; import ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.