|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function getOrderDatas($order = null) |
|
|
public function getOrderDatas($order = null) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$data = []; |
|
|
$data = []; |
|
|
if (!$order) { |
|
|
if (!$order) { |
|
|
$order = $this->getCartCurrent(); |
|
|
$order = $this->getCartCurrent(); |
|
|
|
|
|
|
|
|
return $orderProductsByProductFamily; |
|
|
return $orderProductsByProductFamily; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function createOrderPayment($orderShop, $type, $amount, $reference = null, $comment = null, $paidAt = null) |
|
|
|
|
|
|
|
|
public function createOrderPayment($orderShop, $meanPayment, $amount, $reference = null, $comment = null, $paidAt = null) |
|
|
{ |
|
|
{ |
|
|
$classOrderPayment = $this->em->getClassMetadata(OrderPaymentInterface::class)->getName(); |
|
|
$classOrderPayment = $this->em->getClassMetadata(OrderPaymentInterface::class)->getName(); |
|
|
$orderPayment = new $classOrderPayment; |
|
|
$orderPayment = new $classOrderPayment; |
|
|
|
|
|
|
|
|
$orderPayment->setOrderShop($orderShop); |
|
|
$orderPayment->setOrderShop($orderShop); |
|
|
$orderPayment->setType($type); |
|
|
|
|
|
|
|
|
$orderPayment->setMeanPayment($meanPayment); |
|
|
$orderPayment->setAmount($amount); |
|
|
$orderPayment->setAmount($amount); |
|
|
$orderPayment->setReference($reference); |
|
|
$orderPayment->setReference($reference); |
|
|
$orderPayment->setComment($comment); |
|
|
$orderPayment->setComment($comment); |
|
|
|
|
|
$orderPayment->setEditable(false); |
|
|
|
|
|
|
|
|
if ($paidAt) { |
|
|
if ($paidAt) { |
|
|
$orderPayment->setPaidAt($paidAt); |
|
|
$orderPayment->setPaidAt($paidAt); |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->em->persist($orderPayment); |
|
|
$this->em->persist($orderPayment); |
|
|
$this->em->flush(); |
|
|
$this->em->flush(); |
|
|
|
|
|
|
|
|
|
|
|
return $orderPayment ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function isOrderPaid($order) |
|
|
public function isOrderPaid($order) |