/** * 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); }
public function register() { Config::$token_account = $this->app['config']['services.tray.token_account']; Config::$environment = $this->app['config']['services.tray.environment']; }