[CORE] Managed case when there is no order created

Even if there is no order created (because all packages are empty, which shouldn't be happening but yet it happens, when there is problem with carrier for example), code assumes that variable $order exists and it's initialized anyway (line 411 for example,  $order->addOrderPayment), which leads to unexpected but fatal errors.
This is fast patch. One can also consider to create empty order in such case.