|
|
@@ -9,13 +9,13 @@ use Lc\SovBundle\Factory\AbstractFactory; |
|
|
|
|
|
|
|
class OrderPaymentFactory extends AbstractFactory |
|
|
|
{ |
|
|
|
public function create(OrderShopInterface $orderShop, string $meanPayment, float $amount): OrderPaymentInterface |
|
|
|
public function create(OrderShopInterface $orderShop, string $meanPayment, float $amount, bool $editable = false): OrderPaymentInterface |
|
|
|
{ |
|
|
|
$orderPayment = $this->createBase($orderShop); |
|
|
|
$orderPayment->setMeanPayment($meanPayment); |
|
|
|
$orderPayment->setAmount($amount); |
|
|
|
$orderPayment->setPaidAt(new \DateTime()); |
|
|
|
$orderPayment->setEditable(false); |
|
|
|
$orderPayment->setEditable($editable); |
|
|
|
|
|
|
|
return $orderPayment; |
|
|
|
} |