/** * Add Payment * * @return void */ protected function addPayment() { $payment = $this->cart->getPayment(); /** * Order Payment * @var $orderPayment \Extcode\Cart\Domain\Model\Order\Payment */ $orderPayment = $this->objectManager->get('Extcode\\Cart\\Domain\\Model\\Order\\Payment'); $orderPayment->setPid($this->storagePid); $orderPayment->setServiceId($payment->getId()); $orderPayment->setName($payment->getName()); $orderPayment->setProvider($payment->getProvider()); $orderPayment->setStatus($payment->getStatus()); $orderPayment->setGross($payment->getGross()); $orderPayment->setNet($payment->getNet()); $orderPayment->setTaxClass($this->taxClasses[$payment->getTaxClass()->getId()]); $orderPayment->setTax($payment->getTax()); $orderPayment->setNote($payment->getNote()); $this->paymentRepository->add($orderPayment); $this->orderItem->setPayment($orderPayment); }