public function completeSubscriptionOrder(Order $order, $status) { $reader = $order->getReader(); if ($status !== self::LIQ_PAY_ORDER_STATUS_SUCCESS) { return $reader; } $reader->setIsSubscribed(TRUE)->setSubscriptionEnd((new DateTime('now'))->modify('+' . $order->getSubscription()->getDurationNumber() . ' ' . $order->getSubscription()->getDurationMeasure())); return $reader; }