Conditions | 2 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function createShipment($shippingGateway, $shipment): void |
||
30 | { |
||
31 | $this->webClient->setShippingGateway($shippingGateway); |
||
32 | $this->webClient->setShipment($shipment); |
||
33 | |||
34 | try { |
||
35 | $requestData = $this->webClient->getRequestData(); |
||
36 | |||
37 | $this->response = $this->soapClient->createShipment($requestData, $shippingGateway->getConfigValue('wsdl')); |
||
38 | } catch (\Exception $exception) { |
||
39 | $this->flashBag->add( |
||
40 | 'error', |
||
41 | sprintf( |
||
42 | 'DHL24 Web Service for #%s order: %s', |
||
43 | $shipment->getOrder()->getNumber(), |
||
44 | $exception->getMessage() |
||
45 | ) |
||
46 | ); |
||
47 | |||
48 | return; |
||
49 | } |
||
63 |