dbmsv4 init...3
This commit is contained in:
parent
eb61a4bf9f
commit
486e83a0ec
@ -77,58 +77,6 @@ class PaymentController extends AdminController
|
||||
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
final public function coupon_form(): string|RedirectResponse
|
||||
{
|
||||
try {
|
||||
$uid = $this->request->getVar('serviceinfo_uid');
|
||||
if (!$uid) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보 번호가 정의되지 않았습니다..");
|
||||
}
|
||||
$serviceEntity = service('customer_serviceservice')->getEntity($uid);
|
||||
if (!$serviceEntity) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보을 찾을수 없습니다.");
|
||||
}
|
||||
$action = __FUNCTION__;
|
||||
$formDatas = [];
|
||||
$formDatas['serviceinfo_uid'] = $uid;
|
||||
$formDatas['title'] = $serviceEntity->getTitle() . " 쿠폰 결제";
|
||||
$formDatas['billing'] = PAYMENT['BILLING']['ONETIME'];
|
||||
$formDatas['billing_at'] = date('Y-m-d');
|
||||
$formDatas['pay'] = PAYMENT['PAY']['COUPON'];
|
||||
$formDatas['status'] = STATUS['PAID'];
|
||||
$this->action_init_process($action, $formDatas);
|
||||
$this->addViewDatas('formDatas', $formDatas);
|
||||
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate'));
|
||||
} catch (\Throwable $e) {
|
||||
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
final public function point_form(): string|RedirectResponse
|
||||
{
|
||||
try {
|
||||
$uid = $this->request->getVar('serviceinfo_uid');
|
||||
if (!$uid) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 서비스정보 번호가 정의되지 않았습니다..");
|
||||
}
|
||||
$serviceEntity = service('customer_serviceservice')->getEntity($uid);
|
||||
if (!$serviceEntity) {
|
||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: {$uid}에 해당하는 서비스정보을 찾을수 없습니다.");
|
||||
}
|
||||
$action = __FUNCTION__;
|
||||
$formDatas = [];
|
||||
$formDatas['serviceinfo_uid'] = $uid;
|
||||
$formDatas['title'] = $serviceEntity->getTitle() . " 포인트 결제";
|
||||
$formDatas['billing'] = PAYMENT['BILLING']['ONETIME'];
|
||||
$formDatas['billing_at'] = date('Y-m-d');
|
||||
$formDatas['pay'] = PAYMENT['PAY']['POINT'];
|
||||
$formDatas['status'] = STATUS['PAID'];
|
||||
$this->action_init_process($action, $formDatas);
|
||||
$this->addViewDatas('formDatas', $formDatas);
|
||||
return $this->action_render_process($action, $this->getViewDatas(), $this->request->getVar('ActionTemplate'));
|
||||
} catch (\Throwable $e) {
|
||||
return $this->action_redirect_process('error', static::class . '->' . __FUNCTION__ . "에서 {$this->getTitle()} 생성폼 오류:" . $e->getMessage());
|
||||
}
|
||||
}
|
||||
//단일 지불 완료처리
|
||||
final public function paid($uid): string|RedirectResponse
|
||||
{
|
||||
|
||||
@ -130,8 +130,6 @@ class ServiceHelper extends CustomerHelper
|
||||
break;
|
||||
case 'onetime':
|
||||
case 'prepayment':
|
||||
case 'coupon':
|
||||
case 'point':
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['ONETIME'],
|
||||
$action,
|
||||
|
||||
@ -16,7 +16,7 @@ class PaymentHelper extends CommonHelper
|
||||
array_shift($viewDatas['formOptions'][$field]['options']); //Radio 선택기는 첫번째 옵션제거해야 함
|
||||
foreach ($viewDatas['formOptions'][$field]['options'] as $key => $label) {
|
||||
$billing_month = "";
|
||||
if ($key == PAYMENT['BILLING']['PREPAYMENT']) { //선결제의 우우
|
||||
if ($key == PAYMENT['BILLING']['PREPAYMENT']) { //선결제의 경우
|
||||
$initalTitle = $viewDatas['formDatas']['title'] ?? "";
|
||||
$initalAmount = $viewDatas['formDatas']['amount'] ?? 0;
|
||||
$initalPayMonth = $viewDatas['formDatas']['billing_month'] ?? "";
|
||||
|
||||
@ -18,11 +18,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('onetime', '일회성 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('onetime', '일회성추가', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('prepayment', '선결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('coupon', '쿠폰 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||
<td nowrap class="text-center"><?= $serviceCellDatas['helper']->getListButton('point', '포인트 결제', ['entity' => $serviceEntity], ['class' => 'btn btn-sm btn-primary']) ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
Reference in New Issue
Block a user