/**
  * Update only sends payment details as you cannot edit anything else on an
  *   order from the front-end
  * @param Order $order
  * @return Order
  */
 private function update(Order $order)
 {
     $params = ['id' => $order->getId(), 'payments' => $this->compose_payments($order)];
     $result = VendirunApi::makeRequest('order/update', $params)->getData();
     return $this->find($result->order_id, false);
 }
 /**
  * @param Order|null $order
  * @return array
  */
 private function orderBreadcrumbs(Order $order = null)
 {
     $breadcrumbs = $this->homeCrumb();
     $breadcrumbs[] = ['title' => trans('vendirun::customer.account'), 'slug' => 'customer/account'];
     $breadcrumbs[] = ['title' => trans('vendirun::product.orderHistory'), 'slug' => 'customer/account/orders'];
     if ($order) {
         $breadcrumbs[] = ['title' => trans('vendirun::customer.account'), 'slug' => 'customer/account/orders/order/view/' . $order->getId()];
     }
     return $breadcrumbs;
 }
 /**
  * @param Order $order
  * @return \Illuminate\Http\RedirectResponse
  */
 private function noPaymentNecessary(Order $order)
 {
     return Redirect::route('vendirun.checkoutSuccess', ['orderId' => $order->getId()]);
 }