I am trying to use Deneb's OCC with Mambo 4.5.3h and phpshop. I was able to install per directions but when testing after I enter the entire test CC info (Visa #4007000000027 or Visa #4111111111111111, if I enter Visa #4111111111111 I get invalid card#) I agree to Terms of Service and Click "Confirm Order" there is where I get the following error:
Fatal error: Call to a member function on a non-object in /home/glencoma/public_html/mambo/administrator/components/com_phpshop/classes/payment/ps_offlinecc.php on line 204
The following code is from lines 186 to the end (line 253), with line 204 indicated:
Something must be wrong with the $vmLogger variable? Any recommendations would be greatly appreciated.
*Update: I tried deleting the comment "//" from line 203 to see if that code was needed but I get the same error just for line 203
Code:
/**************************************************************************
** name: process_payment()
** created by: Deneb (BMS)
** description: process transaction for offline use with authorize.net
** parameters: $order_number, the number of the order, we're processing here
** $order_total, the total $ of the order
** returns:
***************************************************************************/
function process_payment($order_number, $order_total, &$d) {
//Visa Test Account 4007000000027
//Amex Test Account 370000000000002
//Master Card Test Account 6011000000000012
//Discover Test Account 5424000000000015
global $VM_LANG, $vmLogger;
//$vmLogger->debug($VM_LANG->_PHPSHOP_PAYMENT_TRANSACTION_DEBUG);
LINE 204 $vmLogger->debug('Beginning to simulate processing delay');
if (OCC_DELAY_ENABLE == TRUE){
$delay_time = 6;
sleep($delay_time);
}
//$response = array(1,1,1,1,1,1,$VM_LANG->_PHPSHOP_PAYMENT_TRANSACTION_RESPONSE);
$response = array(1,1,1,1,1,1,"Offline");
if (DEBUG) {
$_SESSION['response'] = $response; //for debug
}
// Approved - Success!
if ($response[0] == '1') {
//$d["order_payment_log"] = $VM_LANG->_PHPSHOP_PAYMENT_TRANSACTION_OFFLINE;
$d["order_payment_log"] = "PENDING: ";
$d["order_payment_log"] .= $response[3];
$vmLogger->debug( $d['order_payment_log']);
// Catch Transaction ID
$d["order_payment_trans_id"] = $response[6];
return True;
}
// Payment Declined
elseif ($response[0] == '2') {
$vmLogger->err( $response[3] );
$d["order_payment_log"] = $response[3];
// Catch Transaction ID
$d["order_payment_trans_id"] = $response[6];
return False;
}
// Transaction Error
elseif ($response[0] == '3') {
$vmLogger->err( $response[3] );
$d["order_payment_log"] = $response[3];
// Catch Transaction ID
$d["order_payment_trans_id"] = $response[6];
return False;
}
}
}
If someone could give me any recommendations, I would appreciate it. Thanks!
any ideas... ???
Just comment out that line 204...
The vmLogger is not so important here.
ciao, Soeren
thanks Soeren!
I comment out all the vmLogger lines and it works like a fine tuned machine... :D