The PMT is calculating the period with 30 days per month, which is 360 days per year, I think this is the problem, there should be a solution for this, let me know if you have any.
What about if your starting off with a loan that already has accumulated unpaid interest? How do you calculate the monthly payment without the added interest affecting the rate that is only charged based on the principal and not the principal + interest?