Hi,
print_r will still work fine. However, the problem with that is that the process needs to go successfully to the end so that the data displayed in the output is stored in the log by HikaShop. If you have something like this:
echo print_r($vars,true);
call_function_which_does_not_exists();
return;
you won't get anything in the payment log file, because PHP will generate a fatal error when trying to call call_function_which_does_not_exists, before HikaShop can log the output.
That's why we now usually use hikashop_writeToLog. This function will directly log the data provided, without waiting for anything.
If you have the line hikashop_writeToLog('test'); somewhere and you don't see anything in the payment log file, it means that your code is not being processed. The most probable is that the notification URL is not being called by the payment gateway for some reason.