/** * @param \OpenPayU_Result $result * @return \stdClass * @throws Exception */ protected function getResponse($result) { $response = $result->getResponse(); if (isset($response->status)) { $status = $response->status; if ((string) $status->statusCode !== 'SUCCESS') { throw new Exception(\Zend_Json::encode($status)); } } return $response; }