#!/usr/bin/perl # # $Id: shop.pl,v 1.1 2006/05/24 18:38:39 ddoughty Exp $ # # Source File: shop.pl # Get config require 'sitecfg.pl'; require 'testlib.pl'; &app_initialize; print "Content-Type: text/html\n\n"; if (&get_session($FORM{'tid'}, 1)) { $SESSION{'clid'} = $FORM{'clid'}; $SESSION{'lang'} = $FORM{'lang'}; &setbrowsertype(); &LanguageSupportInit(); if ($FORM{'dbop'} eq 'shop' || $FORM{'dbop'} eq 'preview') { &get_client_profile($SESSION{'clid'}); &show_template("shop"); } elsif ($FORM{'dbop'} eq 'confirm') { ### Save order @orders = &get_data("orders.".$SESSION{'clid'}, 1); my $oid = $$; push(@orders, "$oid&".$SESSION{'uid'}."&".$FORM{'orderlist'}."&".$FORM{'total'}."\n"); &save_orders(); ### Send user to CC processing #$FORM{'merchanturl'} = "https://63.211.85.113:21027/sandbox/cc.php"; $FORM{'merchanturl'} = "https://www.goemerchant4.com/trans_center/gateway/process.cgi"; $FORM{'OrderID'} = $SESSION{'clid'}."-$oid"; $url = "https://".$ENV{'SERVER_NAME'}; if ($ENV{'SERVER_PORT'} != 443) { $url .= ":".$ENV{'SERVER_PORT'}; } $url .= "$PATHS{'cgiroot'}/shopreturn.pl"; $FORM{'URL'} = $url; &show_template("shop"); } else { &show_illegal_access_warning("user"); } } else { &show_illegal_access_warning("user"); }