/**
  * Get notification data
  *
  * @return stdClass Notification data
  * @throws CakeException
  */
 public function getNotification()
 {
     if (!$this->Controller->request->is('post')) {
         throw new CakeException("Sermepa notification not using POST.");
     }
     $Sermepa = new Sermepa($this);
     return $Sermepa->getNotificationData($this->Controller->request->data);
 }
 /**
  * @throws CakeException
  */
 public function getNotification()
 {
     if (!$this->Controller->request->is('post')) {
         throw new CakeException("Sermepa notification not using POST.");
     }
     $Sermepa = new Sermepa($this);
     $data = $Sermepa->getNotificationData($this->Controller->request->data);
     $data = json_decode(json_encode($data), true);
     $notification = new stdClass();
     foreach ($data as $key => $value) {
         $notification->{lcfirst(str_ireplace('Ds_', '', $key))} = $data[$key];
     }
     return $notification;
 }