April Mai 2019
This commit is contained in:
parent
8c514bbd4d
commit
6dbaa30791
37 changed files with 55121 additions and 310 deletions
|
|
@ -20,7 +20,7 @@ class FewoBookingSternToursCrmExporter extends SternToursCrmExporter
|
|||
parent::__construct($logger);
|
||||
}
|
||||
|
||||
public function process(FewoBookingRequest $fewoBookingRequest, FewoLodging $fewoLodging, FewoPrice $fewoPrice, $priceResult)
|
||||
public function process(FewoBookingRequest $fewoBookingRequest, FewoLodging $fewoLodging, FewoPrice $fewoPrice, $priceResult, $reservationId)
|
||||
{
|
||||
$lead = $this->createLead($fewoBookingRequest);
|
||||
if ($lead === null)
|
||||
|
|
@ -28,7 +28,7 @@ class FewoBookingSternToursCrmExporter extends SternToursCrmExporter
|
|||
$this->warn('Failed creating lead in CRM', $fewoBookingRequest, Logger::ERROR);
|
||||
return false;
|
||||
}
|
||||
$booking = $this->createBooking($fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult, $lead->travel_user_id);
|
||||
$booking = $this->createBooking($fewoBookingRequest, $fewoLodging, $fewoPrice, $priceResult, $lead->travel_user_id, $reservationId);
|
||||
if ($booking === null)
|
||||
{
|
||||
$this->warn('Failed creating booking in CRM', $fewoBookingRequest, Logger::ERROR);
|
||||
|
|
@ -88,12 +88,13 @@ class FewoBookingSternToursCrmExporter extends SternToursCrmExporter
|
|||
return $resp;
|
||||
}
|
||||
|
||||
private function createBooking(FewoBookingRequest $fewoBookingRequest, FewoLodging $lodging, FewoPrice $price, $priceResult, $travel_user_id)
|
||||
private function createBooking(FewoBookingRequest $fewoBookingRequest, FewoLodging $lodging, FewoPrice $price, $priceResult, $travel_user_id, $reservationId)
|
||||
{
|
||||
$resp = $this->httpPostAPIv3('fewo/create_fewo_booking',
|
||||
['travel_user_booking_fewo' => [
|
||||
'travel_user_id' => $travel_user_id,
|
||||
'fewo_lodging_id' => $lodging->getId(),
|
||||
'fewo_reservation_id' => $reservationId,
|
||||
'invoice_number' => '',
|
||||
'persons' => $fewoBookingRequest->getTravelerCount(),
|
||||
'adults' => $fewoBookingRequest->getTravelerCountAdult(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue