Apply the payments appropriately.