That code won't confirm pending orders.
That code will send an email if the orders are confirmed, regardless of whether then payment is accepted or pending.
It's a normal modification which will be in next release of hikaShop.
If PayPal says that the payment is pending, then it means that the payment is pending. Sometimes, it takes 1 week to confirm payments with banks, and sometimes, the paypal account is confirmed to not validate the payments automatically and you have to do it yourself in PayPal. In that last case, you can change that thanks to an option in your PayPal account.
@millionairess also make sure that your website is able to send emails.