\n"; } print ""; $table_width = "100%"; } } sub navigation_bar2 { $extra_forms = 0; if ($navigation_bar2) { open(NAVBAR,"$navigation_bar2"); @nav_bar_html=; close(NAVBAR); print "\n"; foreach (@nav_bar_html) { print "$_\n"; while ( $_ =~ /(
"; } } sub quote_strip { $q = """; $_ = $_[0]; s/(<)([^>|\n]*)(")([^>|\n]*)(>)/$1$2$4$5/gi while (/(<)([^>|\n]*)(")([^>|\n]*)(>)/); s/(<)([^>|\n]*)($q)([^>|\n]*)(>)/$1$2$4$5/gi while (/(<)([^>|\n]*)($q)([^>|\n]*)(>)/); return $_; } sub get_sales_tax { $sn = 0; foreach (@state) { if ( $state[$sn] eq $state ) { $tax_rate = $tax[$sn]; last; } $sn++; } } sub address_table { print " "; print "$lang[2] ($lang[3]) "; print "$lang[4] "; if ($use_company_name_field) { print "$lang[90] "; } print "$lang[5] "; print "$lang[6] "; print "$lang[7] "; print "$lang[8] "; print "$lang[9] "; print "
"; } sub ship_calc { if ($ship_allow == 1) { if ($shipping_roundup) { if ( ($ship_total - int($ship_total)) > 0 && ( $ship_total < 1 ) ) { $ship_total = int($ship_total); $ship_total++; } } $an = 0; foreach $type (@method) { if ( $method_init_price[$an] =~ /(\D+)(.*)(\.)(\D+)/ ) { &db_shipping; } else { $price[$an] = $ship_total * $method_price[$an]; $price[$an] += ( @method_init_price[$an] - $method_price[$an] ); } $price[$an] = sprintf("$decimals", $price[$an]); if ( $ship_total == 0 ) { $price[$an] = 0; } $an++; } $an = 0; if ( $ship_total > 0 ) { foreach $type (@method) { if ( $ship_method eq $type ) { if ( $method_init_price[$an] =~ /(\D+)(.*)(\.)(\D+)/ ) { &db_shipping; $ship_total = $price[$an]; } else { $ship_total *= $method_price[$an]; $ship_total += ( @method_init_price[$an] - $method_price[$an] ); } } $an++; } } } if ($ship_allow == 2) { $total_ship_temp = $total + $coupon_amount_shipping_calculation; $total_ship_temp -= $noshipping; $already_know_what_method_is = $ship_method; $an = 0; foreach (@shipping_locations) { $ship_method = ""; $ship_total = 0; @temp = split(/\,/,$shipping_via_amount[$an]); $highest = $temp[(@temp-2)]; while (@temp) { ($b) = pop(@temp); ($a) = pop(@temp); if ( ($total_ship_temp > 0) && $total_ship_temp < $a) { $ship_total = $b; $ship_method = "$shipping_locations[$an]"; } if ( ($total_ship_temp < $a) && ( $b =~ /(\%)$/ ) ) { chop($b); $ship_total = ( ($b * $total_ship_temp) / 100 ); $ship_total = sprintf("$decimals","$ship_total"); } } if (!$ship_method) { $ship_total = "0.00"; } $price[$an] = $ship_total; if ( $shipping_locations[$an] eq $already_know_what_method_is ) { $ship_method = "$shipping_locations[$an]"; $ship_method_chosen = "$ship_method"; $ship_grand_total = $ship_total; } $an++; } } if ( $already_know_what_method_is ) { $ship_method = "$ship_method_chosen"; $ship_total = $ship_grand_total; } } sub db_shipping { $ship_db = "$vars"; $a = ""; until ($a eq "/" || $ship_db eq "") { $a = chop($ship_db); } $ship_db = "$ship_db/$method_init_price[$an]"; if (!-e"$ship_db") { $type = "Cannot find: $ship_db"; } else { open(FILE,"$ship_db"); @ship_db_lines=; close(FILE); foreach $ship_db_line (@ship_db_lines) { while ($ship_db_line =~ /(\n|\r|\s)$/) { chop($ship_db_line); } ($db_pounds,$db_cost) = split(/\|/,$ship_db_line); if ( ($ship_db_line =~ /\|/) && ($ship_total >= $db_pounds) ) { $price[$an] = "$db_cost"; } } } } sub calculate_fulltotal { $total = 0; $nontaxable = 0; $noshipping = 0; $ship_total = 0; $n = 0; chop($items[0]); ($a,$invoice,$state,$ship_method,$comments2,$coupon_amount,$coupon_number) = split(/$delimiter2/, $items[0]); foreach $item (@items) { if ( ( $n == 0 ) || ( $n == 1 ) ) { $n++; next; } @stuff = split(/$delimiter2/,$item); @customs = (@stuff); for($i=1;$i<=5;$i++) { shift(@customs); } $quantity = $stuff[4]; $price_calc = $stuff[1]; &price_calc; $item_total = $each * $stuff[4]; if ($item =~ /\#non.*taxable\#/i) { $nontaxable += $item_total; } if ($item =~ /\#noshipping\#/i) { $noshipping += $item_total; } $total += $item_total; $ship_total += $stuff[2] * $stuff[4]; $n++; } if ( $coupon_amount ) { &coupon_amount; } &webstore_discount; $total -= $discount_amount; if ( $nontaxable ) { $nontaxable -= $discount_amount; } $taxes = 0; if ( $state ) { &get_sales_tax; $taxes = ($total - $nontaxable) * $tax_rate; $taxes /= 100; $taxes =~ /(.*)(\.)(\d)(\d)(\d)/; if ( $5 >= 5 ) { $taxes += .005; } } if ( $ship_allow ) { &ship_calc; } $total += $taxes if ( $state ); $total += $ship_total if ( $ship_allow ); $total = sprintf("$decimals","$total"); $total =~ s/ //g; } sub webstore_discount { if ($webstore_discount) { $disc_items_total = 0; $discount_amount = 0; ($disc_type,$disc_start,$disc_percent,@multi_disc) = split(/$delimiter2/,$webstore_discount); $disc_percent2 = $disc_percent / 100; if ($disc_type eq "items") { $dn = 0; foreach $disc_count (@items) { if ( $dn < 2 ) { $dn++; next; } ($trash,$trash,$trash,$trash,$disc_items,$first_custom) = split(/$delimiter2/,$disc_count); if ( ( $lang[107] ) && ( $first_custom ne "$lang[107]" ) ) { $disc_items_total += $disc_items; } $dn++; } unshift(@multi_disc,$disc_start,$disc_percent); while (@multi_disc) { ($a) = shift(@multi_disc); ($b) = shift(@multi_disc); if ( $disc_items_total >= $a ) { $disc_percent = $b; $discount_amount = $total * ($b/100); $discount_amount = sprintf("$decimals",$discount_amount); } } } if ($disc_type eq "subtotal") { unshift(@multi_disc,$disc_start,$disc_percent); while (@multi_disc) { ($a) = shift(@multi_disc); ($b) = shift(@multi_disc); if ( $total >= $a ) { $disc_percent = $b; $discount_amount = $total * ($b/100); $discount_amount = sprintf("$decimals",$discount_amount); } } } } } sub add_new_item_to_cart { if ( $FORM{'name'} =~ /^(multi-items)$/i ) { for($mi=1;$mi<=$customs;$mi++) { if ( $FORM{"multi-item$mi"} ) { ($FORM{'name'},$FORM{'price'},$FORM{'sh'},$FORM{'img'},@multi_custom) = split(/$delimiter2/,$FORM{"multi-item$mi"}); $FORM{'quantity'} = $FORM{"quantity$mi"}; &fix_quantity; &limited_item_check; print CART "$FORM{'name'}$delimiter$FORM{'price'}$delimiter$FORM{'sh'}$delimiter$FORM{'img'}$delimiter$FORM{'quantity'}"; for($ci=0;$ci<$customs;$ci++) { print CART "$delimiter$multi_custom[$ci]"; } print CART "\n"; } } } else { &limited_item_check; if ( $FORM{'img2'} ) { $img_temp = "::$FORM{'img2'}"; } else { $img_temp = ""; } print CART "$FORM{'name'}$delimiter$FORM{'price'}$delimiter$FORM{'sh'}$delimiter$FORM{'img'}$img_temp$delimiter$FORM{'quantity'}"; for($ci=1;$ci<=$customs;$ci++) { print CART "$delimiter$FORM{\"custom$ci\"}"; } print CART "\n"; } } sub limited_item_check { $limited_dir = "$vars"; $a = ""; until ($a eq "/" || $limited_dir eq "") { $a = chop($limited_dir); } if (-e "$limited_dir/limited.dat") { open (LIMITED, "$limited_dir/limited.dat"); if ($flock) { flock(LIMITED, 2); } @limited = ; if ($flock) { flock(LIMITED, 8); } close (LIMITED); foreach $limited_item (@limited) { if ($limited_item =~ /\n$/) { chop($limited_item); } ($limit_name,$limit_quantity) = split(/$delimiter2/,$limited_item); if ( ($FORM{'name'} eq "$limit_name") && ($limit_quantity < 1) ) { $FORM{'name'} = "$FORM{'name'}"; $FORM{'price'} = "0"; $FORM{'sh'} = ""; $FORM{'img'} = ""; $FORM{'quantity'} = "1"; for($ci=1;$ci<=$customs;$ci++) { $FORM{"custom$ci"} = ""; $multi_custom[$ci] = ""; } $FORM{"custom1"} = "$lang[107]"; $multi_custom[1] = "$lang[107]"; last; } elsif ( ($FORM{'name'} eq "$limit_name") && ($limit_quantity < $FORM{'quantity'}) ) { $FORM{'quantity'} = $limit_quantity; } } } } sub limited_item_deincrement { foreach $limited_item (@limited) { if ($limited_item =~ /\n$/) { chop($limited_item); } ($limit_name,$limit_quantity) = split(/$delimiter2/,$limited_item); if ( $stuff[0] eq "$limit_name" ) { if ( $stuff[4] < 1 ) { $stuff[4] = 1; } $limit_quantity -= $stuff[4]; if ( $limit_quantity < 0 ) { $limit_quantity = "0"; } $limited_item = "$limit_name|$limit_quantity"; $deincrement = 1; last; } } } sub fix_quantity { while ( $FORM{'quantity'} =~ /[a-zA-Z]/ ) { chop($FORM{'quantity'}); } if ( !$FORM{'quantity'} ) { $FORM{'quantity'} = 1; } if ( $FORM{'quantity'} < 0 ) { $FORM{'quantity'} = 1; } if ( $fix_int_quantity != 1 ) { $FORM{'quantity'} = int($FORM{'quantity'}); } } sub get_shoppers_items { if ( $virtual_browser_cookie ) { $shopper_id = "$virtual_browser_cookie"; } else { if ( $ip_or_cookie == 0 ) { $shopper_id = $ENV{'REMOTE_HOST'}; if (!-e "$path1/$shopper_id$ext") { &increment_invoice; } } elsif (-e "$path1/$ENV{'REMOTE_HOST'}$ext") { $shopper_id = $ENV{'REMOTE_HOST'}; } else { if (&GetCookies("$cookie_name2") && (-e "$path1/$Cookies{$cookie_name2}$ext") ) { $shopper_id = "$Cookies{$cookie_name2}"; } else { if (!$got_cookie) { &increment_invoice; &SetCookies($cookie_name2,$invoice); $shopper_id = $invoice; $got_cookie = 1; } } } } open(CART,"$path1/$shopper_id$ext"); @items = ; close CART; } sub increment_invoice { $max_size_invoice_file = 10; open(INVOICE,"$path2"); if ($flock) { flock(INVOICE, 2); } @invoice = ; @invoice = sort { $a <=> $b } @invoice; $invoice = $invoice[@invoice-1]; $invoice++; if ( @invoice > $max_size_invoice_file ) { until(@invoice < ($max_size_invoice_file / 2) ) { shift(@invoice); } $path2 = &untaint("$path2"); open(INVOICE,">$path2"); foreach (@invoice) { print INVOICE "$_"; } } else { $path2 = &untaint("$path2"); open(INVOICE,">>$path2"); if ( $invoice[@invoice-1] !~ /\n$/ ) { print INVOICE "\n"; } } print INVOICE "$invoice\n"; if ($flock) { flock(INVOICE, 8); } close(INVOICE); } sub cookie_failure { if (!-e "$path1/$ENV{'REMOTE_HOST'}$ext") { $temp_path1 = &untaint("$path1/$FORM{'convert_cookie_to_ip'}$ext"); $temp_path2 = &untaint("$path1/$ENV{'REMOTE_HOST'}$ext"); rename ("$temp_path1", "$temp_path2"); } } sub GetCookies { local(@ReturnCookies) = @_; local($cookie_flag) = 0; local($cookie,$value); if ($ENV{'HTTP_COOKIE'}) { if ($ReturnCookies[0] ne '') { foreach (split(/; /,$ENV{'HTTP_COOKIE'})) { ($cookie,$value) = split(/=/); foreach $char (@Cookie_Decode_Chars) { $cookie =~ s/$char/$Cookie_Decode_Chars{$char}/g; $value =~ s/$char/$Cookie_Decode_Chars{$char}/g; } foreach $ReturnCookie (@ReturnCookies) { if ($ReturnCookie eq $cookie) { $Cookies{$cookie} = $value; $cookie_flag = "1"; } } } } else { foreach (split(/; /,$ENV{'HTTP_COOKIE'})) { ($cookie,$value) = split(/=/); foreach $char (@Cookie_Decode_Chars) { $cookie =~ s/$char/$Cookie_Decode_Chars{$char}/g; $value =~ s/$char/$Cookie_Decode_Chars{$char}/g; } $Cookies{$cookie} = $value; } $cookie_flag = 1; } } return $cookie_flag; } sub SetCookies { local(@cookies) = @_; local($cookie,$value,$char); while( ($cookie,$value) = @cookies ) { foreach $char (@Cookie_Encode_Chars) { $cookie =~ s/$char/$Cookie_Encode_Chars{$char}/g; $value =~ s/$char/$Cookie_Encode_Chars{$char}/g; } print 'Set-Cookie: ' . $cookie . '=' . $value . ';'; if ($Cookie_Exp_Date) { print ' expires=' . $Cookie_Exp_Date . ';'; } if ($Cookie_Path) { print ' path=' . $Cookie_Path . ';'; } if ($Cookie_Domain) { print ' domain=' . $Cookie_Domain . ';'; } if ($Secure_Cookie) { print ' secure'; } print "\n"; shift(@cookies); shift(@cookies); } } sub SetCookieExpDate { @date = localtime(time); foreach (@date) { if ( $_ < 10 ) { $_ = "0" . $_; } } $date[4] = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$date[4]]; $date[6] = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$date[6]]; if ( $date[5] < 100 ) { if ( $date[5] > 97 ) { $date[5] = "19" . $date[5]; } else { $date[5] = "20" . $date[5]; } } if ( $date[5] < 100 ) { $date[5] = "20" . "$date[5]"; } if ( ( $date[5] >= 100 ) && ( $date[5] < 2000 ) ) { $date[5] += 1900; } $date[5]++; $Cookie_Exp_Date = "$date[6] $date[4] $date[3] $date[2]:$date[1]:$date[0] $date[5] GMT"; } sub SetCookieExpDate2 { @date = localtime(time); foreach (@date) { if ( $_ < 10 ) { $_ = "0" . $_; } } $date[4] = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$date[4]]; $date[6] = (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$date[6]]; if ( $date[5] < 100 ) { if ( $date[5] > 97 ) { $date[5] = "19" . $date[5]; } else { $date[5] = "20" . $date[5]; } } if ( $date[5] < 100 ) { $date[5] = "20" . "$date[5]"; } if ( ( $date[5] >= 100 ) && ( $date[5] < 2000 ) ) { $date[5] += 1900; } $Cookie_Exp_Date = "$date[6] $date[4] $date[3] $date[2]:$date[1]:$date[0] $date[5]"; } sub SetCookieExpDate3 { $date_temp = `date`; if ($date_temp =~ /\n$/) { chop($date_temp); } @date_temp = split(/\s/,$date_temp); if ( $date_temp[2] eq "" ) { $date_temp[6]++; $Cookie_Exp_Date = "$date_temp[0]" . ", " . "$date_temp[3]" . "-" . "$date_temp[1]" . "-" . "$date_temp[6]" . " " . "$date_temp[4]" . " " . "GMT"; } else { $date_temp[5]++; $Cookie_Exp_Date = "$date_temp[0]" . ", " . "$date_temp[2]" . "-" . "$date_temp[1]" . "-" . "$date_temp[5]" . " " . "$date_temp[3]" . " " . "GMT"; } } sub SetCompressedCookies { local($cookie_name,@cookies) = @_; local($cookie,$value,$cookie_value); while ( ($cookie,$value) = @cookies ) { foreach $char (@Cookie_Encode_Chars) { $cookie =~ s/$char/$Cookie_Encode_Chars{$char}/g; $value =~ s/$char/$Cookie_Encode_Chars{$char}/g; } if ($cookie_value) { $cookie_value .= '&' . $cookie . '::' . $value; } else { $cookie_value = $cookie . '::' . $value; } shift(@cookies); shift(@cookies); } &SetCookies("$cookie_name","$cookie_value"); } sub GetCompressedCookies { local($cookie_name,@ReturnCookies) = @_; local($cookie_flag) = 0; local($ReturnCookie,$cookie,$value); if (&GetCookies($cookie_name)) { if ($ReturnCookies[0] ne '') { foreach (split(/&/,$Cookies{$cookie_name})) { ($cookie,$value) = split(/::/); foreach $char (@Cookie_Decode_Chars) { $cookie =~ s/$char/$Cookie_Decode_Chars{$char}/g; $value =~ s/$char/$Cookie_Decode_Chars{$char}/g; } foreach $ReturnCookie (@ReturnCookies) { if ($ReturnCookie eq $cookie) { $Cookies{$cookie} = $value; $cookie_flag = 1; } } } } else { foreach (split(/&/,$Cookies{$cookie_name})) { ($cookie,$value) = split(/::/); foreach $char (@Cookie_Decode_Chars) { $cookie =~ s/$char/$Cookie_Decode_Chars{$char}/g; $value =~ s/$char/$Cookie_Decode_Chars{$char}/g; } $Cookies{$cookie} = $value; } $cookie_flag = 1; } delete($Cookies{$cookie_name}); } return $cookie_flag; } sub check_cookie { if ( $ip_or_cookie == 1 ) { &GetCookies("$cookie_name2"); $shopper_id = "$Cookies{$cookie_name2}"; if ( ( (!$shopper_id) || (!-e "$path1/$shopper_id$ext") ) && (!-e "$path1/$ENV{'REMOTE_HOST'}$ext") ) { &cookie_failure; } } } sub footer { print " Use of the Dansie Shopping Cart software is subject to the terms of the license agreement. By using this software you signify that you have read the license agreement and accept its terms. Your purchase of a Dansie Shopping Cart license entitles you to one (1) working copy of the script per license. You may NOT copy, reproduce, resell, or give away copies of the script in any way shape or form without first purchasing an additional license. You may make one back up copy should something happen to the working copy on your host. You may not make any modifications to the Dansie Shopping Cart script except as instructed in the ReadMe. The small text link and credit to http://www.dansie.net must remain in the script and appear at the bottom of the various pages of shopping cart script. Violation of this license agreement may void your right to technical support and subject you to legal action. Dansie Shopping Cart $version Copyright © Dec 10, 1997 "; exit; } sub untaint { if ( $_[0] ne "" ) { $_[0] =~ /^(.+)$/; $a = $1; } else { $a = ""; } return $a; } sub required_fields { if ( ( $reqired_field_prefs =~ /(name)/i && (!$FORM{'name'}) ) || ( $reqired_field_prefs =~ /(company)/i && !$FORM{'company'} && $use_company_name_field ) || ( $reqired_field_prefs =~ /(address)/i && (!$FORM{'address'}) ) || ( $reqired_field_prefs =~ /(city)/i && (!$FORM{'city'}) ) || ( $reqired_field_prefs =~ /(state)/i && (!$FORM{'state'}) && $use_state ) || ( $reqired_field_prefs =~ /(zip)/i && (!$FORM{'zip'}) && $use_zipcode_fields ) || ( $reqired_field_prefs =~ /(country)/i && (!$FORM{'country'}) ) || ( $reqired_field_prefs =~ /(email)/i && (!$FORM{'email'}) ) || ( $reqired_field_prefs =~ /(phone)/i && (!$FORM{'phone'}) ) || ( $reqired_field_prefs =~ /(comments)/i && (!$FORM{'comments'}) ) ) { return 0; } else { return 1; } } sub required_fields2 { if ( ( $reqired_field_prefs =~ /(name)/i && (!$FORM{'name2'}) ) || ( $reqired_field_prefs =~ /(company)/i && !$FORM{'company2'} && $use_company_name_field ) || ( $reqired_field_prefs =~ /(address)/i && (!$FORM{'address2'}) ) || ( $reqired_field_prefs =~ /(city)/i && (!$FORM{'city2'}) ) || ( $reqired_field_prefs =~ /(state)/i && (!$FORM{'state2'}) && $use_state ) || ( $reqired_field_prefs =~ /(zip)/i && (!$FORM{'zip2'}) && $use_zipcode_fields ) || ( $reqired_field_prefs =~ /(country)/i && (!$FORM{'country2'}) ) || ( $reqired_field_prefs =~ /(email)/i && (!$FORM{'email2'}) ) || ( $reqired_field_prefs =~ /(phone)/i && (!$FORM{'phone2'}) ) ) { return 0; } else { return 1; } } sub pass_standard_secure_variables { if ( $MerchantID =~ /$delimiter2/ ) { ($MerchantID,$cambist_exchange_rate) = split(/$delimiter2/,$MerchantID); $total *= $cambist_exchange_rate; } print " \n"; $biz_temp = "$bizname"; $biz_temp =~ s/<([^>]|\n)*>//g; print " \n"; print " \n \n"; print " \n" if ($secure_field[5]); print " \n" if ($secure_field[6]); print " \n" if ($secure_field[7]); print " \n \n \n"; unless ( $FORM{'merchant'} && ($path5 =~ /(cambist\.com)/i) ) { print " \n" if ($secure_field[19]); } if ($cambist_book_transaction) { print " \n"; } if ($cambist_AVSVerify) { print " \n"; } for($secure_field_array=20;$secure_field_array<$max_secure_field_array;$secure_field_array++) { if ( $secure_field[$secure_field_array] ) { $temp = $secure_field_array - 19; print " \n"; } } } sub pass_shipping_secure_variables { print " \n"; print " \n" if ($secure_field[50]); print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; } sub pass_ssl_variables { if ( $path5 =~ /(ssl\.pl)/i || $path5 =~ /(ssl\.cgi)/i ) { $meta_tag2 = "$meta_tag"; $meta_tag2 =~ s/"/\"/g; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; print " \n"; if ($ssl_tracking_dir) { print " \n"; } } } sub custom_processor { open(FILE,"$processor_path"); @processor_data=; close FILE; $current_var = 0; @processor_data2 = (); foreach (@processor_data) { while ($_ =~ /(\n|\r|\s)$/) { chop($_); } if ( $_ =~ /(\s?)(\d+)(.*)(-->)(.*)/ ) { $processor_data2[$2] = "$5"; $current_var = $2; } else { $processor_data2[$current_var] .= " $_"; } } (@processor_data) = (@processor_data2); $path5 = "$processor_data[3]"; if ($processor_data[4]) { $MerchantID = "$processor_data[4]"; } for($secure_field_array=20;$secure_field_array<$max_secure_field_array;$secure_field_array++) { if ( $processor_data[$secure_field_array] ) { $temp = $secure_field_array - 19; ($processor_data[$secure_field_array],$custom_processor_field[$temp]) = split(/\|/,"$processor_data[$secure_field_array]"); if ( $custom_processor_field[$temp] eq "#split_name#" ) { if ($FORM{'name2'}) { $old_temp_name = "$FORM{'name2'}"; } ($custom_processor_field[$temp],$FORM{'name2'}) = split(/ /,$FORM{'name2'}); if (!$FORM{'name2'}) { $custom_processor_field[$temp] = "$old_temp_name"; } } } } @secure_field = ("", "$processor_data[5]", "$processor_data[18]", "$processor_data[6]", "$processor_data[19]", "", "", "", "$processor_data[8]", "$processor_data[9]", "$processor_data[7]", "$processor_data[10]", "$processor_data[11]", "$processor_data[12]", "$processor_data[13]", "$processor_data[14]", "$processor_data[15]", "$processor_data[16]", "$processor_data[17]", ""); for($secure_field_array=20;$secure_field_array<$max_secure_field_array;$secure_field_array++) { if ( $processor_data[$secure_field_array] ) { $temp = $secure_field_array - 19; push(@secure_field,"$processor_data[$secure_field_array]"); } } if ($something eq "something") { &diagnostics; print "Content-type: text/html\n\n"; print "Congratulations! You've successfully uploaded the Dansie Shopping Cart and chmoded the permissions 755 or better, but the cart can't find your lang.dat file at system path: \"$lang_path\" "; print "Make sure lang.dat is uploaded into the same directory as vars.dat "; &footer; } } sub add_and_redirect { if ( $add_and_redirect == 2 ) { $force_no_script = 1; } if ($FORM{'return'}) { $redirect = "$FORM{'return'}"; } else { $redirect = "$path4"; } print "Content-type: text/html\n\n"; print "\n"; if (!$force_no_script) { print "\n"; } print "\n"; print " \n$meta_tag\n"; print "\n"; if (!$force_no_script) { print " \n\n"; } if (!$force_no_script) { print "\n"; } if (!$force_no_script) { print "\n"; } else { print "\n"; } if (!$force_no_script) { print "\n\n"; } print " $lang[100] \n"; if (!$force_no_script) { print " \n\n"; } print "\n"; print ""; exit; } sub i_check { &calculate_fulltotal; $total =~ s/ //g; if ( $exchange_rate ) { $total /= $exchange_rate; } $n = 0; $memo = ""; foreach $item (@items) { if ( $n > 1 ) { ($a,$trash) = split(/$delimiter2/,$item); $memo = "$memo$a,"; } $n++; } chop($memo); $biz_temp = "$bizname"; $biz_temp =~ s/<([^>]|\n)*>//g; $memo = "$biz_temp - $memo"; $memo =~ s/ /\+/g; $memo =~ s/(\&)/and/g; $memo =~ s/(\=)/is/g; if ( $option4 =~ /^(ValidCheck)/i ) { $temp_url = "$ValidCheck?VID=$i_check_id\&TA=$total\&Memo=$memo"; } else { $temp_url = "$i_check?id=$i_check_id\&a=$total\&url=$i_checkApprovedURL\&memo=$memo&$icheck_currency"; } $biz_temp = "$bizname"; $biz_temp =~ s/<([^>]|\n)*>//g; print "Content-type: text/html\n\n"; print " $biz_temp - $lang[71] \n$meta_tag\n "; exit; } sub non_post_secure_server { $biz_temp = "$bizname"; $biz_temp =~ s/<([^>]|\n)*>//g; print "Content-type: text/html\n\n"; print " $biz_temp - $lang[71] \n$meta_tag\n "; exit; } sub check_duplicate_order { if ( $ip_or_cookie == 1 ) { &GetCookies("$cookie_name2"); $shopper_id = "$Cookies{$cookie_name2}"; if ( ( !-e "$path1/$shopper_id$ext" ) && (!-e "$path1/$ENV{'REMOTE_HOST'}$ext") ) { &list_items; exit; } } else { $shopper_id = "$ENV{'REMOTE_HOST'}"; if ( !-e "$path1/$shopper_id$ext" ) { &list_items; exit; } } } sub check_duplicate_order2 { if ( $ip_or_cookie == 1 ) { &GetCookies("$cookie_name2"); $shopper_id = "$Cookies{$cookie_name2}"; if ( ( !-e "$path1/$shopper_id$ext" ) && (!-e "$path1/$ENV{'REMOTE_HOST'}$ext") ) { if ( $path5 =~ /(\?atsbank)/i ) { $temp_path = "$path3"."?"."$ENV{'QUERY_STRING'}"; print "Location: $temp_path\n\n"; exit; } elsif ( $path5 =~ /(merchantonline\.com)/i && $FORM{'passthru1'} ) { $virtual_browser_cookie = "$FORM{'passthru1'}"; } else { &list_items; exit; } } } else { $shopper_id = "$ENV{'REMOTE_HOST'}"; if ( !-e "$path1/$shopper_id$ext" ) { if ( $path5 =~ /(\?atsbank)/i ) { $temp_path = "$path3"."?"."$ENV{'QUERY_STRING'}"; print "Location: $temp_path\n\n"; exit; } elsif ( $path5 =~ /(merchantonline\.com)/i ) { $shopper_id = "$FORM{'passthru1'}"; } else { &list_items; exit; } } } } sub order_tracking { if (!$tracking_dir) { $tracking_dir = "$vars"; $a = ""; until ($a eq "/" || $tracking_dir eq "") { $a = chop($tracking_dir); } $tracking_dir = "$tracking_dir/tracking.dat"; if (!-e "$tracking_dir") { $tracking_dir = ""; } } if ($tracking_dir) { &get_shoppers_items; if ( $items[1] =~ /\n$/ ) { chop($items[1]); } ($tracking[9],$tracking[1],$trash,$tracking[7],$trash,$coupon_amount,$coupon_number) = split(/$delimiter2/,$items[0]); ($tracking[2],$company_temp,$tracking[11],$tracking[12],$tracking[13],$tracking[14],$tracking[15],$tracking[4],$tracking[3]) = split(/$delimiter2/,$items[1]); if ($company_temp) { $tracking[2] .= " - $company_temp"; } &calculate_fulltotal; $tracking[5] = "$total"; $tracking[6] = "$ship_total"; $tracking[10] = "$taxes"; $tracking[10] = sprintf("$decimals","$tracking[10]"); $n = 0; $memo = ""; foreach $item (@items) { if ( $n > 1 ) { ($a,$trash,$trash,$trash,$temp_quantity) = split(/$delimiter2/,$item); (@temp) = split(/$delimiter2/,$item); $trash = shift(@temp); $trash = shift(@temp); $trash = shift(@temp); $trash = shift(@temp); $trash = shift(@temp); $temp_custom_options = join("::", @temp); while ( $temp_custom_options =~ /(::::)/ ) { $temp_custom_options =~ s/(::::)/::/g; } while ( $temp_custom_options =~ /(:)$/ ) { chop($temp_custom_options); } if ( $temp_custom_options =~ /(\n)$/ ) { chop($temp_custom_options); } $temp_custom_options =~ s/\,//g; if ($temp_custom_options) { $temp_custom_options = "::$temp_custom_options"; } $temp_lang = "$lang[107]"; if ( ($lang[107]) && ($item !~ /$temp_lang/) ) { if ($temp_quantity > 1) { $memo .= "$a(Quantity: $temp_quantity)$temp_custom_options,"; } else { $memo .= "$a$temp_custom_options,"; } } else { } } $n++; } chop($memo); $tracking[8] = "$memo"; open(TRACKING,">>$tracking_dir"); print TRACKING "$tracking[1]$delimiter$tracking[2]$delimiter$tracking[3]$delimiter$tracking[4]$delimiter$tracking[5]$delimiter$tracking[6]$delimiter$tracking[7]$delimiter$tracking[8]$delimiter$tracking[9]$delimiter$tracking[10]$delimiter$tracking[11]$delimiter$tracking[12]$delimiter$tracking[13]$delimiter$tracking[14]$delimiter$tracking[15]$delimiter$purchase_method2\n"; close(TRACKING); } } sub diagnostics { if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "env") ) { print "Content-type: text/html\n\n"; print "\%ENV Environment variables: "; foreach $key (sort { $a cmp $b } keys %ENV ) { print "$key = $ENV{$key} \n"; } print "Perl Version: $] \n"; print "Sendmail?: $mailprog \n"; print "Dansie Shopping Cart version: $version \n"; exit; } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "path") ) { if ($ENV{'PATH_TRANSLATED'} || $ENV{'OS'}) { if ($ENV{'PATH_TRANSLATED'}) { $windows_path = $ENV{'PATH_TRANSLATED'}; $windows_path = $ENV{'PATH_TRANSLATED'}; } if ($ENV{'DOCUMENT_ROOT'}) { $temp = "$ENV{'DOCUMENT_ROOT'}"; while ($temp =~ /[\\|\/]$/) { chop($temp); } if (!-e "$temp$ENV{'SCRIPT_NAME'}") { $a = ""; until ($a eq "/" || $a eq "\\" || $temp eq "") { $a = chop($temp); } } $windows_path = "$temp$ENV{'SCRIPT_NAME'}"; $windows_path = "$temp$ENV{'SCRIPT_NAME'}"; } $windows_path =~ s/\\/\//g; $a = ""; until ( !$windows_path || $a eq "/" ) { $a = chop($windows_path); } if (!-e "$windows_path") { $windows_path = "I don't know the system path. Ask your host. =)"; } } if ($ENV{'DOCUMENT_ROOT'} && !$ENV{'OS'}) { $path = `pwd`; if (!-e "$path") { $path = "$ENV{'DOCUMENT_ROOT'}$ENV{'SCRIPT_NAME'}"; } if (!-e "$path") { $path = "$ENV{'SCRIPT_FILENAME'}"; } $a = ""; until ( !$path || $a eq "/" ) { $a = chop($path); } if (!-e "$path") { $path = "I don't know the system path. Ask your host. =)"; } } if (!$ENV{'DOCUMENT_ROOT'} && !$ENV{'OS'} ) { $windows_95_path = "$ENV{'PATH'}"; while ( $windows_95_path =~ /;/ ) { chop($windows_95_path); } $windows_95_path .= "$ENV{'SCRIPT_NAME'}"; $windows_95_path =~ s/\\/\//g; $a = ""; until ( !$windows_95_path || $a eq "/" ) { $a = chop($windows_95_path); } if (!-e "$windows_95_path") { $windows_95_path = "I don't know the system path. Ask your host. =)"; } } print "Content-type: text/html\n\n"; print "$path "; print "$windows_path "; print "$windows_95_path "; if ($vars_variable_set) { print "You have set \$vars to: \"$vars_variable_set\""; } exit; } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "vars") ) { if (!$find_vars_loop) { $find_vars_loop = 1; &cant_find_vars; open(VARS,"$vars"); if ($flock) { flock(VARS, 2); } @vars = ; if ($flock) { flock(VARS, 8); } close(VARS); print "Content-type: text/html\n\n"; foreach $line (@vars) { chop($line); $line =~ s/\\</g; print "$line \n"; } exit; } } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "fix_vars") ) { if (!$find_vars_loop) { $find_vars_loop = 1; &cant_find_vars; open(VARS,"$vars"); if ($flock) { flock(VARS, 2); } @vars = ; if ($flock) { flock(VARS, 8); } close(VARS); &fix_vars; exit; } } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "count_vars") ) { if (!$find_vars_loop) { $find_vars_loop = 1; &cant_find_vars; open(VARS,"$vars"); if ($flock) { flock(VARS, 2); } @vars = ; if ($flock) { flock(VARS, 8); } close(VARS); &count_vars; exit; } } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "lang") ) { if (!$find_lang_loop) { $find_lang_loop = 1; &find_lang; open(LANG,"$lang_path"); @lang = ; close LANG; print "Content-type: text/html\n\n"; foreach $line (@lang) { chop($line); $line =~ s/\\</g; print "$line \n"; } exit; } } if ( (!$vars_security) && ($ENV{'QUERY_STRING'} eq "processor") ) { if (!$find_vars_loop) { $find_vars_loop = 1; &cant_find_vars; $processor_path = "$vars"; $a = ""; until ($a eq "/" || $processor_path eq "") { $a = chop($processor_path); } $processor_path = "$processor_path/processor.dat"; if (-e "$processor_path") { open(PRO,"$processor_path"); if ($flock) { flock(PRO, 2); } @processor = ; if ($flock) { flock(PRO, 8); } close(PRO); print "Content-type: text/html\n\n"; foreach $line (@processor) { chop($line); $line =~ s/\\</g; print "$line \n"; } } else { print "Content-Type: text/html\n\n"; print "No processor.dat file found at this location: $processor_path\n"; } exit; } } &cp; } sub parse_form_data { if ($ENV{'OS'}) { sysread(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } else { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $value =~ s/$delimiter2/ /g unless ( ($name =~ /^return$/i) || ($name =~ /^multi-item/i) || ($name =~ /($delimiter2)(merchant)($delimiter2)/i) ); if ($name eq "comments") { $value =~ s/\r//g; chop($value) while ( $value =~ /\n$/ ); $value =~ s/\n/$br_sub/g; } if ($name eq "return") { $value =~ s/\%3F/\?/g; $value =~ s/\%3D/\=/g; $value =~ s/\%26/\&/g; } if ($name =~ /^(custom)/i) { $value =~ s/\r\n/$br_sub/g; $value =~ s/\n/$br_sub/g; $value =~ s/\r/$br_sub/g; } $FORM{$name} = $value; $FORM{$name} = &untaint($FORM{$name}); } if ( $ENV{'QUERY_STRING'} =~ /^(name=)/ || ($ENV{'QUERY_STRING'} =~ /^(db=)/i) ) { $ENV{'REQUEST_METHOD'} = "POST"; if ( $ENV{'QUERY_STRING'} =~ /^(name=)/) { $FORM{'add'} = "1"; } @pairs = split(/&/, $ENV{'QUERY_STRING'}); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ s/\+/ /g; $value =~ s/\+/ /g; $value =~ s/~!/ ~!/g; $value =~ s/$delimiter2/ /g unless ( ($name =~ /^return$/i) || ($name =~ /^multi-item/i) || ($name =~ /($delimiter2)(merchant)($delimiter2)/i) ); $FORM{$name} = $value; $FORM{$name} = &untaint($FORM{$name}); } } } sub paper_font_color { $font1 = "$paper_font_color"; $font2 = "$paper_font_color"; $wp = ""; $bgcolor = "#FFFFFF"; if ( $paper_wp =~ /^(http)/ ) { $wp = "$paper_wp"; } if ( $paper_wp =~ /^\#/ ) { $bgcolor = "$paper_wp"; } } sub symbol2 { if ( $symbol =~ /^d/i || $symbol =~ /^s/i || $symbol =~ /^w/i ) { $symbol2 = "$symbol"; } else { $symbol2 = "$symbol"; $symbol2 =~ s/\$/\\\$/; } } sub home { if ( $home ) { if ( $home !~ /^(http)/ ) { $home = "$base_img_url/" . "$home"; } print " \n"; } else { print "$lang[80] \n"; } } sub put_item_names_together { $n = 0; $extra_description = ""; foreach $item (@items) { if ( $n > 1 ) { ($a,$trash) = split(/$delimiter2/,$item); $extra_description = "$extra_description$a, "; } $n++; } chop($extra_description); chop($extra_description); $extra_description = ": $extra_description"; } sub put_item_names_together2 { $is_currency = "$card_types"; $n = 0; $extra_description = ""; $total = 0; foreach $item (@items) { if ( $n > 1 ) { $nn = $n-1; @stuff = split(/$delimiter2/,$item); @customs = (@stuff); for($i=1;$i<=5;$i++) { shift(@customs); } $quantity = $stuff[4]; $price_calc = $stuff[1]; &price_calc; $item_total = $each * $quantity; if ($item =~ /\#non.*taxable\#/i) { $nontaxable += $item_total; } $total += $item_total; $extra_description .= "$each" . '::' . "$quantity" . '::' . "Prod$nn" . '::' . "$stuff[0]" . '::' . "$is_currency|"; } $n++; } $lang[116] =~ s/\://g; $lang[108] =~ s/\://g; if ( $coupon_amount ) { &coupon_amount; $nn++; $temp -= ($temp * 2); $extra_description .= "$temp" . '::' . "1" . '::' . "Prod$nn" . '::' . "$lang[116] ($coupon_amount)" . '::' . "$is_currency|"; } &webstore_discount; if ( $discount_amount ) { $total -= $discount_amount; if ( $nontaxable ) { $nontaxable -= $discount_amount; } $nn++; $discount_amount -= ($discount_amount * 2); $extra_description .= "$discount_amount" . '::' . "1" . '::' . "Prod$nn" . '::' . "$lang[108] ($disc_percent\%)" . '::' . "$is_currency|"; } $lang[44] =~ s/\://g; $lang[56] =~ s/\://g; $nn = $n-2; if ( $state ) { $nn++; $taxes = sprintf("$decimals","$taxes"); $taxes =~ s/ //g; $extra_description .= "$taxes" . '::' . "1" . '::' . "Prod$nn" . '::' . "$lang[44]" . '::' . "$is_currency|"; } if ( $ship_allow ) { $nn++; $extra_description .= "$ship_total" . '::' . "1" . '::' . "Prod$nn" . '::' . "$lang[56]" . '::' . "$is_currency|"; } chop($extra_description); $extra_description =~ s/<([^>]|\n)*>//g; } sub cant_find_vars { if (!-e "$vars") { &diagnostics; print "Content-type: text/html\n\n"; print "Congratulations! You've successfully uploaded the Dansie Shopping Cart and chmoded the permissions 755 or better, but the cart can't find your vars.dat file at system path: \"$vars\" "; print "Make sure vars.dat is uploaded into the same directory as cart.pl "; &footer; } } sub fix_vars { while(!$complete) { $n = 2; $still_searching = 1; while ( $still_searching ) { $still_searching = 0; foreach $line (@vars) { if ( ($line =~ /^(###)(.*?)(1\s)(.*?)(-->)/) && ($line eq "$vars[0]") ) { $line =~ s/^(###)(.*?)(1\s)(.*?)(-->)/$1$2\n$3$4$5/; $n = 2; } if ( $line =~ /(###)(.*?)(1\s.*)/ && $line !~ /^###/ ) { $line =~ s/(###)(.*?)(1\s.*)/\n$1$2\n$3/; $n = 2; } if ( $line =~ /(###)(.*?)$/ && $line !~ /^###/ && $line !~ /(.+)\n(.+)/ ) { $line =~ s/(###)(.*?)/\n$1$2/; $n = 2; } if ( $line =~ /^(###)/) { $n = 2; } $nn = $n-1; if ( $line =~ /^($nn\s)(.*?)(-->)(.*?)($n)(\s)/ ) { $line =~ s/^($nn\s)(.*?)(-->)(.*?)($n)(\s)/$1$2$3$4\n$5$6/; } if ( $line =~ /^($nn\s)/ ) { $n++; } if ( $n > 100 ) { $still_searching = 0; } } } @vars2 = (); foreach $line (@vars) { @temp = split(/\n/,$line); push(@vars2,@temp); } if ( @vars eq @vars2 ) { $complete = 1; } @vars = @vars2; } print "Content-Type: text/html\n\n\n"; foreach $line (@vars) { if ($line =~ /\n/) { chop($line); } print "$line\n"; } } sub count_vars { print "Content-Type: text/html\n\n\n"; $temp = ""; $n = 0; foreach $line (@vars) { $line =~ s/\</g; if ( $line =~ /^###/ ) { $n = 0; while ($line =~ /\n/) { chop($line); } $temp .= "$n - $line\n"; $n++; } elsif ($line =~ /-->/) { while ($line =~ /\n$/) { chop($line); } $temp .= "$n - $line\n"; $n++; } elsif ($line !~ /^\n$/) { while ($temp =~ /\n$/) { chop($temp); } while ($line =~ /\n$/) { chop($line); } $temp .= " $line\n"; } } print "$temp\n"; } sub find_lang { if ( !$lang_path ) { $lang_path = "$vars"; $a = ""; until ($a eq "/" || $lang_path eq "") { $a = chop($lang_path); } $lang_path = "$lang_path/lang.dat"; } if (!-e "$lang_path") { $lang_path = "$script_root/lang.dat"; } if ($lang_path =~ /^http/i) { &diagnostics; print "Content-type: text/html\n\nDansie Shopping Cart configuration message: Please leave Host Variable #10 in your vars.dat file blank. "; &footer; } if (!-e "$lang_path") { &diagnostics; print "Content-type: text/html\n\n"; print "Congratulations! You've successfully uploaded the Dansie Shopping Cart and chmoded the permissions 755 or better, but the cart can't find your lang.dat file at system path: \"$lang_path\" "; print " Make sure lang.dat is uploaded into the same directory as vars.dat "; &footer; } open(LANG,"$lang_path"); @lang = ; close LANG; $current_lang = 0; @lang2 = (); foreach (@lang) { while ($_ =~ /(\n|\r|\s)$/) { chop($_); } $_ =~ s/'/`/g; $_ =~ s/\\`/'/g; if ( $_ =~ /(\s?)(\d+)(.*)(-->)(.*)/ ) { $lang2[$2] = "$5"; $current_lang = $2; } else { $lang2[$current_lang] .= " $_"; } } (@lang) = (@lang2); $lang[111] =~ s/(\)//gi; } sub check_mailprog { if (!$mailprog) { print "However your hosts sendmail program couldn't be automatically detected. This is likely if you are on a Windows NT host. If your host is Unix, ask them what the system path to sendmail is and set that in Host Variable #6 in your vars.dat file. If your host is Windows NT, ask them what the system path is to either Windmail or Blat. The Dansie Shopping Cart works with Windmail or Blat on NT hosts. The correct system path needs to be set in Host Variable #6 in order for the Dansie Shopping Cart to be able to email the orders to you. See Host Variable #6 in the ReadMe for complete details. "; } $mailprog_t = "$mailprog"; if ( ($mailprog) && (!-e "$mailprog") && ($mailprog ne "off") && ($mailprog ne "blat.exe") && ($mailprog ne "windmail.exe") && ($mailprog ne "windmail -t") && ($mailprog ne "sendmail") && ($mailprog !~ /(sendmail.exe -t)/) ) { print "This is a warning message only. It appears that the system path to your hosts sendmail program is not set correctly in Host Variable #6 in your vars.dat file. The correct system path needs to be set in Host Variable #6 in order for the Dansie Shopping Cart to be able to email the orders to you. See Host Variable #6 in the ReadMe for complete details. "; } if ($mailprog eq "off") { $mailprog = ""; } } sub coupon_amount { until ( $coupon_amount =~ /\d$/ || $coupon_amount =~ /\%$/ ) { chop($coupon_amount); } $coupon_amount = reverse($coupon_amount); until ( $coupon_amount =~ /\d$/ || $coupon_amount =~ /\%$/ ) { chop($coupon_amount); } $coupon_amount = reverse($coupon_amount); if ( $coupon_amount =~ /\%$/ ) { $temp = $coupon_amount; chop($temp); $temp = ( $total * ($temp / 100) ); } else { $temp = $coupon_amount; $coupon_amount = "$symbol $coupon_amount"; if ( $temp > $total ) { $temp = $total; } } $temp = sprintf("$decimals", $temp); $coupon_amount_shipping_calculation = "$temp"; $total -= $temp; if ( $nontaxable ) { $nontaxable -= $temp; } if ( $coupon_discount == 2 ) { $webstore_discount = ""; } } sub authorized_referrers { if ($authorized_referrers) { $http_referer = "$ENV{'HTTP_REFERER'}"; $http_referer =~ s/(http:\/\/)//i; $http_referer =~ s/(https:\/\/)//i; while ( $http_referer =~ /\// ) { chop($http_referer); } $pass_through = 0; foreach (@authorized_referrers) { if ( $http_referer =~ /($_)/ ) { $pass_through = 1; } } if (!$pass_through) { $authorized_referrers_message = 1; &list_items; exit; } } } sub currency_sep { if ($currency_sep) { $currency_sep_total = "$currency_sep_total"; $intnum = int($currency_sep_total); $dec_temp = $currency_sep_total - $intnum; $dec_temp *= (10**$decimals2); $decimals_temp = '%' . "$decimals2" . '.0f'; $dec_temp = sprintf("$decimals_temp",$dec_temp); $dec_temp =~ s/ //g; if ($dec_temp == 100) { $dec_temp = 0; $intnum ++; } while ( length($dec_temp) < $decimals2 ) { $dec_temp = "0" . "$dec_temp"; } for($i=1;$i<=length(int($currency_sep_total))/3;$i++) { if ($currency_sep_total >= (1000**$i) ) { $intlen = length($intnum); $temp1 = int($intnum/1000); $temp2 = substr($intnum,$intlen-(($i*4)-1),$intlen); $intnum = "$temp1" . "$currency_sep" . "$temp2"; } } if ($decimals2) { $currency_sep_total = "$intnum" . "." . "$dec_temp"; } else { $currency_sep_total = "$intnum"; } } } sub wrap { my $paragraph = "$_[0]"; my $wrap_length = "$_[1]"; my @lines = split(/\n/,$paragraph); my $line = ""; foreach $line (@lines) { if ( length($line) > $wrap_length ) { $line =~ s/(\S{$wrap_length})/$1\n/gi; $line =~ s/(.{0,$wrap_length})(\s|\n|$)/$1\n/gi; } while ($line =~ /\n\n$/) { chop($line); } if ($line !~ /\n$/) { $line .= "\n"; } } $paragraph = join(/\n/,@lines); return $paragraph; } sub foreign_character_replace { $_ = "$_[0]"; tr/ŠšŸÀÁÂÃÄÅÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝàáâãäåçèéêëìíîïðñòóôõöùúûüýÿ/SsYAAAAAACEEEEIIIINOOOOOUUUUYaaaaaaceeeeiiiionooooouuuuyy/; tr/ÜÜÝÝßßúúüüþþÞÞýýò/ÁáÅåÉéÉéÏïÙùÇçÕõÓ/; return $_; } sub redirect_mall_merchant { ($trash,$new_url) = split(/\s/,$vars[0]); if ( $ENV{'REQUEST_METHOD'} =~ /get/i ) { $redirect = "$new_url" . "?" . "$ENV{'QUERY_STRING'}"; print "Location: $redirect\n\n"; exit; } if ( $ENV{'REQUEST_METHOD'} =~ /post/i ) { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s/~!/ ~!/g; $FORM{$name} = $value; } print "Content-Type: text/html\n\n"; print "\n\n"; print "\n"; print "\n\n"; exit; } } sub cp { $d=&cp2("kte3cv"); if (!$script_root2) { $b=$vars; $a=""; until ($a eq "/" || $b eq "") { $a=chop($b); } if ($FORM{'merchant'}) { $a=""; until ($a eq "/" || $b eq "") { $a=chop($b); } } $c=reverse($path3); $a=""; until ($c !~ /\// || $c eq "") { $a=chop($c); } $c=reverse($c); $a="$b"."/"."$c"; if ( $a =~ /(cmd)$/i ) { $a =~ s/(.+)(\.)(.+)/$1$2pl/; } } else { $a="$script_root2"; } if (-e"$a") { open(CART,"$a"); @items=; close CART; $temp = "@items"; while ( $temp =~ /($d)/gi ) { $cp++; } } @cp = ('3zmck_dit33@5zn', 'kte3cv', 'mz5tm9z38', 'xl6@1@1@x'); @cp2 = (@cp); $b = &cp2('g9zc36f6f'); if (($ENV{'QUERY_STRING'} eq "$b") && ($ENV{'HTTP_HOST'} !~ /($d)/)) { print "Content-Type: text/html\n\n@cp"; exit; } if ( (-e"$a") && (!-d"$a") ) { if ($cp<103) { $e = ":"; exit; } } foreach $a (@cp) { $a = &cp2($a); if ( ( $ENV{'HTTP_HOST'} =~ /($a)/i ) || ( $ENV{'SERVER_NAME'} =~ /($a)/i ) || ( $ENV{'REMOTE_ADDR'} =~ /($a)/i ) ) { $cp2 = 1; } } if ( $ENV{'DOCUMENT_ROOT'} || $ENV{'OS'} ) { if ( ($ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'}) && (!$cp2) ) { exit; } } } sub cp2 { $_ = "$_[0]"; tr/a-z0-9/gvibn9wprud2lmx8z3fa4eq15oy06sjc7kth/; tr/_/-/; tr/\@/\./; return $_; } sub merchant { } sub cambist_or_authorize_net_names { if ( $path5 =~ /(www\.authorize\.net)/i || $path5 =~ /(www\.quickcommerce\.net)/i ) { @secure_field = ("", "AMOUNT", "DESCRIPTION", "LOGIN", "", "INVOICE", "USER1", "DISABLERECEIPT", "x_Receipt_Link_URL", "TYPE", "CUSTID", "NAME", "ADDRESS", "CITY", "STATE", "ZIP", "COUNTRY", "PHONE", "EMAIL"); &put_item_names_together; $bizname = "$bizname$extra_description"; $bizname =~ s/<([^>]|\n)*>//g; ($MerchantFontColor,$MerchantFont) = split(/\-/,$invoice); if ($invoice =~ /\-/) { ($trash,$invoice) = split(/\-/,$invoice); } $invoice =~ s/ //g; $MerchantFontColor =~ s/ //g; $MerchantBgrdColor = "TRUE"; if ( $card_types =~ /^(ao)$/i ) { $MerchantUnApprovedURL = "AO"; } else { $MerchantUnApprovedURL = ""; } $secure_field[20] = "x_Version"; $custom_processor_field[1] = "2.5"; } elsif ( $path5 =~ /(secure\.authorize\.net)/i || $path5 =~ /(secure.quickcommerce.net)/i || $path5 =~ /(rtware\.net)/i ) { @secure_field = ("", "x_Amount", "x_Description", "x_Login", "x_Merchant_Email", "x_Invoice_Num", "x_Show_Form", "x_Last_Name", "x_Receipt_Link_URL", "x_Receipt_Link_Text", "x_Cust_ID", "x_First_Name", "x_Address", "x_City", "x_State", "x_Zip", "x_Country", "x_Phone", "x_Email", "MerchantReturnURL"); &put_item_names_together; $bizname = "$bizname$extra_description"; $MerchantFont = "$invoice"; $MerchantFontColor = "PAYMENT_FORM"; $MerchantUnApprovedURL = "$lang[84]"; @temp = (); ($FORM{'name2'},@temp) = split(/ /,$FORM{'name2'}); if (@temp) { $MerchantBgrdColor = "@temp"; } else { $MerchantBgrdColor = "$FORM{'name2'}"; } $secure_field[20] = "DISABLERECEIPT"; $custom_processor_field[1] = "TRUE"; $secure_field[21] = "x_Version"; $custom_processor_field[2] = "3.0"; $secure_field[22] = "x_Header_Html_Receipt"; $custom_processor_field[3] = " "; $secure_field[23] = "x_company"; $custom_processor_field[4] = "$FORM{'company2'}"; if ( $card_types =~ /^(ao)$/i ) { $secure_field[24] = "x_Type"; $custom_processor_field[5] = "AUTH_ONLY"; } } elsif ( ( $path5 =~ /(secure\.authorize\.net)/i || $path5 =~ /(secure.quickcommerce.net)/i ) && $never == 100000 ) { @secure_field = ("", "x_Amount", "x_Description", "x_Login", "x_Merchant_Email", "x_Invoice_Num", "x_Show_Form", "x_Last_Name", "x_ADC_URL", "failureURL", "x_Cust_ID", "x_First_Name", "x_Address", "x_City", "x_State", "x_Zip", "x_Country", "x_Phone", "x_Email", "MerchantReturnURL"); &put_item_names_together; $bizname = "$bizname$extra_description"; $MerchantFont = "$invoice"; $MerchantFontColor = "PAYMENT_FORM"; $MerchantUnApprovedURL = "$lang[84]"; ($FORM{'name2'},$MerchantBgrdColor) = split(/ /,$FORM{'name2'}); if (!$MerchantBgrdColor) { $MerchantBgrdColor = "$FORM{'name2'}"; } $secure_field[20] = "x_Version"; $custom_processor_field[1] = "3.0"; $secure_field[21] = "x_ADC_Relay_Response"; $custom_processor_field[2] = "TRUE"; $secure_field[22] = "USER1"; $custom_processor_field[3] = "$invoice"; } elsif ( $path5 =~ /(www\.1internetave\.com)/i ) { @secure_field = ("", "sessionID", "MerchantName", "customerID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "ref_num", "name", "address", "city", "state", "zip", "BillCountry", "BillPhone", "BillEmail"); $total *= 10000; $total += 2561024512; } elsif ( $path5 =~ /(internetsecure\.com)/i ) { @secure_field = ("", "Products", "MerchantName", "MerchantNumber", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "ReturnURL", "unapproved", "customerid", "xxxName", "xxxAddress", "xxxCity", "xxxProvince", "xxxPostal", "xxxCountry", "xxxPhone", "xxxEmail"); &put_item_names_together2; $total = "$extra_description"; $secure_field[50] = "xxxCompany"; } elsif ( $path5 =~ /(ctrldvcs\.com)/i || $path5 =~ /(eprocessingnetwork\.com)/i ) { @secure_field = ("", "fulltotal", "MerchantName", "MerchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail"); } elsif ( $path5 =~ /(commercepay\.com)/i ) { @secure_field = ("", "amount", "MerchantName", "cpid", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "resulturl", "MerchantUnApprovedURL", "orderid", "name", "address", "city", "state", "zip", "country", "user1", "custemail"); $invoice =~ s/ //g; $invoice =~ s/-//g; } elsif ( $path5 =~ /(secure\.vanserv\.com)/i ) { @secure_field = ("", "P", "N", "MID", "MerchantEmail", "T", "Q", "D", "MerchantApprovedURL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail"); &put_item_names_together; $MerchantFont = "No"; $MerchantFontColor = "1"; ($bizname,$MerchantBgrdColor) = split(/\:/,$bizname); } elsif ( $path5 =~ /(www\.eft\.com)/i ) { @secure_field = ("", "Submit_Amount", "Submit_Description", "Submit_MerchantID", "MerchantEmail", "Submit_Response_Action", "Submit_Text_Color", "Submit_Back_Color", "Submit_ReturnURL_Approved", "Submit_ReturnURL_Declined", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); &put_item_names_together; $MerchantFont = "POST"; } elsif ( $path5 =~ /(\.anacom\.com)/i ) { @secure_field = ("", "fulltotal", "MerchantName", "MerchantID", "NotifyEmail", "direct", "MerchantFontColor", "MerchantBgrdColor", "returnlink", "MerchantUnApprovedURL", "ordernumber", "ccname", "baddress", "bcity", "bstate", "bzip", "bcountry", "bphone", "email", "MerchantReturnURL"); $MerchantFont = "no"; $secure_field[20] = "autoredirect"; $custom_processor_field[1] = "yes"; } elsif ( $path5 =~ /(nobil\.com)/i ) { @secure_field = ("", "amt", "MerchantName", "merchID", "MerchantEmail", "NSUBMIT", "MerchantFontColor", "MerchantBgrdColor", "successurl", "failurl", "mtID", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); $MerchantFont = "Submit"; $total =~ s/ //g; } elsif ( $path5 =~ /(e-plastic\.com)/i ) { @secure_field = ("", "amount", "MerchantName", "merchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "orderID", "billName", "shipAddress", "shipCity", "shipState", "shipZip", "shipCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); } elsif ( $path5 =~ /(secureweb\.outreach\.com)/i ) { @secure_field = ("", "chargetotal", "MerchantName", "storename", "MerchantEmail", "mode", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "oid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); $MerchantFont = "payonly"; } elsif ( $path5 =~ /(\?atsbank)/i ) { @secure_field = ("", "amount", "MerchantName", "atsid", "MerchantEmail", "action", "MerchantFontColor", "MerchantBgrdColor", "accepturl", "declineurl", "customerid", "ccname", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); $total =~ s/ //g; } elsif ( $path5 =~ /(merchantonline\.com)/i ) { @secure_field = ("", "trans_amount", "ALIAS", "account", "MerchantEmail", "mode", "lastname", "MerchantBgrdColor", "next_url", "MerchantUnApprovedURL", "username", "firstname", "address1", "city", "state", "zip", "country", "home_phone", "email", "MerchantReturnURL"); $MerchantFont = "remote"; ($FORM{'name2'},$MerchantFontColor) = split(/ /,$FORM{'name2'}); if (!$MerchantFontColor) { $MerchantFontColor = "$FORM{'name2'}"; } $secure_field[20] = "user1"; $custom_processor_field[1] = "POST"; $secure_field[21] = "passthru1"; $custom_processor_field[2] = "$shopper_id"; } elsif ( $path5 =~ /(secureweb\.clearcommerce\.com)/i || $path5 =~ /(linkpt\.net)/i ) { @secure_field = ("", "chargetotal", "bcompany", "storename", "MerchantEmail", "mode", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "USERID", "bname", "baddr1", "bcity", "bstate", "bzip", "bcountry", "phone", "email", "MerchantReturnURL"); $MerchantFont = "payplus"; $MerchantFont = "payonly"; $secure_field[20] = "bstate2"; $custom_processor_field[1] = "$FORM{'state2'}"; $secure_field[21] = "bcountry2"; $custom_processor_field[2] = "$FORM{'country2'}"; $secure_field[22] = "sstate2"; $custom_processor_field[3] = "$FORM{'state2'}"; $secure_field[23] = "scountry2"; $custom_processor_field[4] = "$FORM{'country2'}"; } elsif ( $path5 =~ /(secure\.redi-check\.com)/i || $path5 =~ /(itransact\.com)/i || $path5 =~ /(paymentclearing\.com)/i ) { @secure_field = ("", "1-cost", "mername", "vendor_id", "1-qty", "acceptcards", "ret_mode", "last_name", "ret_addr", "MerchantUnApprovedURL", "1-desc", "first_name", "address", "city", "state", "zip", "country", "phone", "email", "home_page"); $MerchantFont = "1"; if ( $card_types =~ /(post)/i ) { $MerchantFontColor = "post"; } if ( $card_types =~ /(redirect)/i ) { $MerchantFontColor = "redirect"; } if ( $card_types eq "" ) { $secure_field[6] = ""; } if ( $card_types =~ /(acceptchecks)/i ) { $secure_field[20] = "acceptchecks"; $custom_processor_field[1] = "1"; } $temp = "$FORM{'name2'}"; $temp = reverse($temp); while ($temp =~ /\s/) { chop($temp); } $temp = reverse($temp); $MerchantBgrdColor = "$temp"; $temp = "$FORM{'name2'}"; if ( $temp =~ /\s/ ) { until ( $a eq " " ) { $a = chop($temp); } $FORM{'name2'} = "$temp" ; } if (!$MerchantBgrdColor) { $MerchantBgrdColor = "$FORM{'name2'}"; } $invoice = "$lang[57]"; $email_cc_numbers = "1"; $total =~ s/ //g; if ($ssl_target_page) { $cambist_back = "$ssl_target_page"; } else { $cambist_back = "$path4"; } } elsif ( $path5 =~ /(ValidCheck\.com)/i ) { @secure_field = ("", "TA", "MerchantName", "VID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL"); $MerchantID = "$i_check_id"; } elsif ( $path5 =~ /(secure\.gorealtime\.com)/i ) { @secure_field = ("", "Amount", "MerchantName", "EPP_ID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "ReturnURL", "ReturnURL_FALSE", "InvoiceNum", "buyerName", "buyerAdd1", "buyerCity", "buyerST", "buyerZIP", "BillCountry", "BillPhone", "buyerEmail", "MerchantReturnURL"); } elsif ( $path5 =~ /(secure\.bises\.org)/i ) { @secure_field = ("", "fee", "MerchantName", "client", "cliemail", "rn1", "MerchantFontColor", "MerchantBgrdColor", "url", "MerchantUnApprovedURL", "refno1", "name", "addr", "city", "state", "code", "country", "phone", "email", "MerchantReturnURL"); $MerchantFont = "d"; $FORM{'address2'} .= "\n$FORM{'city2'}\n$FORM{'state2'}\n$FORM{'zip2'}\n$FORM{'country2'}"; } elsif ( $path5 =~ /(secpay\.com)/i ) { @secure_field = ("", "amount", "MerchantName", "merchant", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "callback", "MerchantUnApprovedURL", "trans_id", "customer", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "shipping", "MerchantReturnURL"); } elsif ( $path5 =~ /(paymentprocessor\.net)/i ) { @secure_field = ("", "AMOUNT", "DESCRIPTION", "LOGIN", "", "INVOICE", "USER1", "DISABLERECEIPT", "ApprovalURL", "DeclinedURL", "CUSTID", "NAME", "ADDRESS", "CITY", "STATE", "ZIP", "COUNTRY", "PHONE", "EMAIL"); &put_item_names_together; $biz_temp = "$bizname"; $biz_temp =~ s/<([^>]|\n)*>//g; $bizname = "$biz_temp$extra_description"; ($MerchantFontColor,$MerchantFont) = split(/\-/,$invoice); if ($invoice =~ /\-/) { ($trash,$invoice) = split(/\-/,$invoice); } $invoice =~ s/ //g; $MerchantFontColor =~ s/ //g; $MerchantBgrdColor = "TRUE"; } elsif ( $path5 =~ /(chargesolutions\.com)/i ) { @secure_field = ("", "trans_amount", "ALIAS", "merchant_account", "MerchantEmail", "BASEFONT", "user1", "mode", "next_url", "MerchantUnApprovedURL", "username", "firstname", "address1", "city", "state", "zip", "country", "home_phone", "email", "lastname"); $MerchantFontColor = "remote"; $MerchantBgrdColor = "remote"; ($FORM{'name2'},$cambist_back) = split(/ /,$FORM{'name2'}); if (!$cambist_back) { $cambist_back = "$FORM{'name2'}"; } } elsif ( $path5 =~ /(mydirectpay\.cgi)/i ) { @secure_field = ("", "price", "MerchantName", "STORE_NAME", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "fulfillment_url", "failure_url", "order_id", "card_name", "card_address", "card_city", "card_state", "card_zip", "card_country", "card_phone", "card_email", "MerchantReturnURL"); } elsif ( $path5 =~ /(gochargeit\.com)/i ) { @secure_field = ("", "AMOUNT", "F_DESC", "route", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "F_TICKET", "F_CCNAME", "F_CCADDR", "F_CCCITY", "F_CCSTATE", "F_CCZIP", "BillCountry", "BillPhone", "f_email", "MerchantReturnURL"); } elsif ( $path5 =~ /(creditnet\.com)/i ) { @secure_field = ("", "trans_amount", "ALIAS", "account", "MerchantEmail", "BASEFONT", "user1", "mode", "next_url", "MerchantUnApprovedURL", "username", "firstname", "address1", "city", "state", "zip", "country", "home_phone", "email", "lastname"); $MerchantFontColor = "remote"; $MerchantBgrdColor = "remote"; ($FORM{'name2'},$cambist_back) = split(/ /,$FORM{'name2'}); if (!$cambist_back) { $cambist_back = "$FORM{'name2'}"; } $secure_field[50] = "company"; } elsif ( $path5 =~ /(signio\.com)/i ) { @secure_field = ("", "AMOUNT", "ALIAS", "LOGIN", "MerchantEmail", "mode", "lastname", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "INVOICE", "NAME", "ADDRESS", "CITY", "STATE", "ZIP", "COUNTRY", "PHONE", "EMAIL", "MerchantReturnURL"); $secure_field[20] = "MFCIsapiCommand"; $custom_processor_field[1] = "orders"; $secure_field[21] = "TYPE"; $custom_processor_field[2] = "AUTH_CAPTURE"; $secure_field[22] = "METHOD"; $custom_processor_field[3] = "CC"; if ( $FORM{'purpose2'} eq "check_transfer" ) { $secure_field[22] = "METHOD"; $custom_processor_field[3] = "ECHECK"; } } elsif ( $path5 =~ /(intermedia\.com\.pe)/i ) { @secure_field = ("", "precio", "descripcion", "cod", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "final", "retorno", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; $secure_field[20] = "editable"; $custom_processor_field[1] = "no"; $secure_field[21] = "cantidad"; $custom_processor_field[2] = "1"; $secure_field[22] = "moneda"; $custom_processor_field[3] = "1"; $secure_field[23] = "especial"; $custom_processor_field[4] = "no"; $processor_post_method = "GET"; } elsif ( $path5 =~ /(cabag\.ch)/i ) { @secure_field = ("", "price", "MerchantName", "client_id", "MerchantEmail", "MerchantFont", "currency", "MerchantBgrdColor", "ok_site", "failt_site", "session_id", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; $MerchantFontColor = "CHF"; $total *= 100; } elsif ( $path5 =~ /(secure\.hurstlinks\.net)/i ) { @secure_field = ("", "cubecarda", "MerchantName", "cubecardm", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "cubecardsuccess", "cubecardcancel", "cubecardo", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; } elsif ( $path5 =~ /(worldpay\.com)/i ) { @secure_field = ("", "cost1", "custom1", "store", "custom2", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "returnref", "extern_u2", "custom3", "name", "adr1", "adr2", "adr3", "pcde", "adr4", "custom4", "mail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; $secure_field[20] = "qty1"; $custom_processor_field[1] = "1"; $secure_field[21] = "desc1"; $custom_processor_field[2] = "$lang[57]"; $temp_symbol = "$card_types"; $secure_field[22] = "cur1"; $custom_processor_field[3] = "$temp_symbol"; $secure_field[23] = "cname"; $custom_processor_field[4] = "$temp_symbol"; $secure_field[24] = "code1"; $custom_processor_field[5] = "example"; $secure_field[25] = "max"; $custom_processor_field[6] = "10"; } elsif ( $path5 =~ /(bamart\.com)/i ) { @secure_field = ("", "ioc_order_total_amount", "MerchantName", "ioc_merchant_id", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "ioc_merchant_order_id", "", "ecom_billto_postal_street_line1", "ecom_billto_postal_city", "ecom_billto_postal_stateprov", "ecom_billto_postal_postalcode", "ecom_billto_postal_countrycode", "Ecom_BillTo_Telecom_Phone_Number", "ecom_billto_online_email", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; ($custom_processor_field[1],$custom_processor_field[2]) = split(/ /,$FORM{'name2'}); $secure_field[20] = "ecom_billto_postal_name_first"; $secure_field[21] = "ecom_billto_postal_name_last"; } elsif ( $path5 =~ /(216\.184\.194\.135)/i ) { @secure_field = ("", "Price", "MerchantName", "ID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "URL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; } elsif ( $path5 =~ /(eway\.com\.au)/i ) { @secure_field = ("", "ewayTotalAmount", "ewaySiteTitle", "ewayCustomerID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "ewayURL", "MerchantUnApprovedURL", "ewayCustomerInvoiceRef", "BillName", "ewayCustomerAddress", "BillCity", "BillState", "ewayCustomerPostcode", "BillCountry", "BillPhone", "ewayCustomerEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; ($custom_processor_field[1],$custom_processor_field[2]) = split(/ /,$FORM{'name2'}); $secure_field[20] = "ewayCustomerFirstName"; $secure_field[21] = "ewayCustomerLastName"; $total *= 100; } elsif ( $path5 =~ /(totalpay\.net)/i ) { @secure_field = ("", "tran_total_amount", "MerchantName", "mer_umid", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "sys_return_url", "MerchantUnApprovedURL", "tran_invoice_num", "cust_bill_name", "cust_bill_address1", "cust_bill_city", "cust_bill_state", "cust_bill_zip", "cust_bill_country", "cust_phone_num", "cust_email_address", "MerchantReturnURL", "", "", "", "", ""); $secure_field[20] = "sys_secure_form"; $custom_processor_field[1] = "TRUE"; $secure_field[21] = "sys_process_output"; $custom_processor_field[2] = "1"; $secure_field[22] = "sys_payment_method"; $custom_processor_field[3] = "1"; $secure_field[50] = "company"; } elsif ( $path5 =~ /(psigate\.com)/i ) { @secure_field = ("", "fulltotal", "MerchantName", "MerchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "ThanksURL", "NoThanksURL", "Userid", "Bname", "Baddr1", "Bcity", "Bstate", "Bzip", "Bcountry", "Phone", "Email", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; } elsif ( $path5 =~ /(paypal\.com)/ ) { } elsif ( $path5 =~ /(internetcash\.com)/i ) { @secure_field = ("", "IC_amount", "MerchantName", "IC_merchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "IC_merchTransID", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; $temp_item_name = "$lang[158] $invoice"; $secure_field[20] = "IC_currencyCode"; $custom_processor_field[1] = "USD"; $secure_field[21] = "IC_embeded"; $custom_processor_field[2] = "true"; $secure_field[22] = "sys_payment_method"; $custom_processor_field[3] = "1"; $secure_field[23] = "IC_description"; $custom_processor_field[4] = "$temp_item_name"; $secure_field[24] = "IC_location"; $custom_processor_field[5] = "$card_types"; } elsif ( $path5 =~ /(cambist\.com)/i || $path5 =~ /(ssl\.pl)/i || $path5 =~ /(ssl\.cgi)/i ) { @secure_field = ("", "fulltotal", "MerchantName", "MerchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; } elsif ( $path5 =~ /(securepay\.com)/i ) { @secure_field = ("", "fulltotal", "MerchantName", "MerchantID", "MerchantEmail", "MerchantFont", "MerchantFontColor", "MerchantBgrdColor", "MerchantApprovedURL", "MerchantUnApprovedURL", "customerid", "BillName", "BillStreet", "BillCity", "BillState", "BillZip", "BillCountry", "BillPhone", "BillEmail", "MerchantReturnURL", "", "", "", "", ""); $secure_field[50] = "company"; } else { print "Location: http://www.dansie.net/new_processor.html\n\n"; exit; } }