public function repperApi($data) { // Maak nieuwe relatie $client = new \SoapClient('https://api.repper.nl/soap/1.1/RepperService.svc', array('soap_version' => SOAP_1_2)); $actionHeader[] = new \SoapHeader('http://www.w3.org/2005/08/addressing', 'Action', 'http://api.repper.nl/soap/1.1/createRelation'); $actionHeader[] = new \SoapHeader('http://www.w3.org/2005/08/addressing', 'To', 'https://api.repper.nl/soap/1.1/RepperService.svc', 1); $client->__setSoapHeaders($actionHeader); $apikey = '1a4d8cadcee34acb88c5ff7c68d11a65'; $emailAddress = $data->email; $firstName = $data->voornaam; $lastName = $data->achternaam; $createRelation = $client->CreateRelation(array('apikey' => $apikey, 'emailAddress' => $emailAddress, 'firstName' => $firstName, 'lastName' => $lastName)); $this->repperApiStapTwee($emailAddress); }