PluginDir = $mosConfig_absolute_path . '/includes/phpmailer/'; //$mail->SetLanguage("en", $mosConfig_absolute_path . '/includes/phpmailer/language/'); /* load the SupaCart Language File */ if (file_exists( ADMINPATH. 'languages/'.$mosConfig_lang.'.php' )) require_once( ADMINPATH. 'languages/'.$mosConfig_lang.'.php' ); else require_once( ADMINPATH. 'languages/english.php' ); /* Moded Gotta replace this...perhaps Load the PayPal Configuration File */ require_once( CLASSPATH. 'payment/ps_worldpay.cfg.php' ); /* Load the SupaCart database class */ require_once( CLASSPATH. 'ps_database.php' ); /*** END SupaCart part ***/ /** Read in the post from worldpay. Email was used in PayPal version **/ $workstring = 'cmd=_notify-validate'; // Notify validate $i = 1; foreach ($_POST as $ipnkey => $ipnval) { if (get_magic_quotes_gpc()) // Fix issue with magic quotes $ipnval = stripslashes ($ipnval); if (!eregi("^[_0-9a-z-]{1,30}$",$ipnkey) || !strcasecmp ($ipnkey, 'cmd')) { // ^ Antidote to potential variable injection and poisoning unset ($ipnkey); unset ($ipnval); } // Eliminate the above // Remove empty keys (not values) if (@$ipnkey != '') { //unset ($_POST); // Destroy the original ipn post array, sniff... $workstring.='&'.@$ipnkey.'='.urlencode(@$ipnval); } echo "key ".$i++.": $ipnkey, value: $ipnval
"; } // Notify string $payment_status = trim(stripslashes($_POST['transStatus'])); //if $payment_status == 'Y'? $order_id = trim(stripslashes($_POST['cartId'])); $d['order_id'] = $order_id; //this identifies the order record if( $payment_status == 'Y' ){ $d['order_status'] = 'C'; //this is the new value for the database field I think X for cancelled, C for confirmed } else if( $payment_status == 'C' ){ $d['order_status'] = 'X'; //this is the new value for the database field I think X for cancelled, C for confirmed } require_once ( CLASSPATH . 'ps_order.php' ); $ps_order= new ps_order; $ps_order->order_status_update($d); } ?>