Author Topic

Tomislav Buljević

Friday 01 July 2011 3:35:43 am

Comment69157

OK, I have tried to solve my issue by myself, and I have successfully closed the workflow. But, now, when I click on the webshop link in the Administration, I get an unexpected error message. The code I used is:

$http = eZHTTPTool::instance();
$sig = $http->getVariable('sig'); 
$tid = $http->getVariable('tid'); 
$card = $http->getVariable('card');

if($tid) {
    $basket = eZBasket::currentBasket();
    $orderID = $basket->attribute('order_id');
    $order = eZOrder::fetch($orderID);
    
    $order->activate();
    $paymentObj = eZPaymentObject::fetchByOrderID($orderID);
    $workflowProcessID = $paymentObj->attribute('workflowprocess_id');
    $paymentObj->approve();
    $paymentObj->continueWorkflow($workflowProcessID);
    $http->redirect('xrowecommerce/checkout');
}

Any ideas?