Adapt changes in api

This commit is contained in:
Björn Fromme
2019-09-17 11:14:22 +02:00
parent d59748a030
commit 6079340162
4 changed files with 19 additions and 18 deletions
@@ -74,9 +74,9 @@ class AjaxFormController extends ActionController
$addressData = [
'name' => $contactForm->getName(),
'vorname' => $contactForm->getFirstName(),
'firstName' => $contactForm->getFirstName(),
'email' => $contactForm->getEmail(),
'geschlecht' => $contactForm->getGender(),
'gender' => $contactForm->getGender(),
];
$this->bookingApiService->registerAddress($addressData);
@@ -28,13 +28,13 @@ class BpnApiFinisher extends AbstractFinisher
$formValues = $this->finisherContext->getFormValues();
$addressData = [
'name' => $formValues['name'],
'vorname' => $formValues['vorname'],
'geschlecht' => $formValues['geschlecht'],
'firstName' => $formValues['vorname'],
'gender' => $formValues['geschlecht'],
'email' => $formValues['email'],
'strasse' => $formValues['strasse'],
'plz' => $formValues['plz'],
'ort' => $formValues['ort'],
'telefon' => $formValues['telefon'],
'street' => $formValues['strasse'],
'zipCode' => $formValues['plz'],
'city' => $formValues['ort'],
'phone' => $formValues['telefon'],
];
$this->bookingApiService->registerAddress($addressData);
}
@@ -2,6 +2,7 @@
namespace EP\EpTheme\Service;
use Symfony\Component\HttpClient\Exception\ServerException;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
use TYPO3\CMS\Core\SingletonInterface;
@@ -52,5 +53,7 @@ class BookingApiService implements SingletonInterface
}
catch (TransportExceptionInterface $e)
{}
catch (ServerException $e)
{}
}
}