$cart_id = $app->getUserState( HIKASHOP_COMPONENT.'.cart_id');
if($cart_id) {
$class = hikashop_get('class.cart');
$class->delete($cart_id);
$app->setUserState( HIKASHOP_COMPONENT.'.cart_id',0);
}
$app->setUserState( HIKASHOP_COMPONENT.'.coupon_code', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_number', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_month', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_year', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_CCV', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_type', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_owner', '');
$app->setUserState( HIKASHOP_COMPONENT.'.cc_valid', 0);
$app->setUserState( HIKASHOP_COMPONENT.'.checkout_terms', 0);
$app->setUserState( HIKASHOP_COMPONENT.'.checkout_fields_ok', 0);
$app->setUserState( HIKASHOP_COMPONENT.'.checkout_fields', null);
$user = JFactory::getUser();
if($user->guest) {
$app->setUserState( HIKASHOP_COMPONENT.'.user_id', 0);
}
But it requires that the user display a page ; a server notification won't do the trick.