Shipping company UPS said Friday that it will halt deliveries from illegal online pharmacies as well as pay a $40 million fine.