Move apply customer credit logic to service.