Specifications

FIGURE 25.10
This transaction was successful, and the items will now be shipped.
The code for process.php can be found in Listing 25.16.
LISTING 25.16 process.phpThe process.php Script Processes the Customers Payment
and Tells Her the Result
<?
include (‘book_sc_fns.php’);
// The shopping cart needs sessions, so start one
session_start();
do_html_header(“Checkout”);
if($cart&&$card_type&&$card_number&&$card_month&&$card_year&&$card_name )
{
//display cart, not allowing changes and without pictures
display_cart($cart, false, 0);
display_shipping(calculate_shipping_cost());
if(process_card($HTTP_POST_VARS))
{
Building a Shopping Cart
C
HAPTER 25
25
B
UILDING A
SHOPPING CART
573
31 7842 CH25 3/6/01 3:39 PM Page 573