/** * Creating the temporary cary */ public function create() { $client = $this->createClient(); $request = $client->post(Config::getBaseURL() . Config::getCartURL(), array(), $this->getDataArray()); $xml = $this->buildXML((string) $request->send()->getBody()); if ((string) $xml->message_response->message !== 'success') { throw new TrayException('Notification error'); } $this->setTokenTransaction($xml->data_response->token_transaction); $this->setUrl($xml->data_response->url_car); }