Adapt changes in api
This commit is contained in:
@@ -74,9 +74,9 @@ class AjaxFormController extends ActionController
|
|||||||
|
|
||||||
$addressData = [
|
$addressData = [
|
||||||
'name' => $contactForm->getName(),
|
'name' => $contactForm->getName(),
|
||||||
'vorname' => $contactForm->getFirstName(),
|
'firstName' => $contactForm->getFirstName(),
|
||||||
'email' => $contactForm->getEmail(),
|
'email' => $contactForm->getEmail(),
|
||||||
'geschlecht' => $contactForm->getGender(),
|
'gender' => $contactForm->getGender(),
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->bookingApiService->registerAddress($addressData);
|
$this->bookingApiService->registerAddress($addressData);
|
||||||
|
|||||||
@@ -28,13 +28,13 @@ class BpnApiFinisher extends AbstractFinisher
|
|||||||
$formValues = $this->finisherContext->getFormValues();
|
$formValues = $this->finisherContext->getFormValues();
|
||||||
$addressData = [
|
$addressData = [
|
||||||
'name' => $formValues['name'],
|
'name' => $formValues['name'],
|
||||||
'vorname' => $formValues['vorname'],
|
'firstName' => $formValues['vorname'],
|
||||||
'geschlecht' => $formValues['geschlecht'],
|
'gender' => $formValues['geschlecht'],
|
||||||
'email' => $formValues['email'],
|
'email' => $formValues['email'],
|
||||||
'strasse' => $formValues['strasse'],
|
'street' => $formValues['strasse'],
|
||||||
'plz' => $formValues['plz'],
|
'zipCode' => $formValues['plz'],
|
||||||
'ort' => $formValues['ort'],
|
'city' => $formValues['ort'],
|
||||||
'telefon' => $formValues['telefon'],
|
'phone' => $formValues['telefon'],
|
||||||
];
|
];
|
||||||
$this->bookingApiService->registerAddress($addressData);
|
$this->bookingApiService->registerAddress($addressData);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace EP\EpTheme\Service;
|
namespace EP\EpTheme\Service;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpClient\Exception\ServerException;
|
||||||
use Symfony\Component\HttpClient\HttpClient;
|
use Symfony\Component\HttpClient\HttpClient;
|
||||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||||
use TYPO3\CMS\Core\SingletonInterface;
|
use TYPO3\CMS\Core\SingletonInterface;
|
||||||
@@ -52,5 +53,7 @@ class BookingApiService implements SingletonInterface
|
|||||||
}
|
}
|
||||||
catch (TransportExceptionInterface $e)
|
catch (TransportExceptionInterface $e)
|
||||||
{}
|
{}
|
||||||
|
catch (ServerException $e)
|
||||||
|
{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8,15 +8,13 @@ prototypeName: contactform
|
|||||||
finishers:
|
finishers:
|
||||||
-
|
-
|
||||||
identifier: BpnApiFinisher
|
identifier: BpnApiFinisher
|
||||||
options:
|
|
||||||
apiToken: foobarbaz
|
|
||||||
-
|
-
|
||||||
options:
|
options:
|
||||||
subject: 'Kontaktanfrage von {vorname} {name}'
|
subject: 'Kontaktanfrage von {firstName} {name}'
|
||||||
recipientAddress: [email protected]
|
recipientAddress: [email protected]
|
||||||
recipientName: 'E&P Reisen'
|
recipientName: 'E&P Reisen'
|
||||||
senderAddress: '{email}'
|
senderAddress: '{email}'
|
||||||
senderName: '{vorname} {name}'
|
senderName: '{firstName} {name}'
|
||||||
replyToAddress: [email protected]
|
replyToAddress: [email protected]
|
||||||
carbonCopyAddress: ''
|
carbonCopyAddress: ''
|
||||||
blindCarbonCopyAddress: ''
|
blindCarbonCopyAddress: ''
|
||||||
@@ -42,7 +40,7 @@ renderables:
|
|||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
type: Text
|
type: Text
|
||||||
identifier: vorname
|
identifier: firstName
|
||||||
label: Vorname
|
label: Vorname
|
||||||
properties:
|
properties:
|
||||||
fluidAdditionalAttributes:
|
fluidAdditionalAttributes:
|
||||||
@@ -74,7 +72,7 @@ renderables:
|
|||||||
fluidAdditionalAttributes:
|
fluidAdditionalAttributes:
|
||||||
required: required
|
required: required
|
||||||
type: SingleSelect
|
type: SingleSelect
|
||||||
identifier: geschlecht
|
identifier: gender
|
||||||
label: Gender
|
label: Gender
|
||||||
validators:
|
validators:
|
||||||
-
|
-
|
||||||
@@ -95,7 +93,7 @@ renderables:
|
|||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
type: Text
|
type: Text
|
||||||
identifier: strasse
|
identifier: street
|
||||||
label: Straße
|
label: Straße
|
||||||
properties:
|
properties:
|
||||||
fluidAdditionalAttributes:
|
fluidAdditionalAttributes:
|
||||||
@@ -104,17 +102,17 @@ renderables:
|
|||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
type: Text
|
type: Text
|
||||||
identifier: plz
|
identifier: zipCode
|
||||||
label: 'PLZ'
|
label: 'PLZ'
|
||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
type: Text
|
type: Text
|
||||||
identifier: ort
|
identifier: city
|
||||||
label: 'Ort'
|
label: 'Ort'
|
||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
type: Text
|
type: Text
|
||||||
identifier: telefon
|
identifier: phone
|
||||||
label: Telefon
|
label: Telefon
|
||||||
-
|
-
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user