|
|
|
|
|
|
|
|
$oldIdUser = $order->id_user; |
|
|
$oldIdUser = $order->id_user; |
|
|
$amountPaid = $orderManager->getOrderAmountWithTax($order, Order::AMOUNT_PAID); |
|
|
$amountPaid = $orderManager->getOrderAmountWithTax($order, Order::AMOUNT_PAID); |
|
|
if ($oldIdUser != $idUser && $amountPaid > 0) { |
|
|
if ($oldIdUser != $idUser && $amountPaid > 0) { |
|
|
$paymentManager->refundOrder($order, $this->getUserCurrent()); |
|
|
|
|
|
|
|
|
$paymentManager->refundOrderCredit($order, $this->getUserCurrent()); |
|
|
$order = $orderManager->findOneOrderById($idOrder); |
|
|
$order = $orderManager->findOneOrderById($idOrder); |
|
|
$orderManager->initOrder($order); |
|
|
$orderManager->initOrder($order); |
|
|
} |
|
|
} |