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