When I call the function batch_delayed_capture(see below), I issue the "$this->delayed_capture($d);" statement. Both batch_delayed_capture and delayed_capture are in the same include file. The statement works fine the first time through the loop but gives the following error "Cannot redeclare class pfp_class"(see below). I added some echo statements to help identify where the problem was occuring.
Your assistance is greatly appreciated. Paul PHP,MySQL **************************************************************************** * Array element 0= 21203749pnref= xxxx Made it to delayed capture Just after delayed capyure Array element 1= 21203748pnref= xxxx1 Fatal error: Cannot redeclare class pfp_class in /var/www/html/shop/modules/checkout/lib/_class.pfp.php on line 76 **************************************************************************** * function batch_delayed_capture(&$d) { global $auth, $ps_vendor_id; if ($d) { //echo "Inside POST\n"; while (list($lvar, $lvalue) = each($d)) { if (ereg ("^d_c_arr", $lvar, $throwaway)) { $batch_d_c[]=$d["$lvar"]; } } } $dbresponse = new ps_DB; for($i = 0; $i < sizeof($batch_d_c); $i++){ echo " Array element $i= " . $batch_d_c[$i]; $qr = "SELECT pnref from transaction_response WHERE result='0' "; $qr .= "AND order_id=$batch_d_c[$i] AND delay_capture IS NULL"; $dbresponse->query($qr); $dbresponse->next_record(); $d["pnref"]=$dbresponse->f("pnref"); echo "pnref= " . $d["pnref"]; $this->delayed_capture($d); echo "Just after delayed capyure"; } return True; } **************************************************************************** ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php