예제 #1
0
 /**
  * Making a request to get the notification
  */
 public function notification()
 {
     $data = array('token_account' => Config::getTokenAccount(), 'token_transaction' => $this->getTokenTransaction());
     $client = $this->createClient();
     $request = $client->post(Config::getBaseURL() . Config::getNotificationURL(), array(), $data);
     $response = $this->buildXML((string) $request->send()->getBody());
     if ((string) $response->message_response->message !== 'success') {
         throw new TrayException('Notification error');
     }
     $this->setDataFromObject($response);
 }