/**
  * Get the response status from the payload.
  *
  * @param  PayloadInterface $payload
  * @return integer
  */
 public function status(PayloadInterface $payload)
 {
     $status = $payload->getStatus();
     if ($status >= PayloadInterface::OK && $status < PayloadInterface::ERROR) {
         return 200;
     }
     if ($status >= PayloadInterface::ERROR && $status < PayloadInterface::INVALID) {
         return 500;
     }
     if ($status >= PayloadInterface::INVALID && $status < PayloadInterface::UNKNOWN) {
         return 400;
     }
     return 520;
 }