Process Credit Card body<= {'r'}; my $cart = $GET{'c'}; my $cartobj = LJ::Pay::load_cart($cart); return BML::redirect("$LJ::SITEROOT/pay/") unless $cartobj; # cart tied to user? if ($cartobj->{'userid'}) { my $remote = LJ::get_remote(); return "You must be logged in as this cart's owner to proceed with checkout." unless $remote; return "You do not own this cart. If you'd like to start a new cart, please click " . "here." unless $cartobj->{'userid'} == $remote->{'userid'}; } # if there is no userid, then we know it's clean because we checked # each individual item for email blocks when they were added to the cart # is merchant gateway down? return "" . "" if $LJ::AUTHNET_DOWN; my $needs_shipping = LJ::Pay::cart_needs_shipping($cartobj); my $has_coppa = LJ::Pay::cart_contains_coppa($cartobj); my $amt_total = $cartobj->{amount}; if ($amt_total <= 0 && $has_coppa) { $amt_total = '0.01'; } my $amt_charge = sprintf("%0.02f", $amt_total); my $amt_pretty = "\$${amt_charge} USD"; my $ret; $ret .= " 1 }); $ret .= " p?>"; if ($cartobj->{'mailed'} ne "C") { $ret .= ""; return $ret; } if ($needs_shipping && ! $POST{'confirm_address'}) { my %payvar; my $dbh = LJ::get_db_writer(); my $sth = $dbh->prepare("SELECT pkey, pval FROM payvars WHERE payid=? AND pkey LIKE 'ship%'"); $sth->execute($cartobj->{'payid'}); while (my ($k, $v)= $sth->fetchrow_array) { $payvar{$k} = $v; } my %country; LJ::load_codes({ "country" => \%country }); $ret .= ""; $ret .= "back to your order and check out again, correcting the shipping address. p?>