25 lines
848 B
PHP
25 lines
848 B
PHP
<?php
|
|
|
|
namespace App\Services\Payment;
|
|
|
|
use App\Entities\Customer\ServiceEntity;
|
|
use App\Entities\Equipment\ServerPartEntity;
|
|
use App\Entities\PaymentEntity;
|
|
|
|
class CreatePayment extends PaymentService
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
//서버연결정보용 등록
|
|
protected function setServerPart_process(ServerPartEntity $serverPartEntity, ServiceEntity $serviceEntity, array $formDatas): serverPartEntity
|
|
{
|
|
$serverPartEntity = parent::setServerPart_process($serverPartEntity, $serviceEntity, $formDatas);
|
|
//지급기한일 설정
|
|
$formDatas['billing_at'] = $serverPartEntity->getBilling() === PAYMENT['BILLING']['ONETIME'] ? date("Y-m-d") : $serviceEntity->getBillingAT();
|
|
$entity = $this->create($formDatas);
|
|
return $serverPartEntity;
|
|
}
|
|
}
|