shoppingmallv2 init...
This commit is contained in:
parent
f841302b1c
commit
7615bbf3b7
@ -230,7 +230,8 @@ define('AUDIOS', [
|
|||||||
//Default값 정의
|
//Default값 정의
|
||||||
define('DEFAULTS', [
|
define('DEFAULTS', [
|
||||||
'ORDER_CATEGORY' => getenv('default.order_category') ?: 11,
|
'ORDER_CATEGORY' => getenv('default.order_category') ?: 11,
|
||||||
'USER_CATEGORY' => getenv('default.user_category') ?: 12,
|
'PAYMENT_CATEGORY' => getenv('default.payment_category') ?: 12,
|
||||||
|
'USER_CATEGORY' => getenv('default.user_category') ?: 22,
|
||||||
'ROLE' => getenv('default.role') ?: "guest",
|
'ROLE' => getenv('default.role') ?: "guest",
|
||||||
'STATUS' => getenv('default.status') ?: "use",
|
'STATUS' => getenv('default.status') ?: "use",
|
||||||
'EMPTY' => getenv('default.empty') ?: "",
|
'EMPTY' => getenv('default.empty') ?: "",
|
||||||
|
|||||||
@ -165,6 +165,11 @@ $routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($rou
|
|||||||
$routes->get('', 'OrderController::index');
|
$routes->get('', 'OrderController::index');
|
||||||
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
||||||
});
|
});
|
||||||
|
$routes->group('payment', ['namespace' => 'App\Controllers\Front', 'filter' => 'authFilter:user'], static function ($routes) {
|
||||||
|
$routes->get('', 'PaymentController::index');
|
||||||
|
$routes->get('card/(:uuid)', 'PaymentController::card_form/$1');
|
||||||
|
$routes->post('card/(:uuid)', 'PaymentController::card/$1');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
/*
|
/*
|
||||||
* --------------------------------------------------------------------
|
* --------------------------------------------------------------------
|
||||||
|
|||||||
@ -183,39 +183,4 @@ class EcommerceController extends Controller
|
|||||||
$this->_session->setFlashdata("return_message", $msg);
|
$this->_session->setFlashdata("return_message", $msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//결제(uid -> order_uid)
|
|
||||||
public function payment($uid)
|
|
||||||
{
|
|
||||||
$msg = "";
|
|
||||||
try {
|
|
||||||
$this->_viewDatas['fields'] = ["product_uid", "quantity", "price"];
|
|
||||||
$this->_viewDatas['fieldRules'] = $this->getOrderModel()->getFieldRules($this->_viewDatas['fields']);
|
|
||||||
//Transaction 시작
|
|
||||||
$this->getOrderModel()->transStart();
|
|
||||||
//Transaction Commit
|
|
||||||
$this->getOrderModel()->transComplete();
|
|
||||||
$entity = new PaymentEntity();
|
|
||||||
$msg = sprintf(
|
|
||||||
"%s\n 상품명:%s\n 상품갯수:%s개, 구매금액:%s원\n 장바구니에 담았습니다.",
|
|
||||||
$this->_viewDatas['title'],
|
|
||||||
$entity->getTitle(),
|
|
||||||
$entity->quantity,
|
|
||||||
number_format($entity->price)
|
|
||||||
);
|
|
||||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
//Transaction Rollback
|
|
||||||
$this->getOrderModel()->transRollback();
|
|
||||||
log_message("error", $e->getMessage());
|
|
||||||
$msg = sprintf(
|
|
||||||
"%s에서 다음 오류로 인해 장바구니에 담기를 실패하였습니다.\n%s",
|
|
||||||
$this->_viewDatas['title'],
|
|
||||||
$e->getMessage()
|
|
||||||
);
|
|
||||||
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']));
|
|
||||||
} finally {
|
|
||||||
$this->_session->setFlashdata("return_message", $msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
93
app/Controllers/Front/PaymentController.php
Normal file
93
app/Controllers/Front/PaymentController.php
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers\Front;
|
||||||
|
|
||||||
|
use App\Models\PaymentModel;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
class PaymentController extends FrontController
|
||||||
|
{
|
||||||
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
$this->_model = new PaymentModel($this->getFields());
|
||||||
|
parent::initController($request, $response, $logger);
|
||||||
|
$this->_viewPath .= strtolower($this->_model->getClassName());
|
||||||
|
//Default 회원정보 Category
|
||||||
|
$this->_category = DEFAULTS['PAYMENT_CATEGORY'];
|
||||||
|
$this->isRole('index');
|
||||||
|
}
|
||||||
|
|
||||||
|
final public function getFields(string $action = ""): array
|
||||||
|
{
|
||||||
|
switch ($action) {
|
||||||
|
case 'insert':
|
||||||
|
return ["TID", "ORDERNO", "AMOUNT", "QUOTA", "ACCEPTNO", "ACCEPTDATE", "RESULTCODE", "created_at"];
|
||||||
|
break;
|
||||||
|
case "index":
|
||||||
|
case "excel":
|
||||||
|
case "view":
|
||||||
|
return ["ORDERNO", "AMOUNT", "QUOTA", "ACCEPTNO", "ACCEPTDATE", "RESULTCODE", "created_at"];
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return [];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final public function getFieldFilters(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
final public function getFieldBatchFilters(): array
|
||||||
|
{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
//추가기능
|
||||||
|
//결제(uid -> order_uid)
|
||||||
|
private function card_init()
|
||||||
|
{
|
||||||
|
$this->_viewDatas['fields'] = [
|
||||||
|
"card_quota", "card_number", "card_expiration", "card_email", "card_mobile"
|
||||||
|
];
|
||||||
|
$this->_viewDatas['fieldRules'] = [
|
||||||
|
'card_quota' => 'required|in_list[00,01]',
|
||||||
|
'card_number' => 'required|regex_match[/^[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}/]',
|
||||||
|
'card_expiration' => 'required|regex_match[/^[1-12]{2}-[0-9]{4}/]',
|
||||||
|
'card_email' => 'required|valid_email',
|
||||||
|
'card_mobile' => 'required|regex_match[/^^[0-9]{3}-[0-9]{4}-[0-9]{4}/]',
|
||||||
|
];
|
||||||
|
$this->_viewDatas['fieldFilters'] = ['card_quota'];
|
||||||
|
$this->_viewDatas['fieldFormOptions']['card_quota'] = lang($this->_model->getClassName() . '.CARD_QUOTA');
|
||||||
|
}
|
||||||
|
public function card_form($uid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$this->card_init();
|
||||||
|
helper(['form']);
|
||||||
|
$this->_viewDatas['forms'] = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
|
$this->_session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||||
|
return view($this->_viewPath . '/card', ['viewDatas' => $this->_viewDatas]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
log_message("error", $e->getMessage());
|
||||||
|
return redirect()->to($this->_session->getFlashdata(SESSION_NAMES['RETURN_URL']) ?: "/")->with('return_message', $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected function card_validate()
|
||||||
|
{
|
||||||
|
//fieldData Rule 검사
|
||||||
|
if (!$this->validate($this->_viewDatas['fieldRules'])) {
|
||||||
|
throw new \Exception("결제정보의 검증 오류발생\n" . implode("\n", $this->validator->getErrors()));
|
||||||
|
}
|
||||||
|
//fieldData 적용
|
||||||
|
$this->_viewDatas['fieldDatas'] = array();
|
||||||
|
foreach ($this->_viewDatas['fields'] as $field) {
|
||||||
|
$this->_viewDatas['fieldDatas'] = $this->getFieldFormData($field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected function card_process()
|
||||||
|
{
|
||||||
|
return $this->_model->create($this->_viewDatas['fieldDatas']);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -158,7 +158,7 @@ CREATE TABLE shoppingmall.tw_order (
|
|||||||
DROP TABLE IF EXISTS shoppingmall.tw_payment;
|
DROP TABLE IF EXISTS shoppingmall.tw_payment;
|
||||||
CREATE TABLE shoppingmall.tw_payment (
|
CREATE TABLE shoppingmall.tw_payment (
|
||||||
uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
uid int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
TID varchar(20) NOT NULL COMMENT 'PG사 결제 거래고유번호 (전표출력 및 결제취소에 사용됩니다)'
|
TID varchar(20) NOT NULL COMMENT 'PG사 결제 거래고유번호 (전표출력 및 결제취소에 사용됩니다)',
|
||||||
ORDERNO varchar(50) NOT NULL COMMENT '주문번호',
|
ORDERNO varchar(50) NOT NULL COMMENT '주문번호',
|
||||||
AMOUNT int(10) UNSIGNED NOT NULL COMMENT '결제 된 금액',
|
AMOUNT int(10) UNSIGNED NOT NULL COMMENT '결제 된 금액',
|
||||||
QUOTA varchar(2) NOT NULL COMMENT '카드 할부결제시 할부기간 (00:일시불, 01:1개월)',
|
QUOTA varchar(2) NOT NULL COMMENT '카드 할부결제시 할부기간 (00:일시불, 01:1개월)',
|
||||||
|
|||||||
@ -125,7 +125,7 @@ function getFieldIndex_Row_OrderHelper($field, $entity, array $viewDatas): strin
|
|||||||
case 'status':
|
case 'status':
|
||||||
if ($value == DEFAULTS['STATUS']) {
|
if ($value == DEFAULTS['STATUS']) {
|
||||||
return anchor(
|
return anchor(
|
||||||
'/front/ecommerce/payment' . $entity->getPrimaryKey(),
|
'/front/payment/card/' . $entity->getPrimaryKey(),
|
||||||
$viewDatas['fieldFormOptions'][$field][$value],
|
$viewDatas['fieldFormOptions'][$field][$value],
|
||||||
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
||||||
);
|
);
|
||||||
@ -156,18 +156,10 @@ function getFieldIndex_Row_OrderHelper_Admin($field, $entity, array $viewDatas):
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
case 'status':
|
||||||
|
return getFieldView_OrderHelper($field, $entity, $viewDatas);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
//관리자도 수정할수 없게 하기위해
|
|
||||||
// if (in_array($field, $viewDatas['fieldFilters'])) {
|
|
||||||
// $attributes["onChange"] = sprintf(
|
|
||||||
// 'location.href="%s/toggle/%s/%s?%s="+this.options[this.selectedIndex].value',
|
|
||||||
// current_url(),
|
|
||||||
// $entity->getPrimaryKey(),
|
|
||||||
// $field,
|
|
||||||
// $field
|
|
||||||
// );
|
|
||||||
// return getFieldForm_OrderHelper($field, $entity->$field, $viewDatas, $attributes);
|
|
||||||
// }
|
|
||||||
return getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas);
|
return getFieldIndex_Row_OrderHelper($field, $entity, $viewDatas);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
196
app/Helpers/Payment_helper.php
Normal file
196
app/Helpers/Payment_helper.php
Normal file
@ -0,0 +1,196 @@
|
|||||||
|
<?php
|
||||||
|
function getFieldLabel_PaymentHelper($field, array $viewDatas): string
|
||||||
|
{
|
||||||
|
$attributes = [];
|
||||||
|
switch ($field) {
|
||||||
|
default:
|
||||||
|
if (strpos($viewDatas['fieldRules'][$field], 'required') !== false) {
|
||||||
|
$attributes = ['style="color:red";'];
|
||||||
|
}
|
||||||
|
return sprintf("<span %s>%s</span>", implode(" ", $attributes), lang("{$viewDatas['className']}.label.{$field}"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//header.php에서 getFieldForm_Helper사용
|
||||||
|
function getFieldForm_PaymentHelper($field, $value, array $viewDatas, array $attributes = array())
|
||||||
|
{
|
||||||
|
$value = $value ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
case 'product_uid':
|
||||||
|
case 'user_uid':
|
||||||
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, [...$attributes, 'class' => "select-field"]);
|
||||||
|
// // return form_multiselect($field, $fieldFormOptions[$field], is_array($value) ? [...$value] : [$value], [...$attributes]);
|
||||||
|
// foreach ($viewDatas['fieldFormOptions'][$field] as $key => $label) {
|
||||||
|
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||||
|
// }
|
||||||
|
// return implode(" ", $checkboxs);
|
||||||
|
break;
|
||||||
|
case 'title':
|
||||||
|
case 'name':
|
||||||
|
return form_input($field, $value, ["placeholder" => "예)", "style" => "width:60%; ::placeholder{ color:silver; opacity: 1; }"]);
|
||||||
|
break;
|
||||||
|
case 'passwd':
|
||||||
|
return sprintf(
|
||||||
|
"%s %s %s",
|
||||||
|
form_password($field, DEFAULTS['EMPTY']),
|
||||||
|
lang("{$viewDatas['className']}.label.confirmpassword"),
|
||||||
|
form_password('confirmpassword', DEFAULTS['EMPTY']),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'content':
|
||||||
|
case 'head':
|
||||||
|
case 'tail':
|
||||||
|
return form_textarea($field, html_entity_decode($value), ['class' => 'editor', 'rows' => '20', 'cols' => '100']);
|
||||||
|
break;
|
||||||
|
case 'upload_file':
|
||||||
|
case 'board_file':
|
||||||
|
return form_upload($field);
|
||||||
|
break;
|
||||||
|
case 'view_cnt':
|
||||||
|
return form_input($field, $value, ['type' => 'number']);
|
||||||
|
break;
|
||||||
|
case "status":
|
||||||
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, $attributes);
|
||||||
|
break;
|
||||||
|
case 'updated_at':
|
||||||
|
case 'created_at':
|
||||||
|
return form_input($field, $value, ['class' => 'calender']);
|
||||||
|
break;
|
||||||
|
case 'card_quota':
|
||||||
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, $attributes);
|
||||||
|
break;
|
||||||
|
case 'card_number':
|
||||||
|
return sprintf(
|
||||||
|
"%s-%s-%s-%s",
|
||||||
|
form_input("{$field}[]", DEFAULTS['EMPTY'], ['type' => "number", 'maxlength' => 4, 'size' => 4]),
|
||||||
|
form_input("{$field}[]", DEFAULTS['EMPTY'], ['type' => "number", 'maxlength' => 4, 'size' => 4]),
|
||||||
|
form_input("{$field}[]", DEFAULTS['EMPTY'], ['type' => "number", 'maxlength' => 4, 'size' => 4]),
|
||||||
|
form_input("{$field}[]", DEFAULTS['EMPTY'], ['type' => "number", 'maxlength' => 4, 'size' => 4])
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'card_expiration':
|
||||||
|
$months = [];
|
||||||
|
for ($i = 1; $i <= 12; $i++) {
|
||||||
|
$months[$i] = "{$i}월";
|
||||||
|
}
|
||||||
|
$start = date('Y');
|
||||||
|
$end = date('Y', strtotime(date("Y") . ' + 10 year'));
|
||||||
|
$years = [];
|
||||||
|
for ($i = $start; $i <= $end; $i++) {
|
||||||
|
$years[$i] = "{$i}년";
|
||||||
|
}
|
||||||
|
return sprintf(
|
||||||
|
"%s월 %s년",
|
||||||
|
form_dropdown("{$field}[]", $months, DEFAULTS['EMPTY']),
|
||||||
|
form_dropdown("{$field}[]", $years, DEFAULTS['EMPTY']),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return form_input($field, $value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldView_PaymentHelper($field, $entity, array $viewDatas)
|
||||||
|
{
|
||||||
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
case 'cost':
|
||||||
|
case 'price':
|
||||||
|
case 'sale':
|
||||||
|
return number_format(!$value ? 0 : $value) . "원";
|
||||||
|
break;
|
||||||
|
case 'stock':
|
||||||
|
case 'view_cnt':
|
||||||
|
return number_format(!$value ? 0 : $value);
|
||||||
|
break;
|
||||||
|
case 'content':
|
||||||
|
return html_entity_decode($value);
|
||||||
|
break;
|
||||||
|
case 'updated_at':
|
||||||
|
case 'created_at':
|
||||||
|
return $value ? str_split($value, 10)[0] : "";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return in_array($field, $viewDatas['fieldFilters']) && $value ? $viewDatas['fieldFormOptions'][$field][$value] : $value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldFilter_PaymentHelper($field, $value, array $viewDatas)
|
||||||
|
{
|
||||||
|
$viewDatas['fieldFormOptions'][$field] = [DEFAULTS['EMPTY'] => lang("{$viewDatas['className']}.label.{$field}") . " 선택", ...$viewDatas['fieldFormOptions'][$field]];
|
||||||
|
return form_dropdown($field, $viewDatas['fieldFormOptions'][$field], $value, ['class' => "select-field"]);
|
||||||
|
} //
|
||||||
|
|
||||||
|
function getFieldIndex_Column_PaymentHelper($field, array $viewDatas)
|
||||||
|
{
|
||||||
|
$label = lang("{$viewDatas['className']}.label.{$field}");
|
||||||
|
$label = $field == $viewDatas['order_field'] ? sprintf('%s <i class="fa fa-arrow-%s"></i>', $label, $viewDatas['order_value'] == 'ASC' ? "up" : "down") : $label;
|
||||||
|
$value = $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC";
|
||||||
|
return anchor(current_url() . "?order_field={$field}&order_value={$value}", $label);
|
||||||
|
} //
|
||||||
|
|
||||||
|
//Front용
|
||||||
|
function getFieldIndex_Row_PaymentHelper($field, $entity, array $viewDatas): string
|
||||||
|
{
|
||||||
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
case 'title':
|
||||||
|
case 'name':
|
||||||
|
return sprintf(
|
||||||
|
"<div class=\"location-left\">%s : %s<BR>%s</div>",
|
||||||
|
lang("{$viewDatas['className']}.label.uid"),
|
||||||
|
$entity->getPaymentHint(),
|
||||||
|
anchor(
|
||||||
|
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category']->getPrimaryKey(),
|
||||||
|
$value,
|
||||||
|
["target" => "_self"]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'status':
|
||||||
|
if ($value == DEFAULTS['STATUS']) {
|
||||||
|
return anchor(
|
||||||
|
'/front/payment/card/' . $entity->getPrimaryKey(),
|
||||||
|
$viewDatas['fieldFormOptions'][$field][$value],
|
||||||
|
["class" => "btn btn-sm btn-primary btn-circle", "style" => "color:white", "target" => "_self"]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return getFieldView_PaymentHelper($field, $entity, $viewDatas);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return getFieldView_PaymentHelper($field, $entity, $viewDatas);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
|
//Admin용
|
||||||
|
function getFieldIndex_Row_PaymentHelper_Admin($field, $entity, array $viewDatas): string
|
||||||
|
{
|
||||||
|
$value = $entity->$field ?: DEFAULTS['EMPTY'];
|
||||||
|
switch ($field) {
|
||||||
|
case 'title':
|
||||||
|
case 'name':
|
||||||
|
return sprintf(
|
||||||
|
"<div class=\"location-left\">%s : %s<BR>%s</div>",
|
||||||
|
lang("{$viewDatas['className']}.label.uid"),
|
||||||
|
$entity->getPrimaryKey(),
|
||||||
|
anchor(
|
||||||
|
current_url() . '/view/' . $entity->getPrimaryKey(),
|
||||||
|
$value,
|
||||||
|
["target" => "_self"]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 'status':
|
||||||
|
return getFieldView_PaymentHelper($field, $entity, $viewDatas);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return getFieldIndex_Row_PaymentHelper($field, $entity, $viewDatas);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} //
|
||||||
31
app/Language/ko/Payment.php
Normal file
31
app/Language/ko/Payment.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'title' => "결제 정보",
|
||||||
|
'label' => [
|
||||||
|
'uid' => "결제ID",
|
||||||
|
'TID' => "PG거래번호",
|
||||||
|
'ORDERNO' => "주문번호",
|
||||||
|
'AMOUNT' => "결제금액",
|
||||||
|
'QUOTA' => "카드할부",
|
||||||
|
'ACCEPTNO' => "승인번호",
|
||||||
|
'ACCEPTDATE' => "승인일시",
|
||||||
|
'RESULTCODE' => "결과코드",
|
||||||
|
'RESULTMSG' => "결과메세지",
|
||||||
|
'ETC1' => "결제입력값",
|
||||||
|
'ETC2' => "결제입력값",
|
||||||
|
'ETC3' => "결제입력값",
|
||||||
|
'ETC4' => "결제입력값",
|
||||||
|
'ETC5' => "결제입력값",
|
||||||
|
'updated_at' => "수정일",
|
||||||
|
'created_at' => "작성일",
|
||||||
|
'card_quota' => '카드할부',
|
||||||
|
'card_number' => '카드번호',
|
||||||
|
'card_expiration' => '유효기간',
|
||||||
|
'card_email' => '이메일',
|
||||||
|
'card_mobile' => '휴대폰(인증용)',
|
||||||
|
],
|
||||||
|
"CARD_QUOTA" => [
|
||||||
|
"00" => "일시불",
|
||||||
|
"01" => "1개월",
|
||||||
|
]
|
||||||
|
];
|
||||||
@ -13,7 +13,7 @@ return [
|
|||||||
'confirmpassword' => '암호확인',
|
'confirmpassword' => '암호확인',
|
||||||
'email' => '메일',
|
'email' => '메일',
|
||||||
'phone' => '연락처',
|
'phone' => '연락처',
|
||||||
'mobile' => '핸드폰',
|
'mobile' => '휴대폰',
|
||||||
'role' => '권한',
|
'role' => '권한',
|
||||||
'name' => '이름',
|
'name' => '이름',
|
||||||
'status' => '상태',
|
'status' => '상태',
|
||||||
|
|||||||
26
app/Views/front/payment/card.php
Normal file
26
app/Views/front/payment/card.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
|
<div id="content">
|
||||||
|
<div><?= html_entity_decode($viewDatas['category']->head) ?></div>
|
||||||
|
<div>상품정보표시</div>
|
||||||
|
<div>오더정보표시</div>
|
||||||
|
<?= form_open_multipart(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||||
|
<table class="form table table-bordered table-hover table-striped">
|
||||||
|
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||||
|
<tr>
|
||||||
|
<td class="label"><?= getFieldLabel_PaymentHelper($field, $viewDatas) ?></td>
|
||||||
|
<td class="column">
|
||||||
|
<?= getFieldForm_PaymentHelper($field, old($field, DEFAULTS['EMPTY']), $viewDatas) ?>
|
||||||
|
<?= validation_show_error($field); ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" colspan="2"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
34
app/Views/front/payment/index.php
Normal file
34
app/Views/front/payment/index.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?= $this->extend('layouts/front') ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
|
<div id="content">
|
||||||
|
<div><?= html_entity_decode($viewDatas['category']->head) ?></div>
|
||||||
|
<div class="top">
|
||||||
|
<?= $this->include('templates/front/index_head') ?>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>번호</th>
|
||||||
|
<?php foreach ($viewDatas['fields'] as $field) : ?><th><?= getFieldIndex_Column_PaymentHelper($field, $viewDatas) ?></th><?php endforeach ?>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $cnt = 0 ?>
|
||||||
|
<?php foreach ($viewDatas['entitys'] as $entity) : ?>
|
||||||
|
<tr id="<?= $entity->getPrimaryKey() ?>" <?= $entity->status != DEFAULTS['STATUS'] ? 'class="table-danger" rowcolor="red"' : 'rowcolor="red"' ?> onClick="indexRowCheckBoxToggle(this)">
|
||||||
|
<td>
|
||||||
|
<?= $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt) ?>
|
||||||
|
</td>
|
||||||
|
<?php foreach ($viewDatas['fields'] as $field) : ?>
|
||||||
|
<td nowrap><?= getFieldIndex_Row_PaymentHelper($field, $entity, $viewDatas) ?></td>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tr>
|
||||||
|
<?php $cnt++ ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bottom"><?= $viewDatas['pagination'] ?></div>
|
||||||
|
<div><?= html_entity_decode($viewDatas['category']->tail) ?></div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
@ -7,7 +7,10 @@
|
|||||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="sibling ">
|
<div class="sibling ">
|
||||||
<a href="http://localhost:8080/front/user?category=12" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/payment?category=12" target="_self">결제정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="sibling ">
|
||||||
|
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 7 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -7,7 +7,10 @@
|
|||||||
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="sibling active">
|
<div class="sibling active">
|
||||||
<a href="http://localhost:8080/front/user?category=12" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/payment?category=12" target="_self">결제정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="sibling ">
|
||||||
|
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 8 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
16
app/Views/layouts/front/left_menu/leftmenu_22.php
Normal file
16
app/Views/layouts/front/left_menu/leftmenu_22.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!-- DEBUG-VIEW START 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
<div class="parent">
|
||||||
|
<div>-</div>
|
||||||
|
<div class="title">개인정보</div>
|
||||||
|
</div>
|
||||||
|
<div class="sibling ">
|
||||||
|
<a href="http://localhost:8080/front/order?category=11" target="_self">주문정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="sibling ">
|
||||||
|
<a href="http://localhost:8080/front/payment?category=12" target="_self">결제정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
<div class="sibling active">
|
||||||
|
<a href="http://localhost:8080/front/user?category=22" target="_self">사용자정보</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- DEBUG-VIEW ENDED 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">Support</div>
|
<div class="title">Support</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 15 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">Support</div>
|
<div class="title">Support</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/board?category=4" target="_self">자료실</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 14 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 15 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">네트워크</div>
|
<div class="title">네트워크</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">네트워크</div>
|
<div class="title">네트워크</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/product?category=6" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 12 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 13 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">서버</div>
|
<div class="title">서버</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 9 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<!-- DEBUG-VIEW START 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW START 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
<div>-</div>
|
<div>-</div>
|
||||||
<div class="title">서버</div>
|
<div class="title">서버</div>
|
||||||
@ -10,4 +10,4 @@
|
|||||||
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
<a href="http://localhost:8080/front/product?category=9" target="_self">판매</a> <span class="play"><i class="bi bi-play-fill"></i></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- DEBUG-VIEW ENDED 10 APPPATH\Views\admin\category\leftmenu_template.php -->
|
<!-- DEBUG-VIEW ENDED 11 APPPATH\Views\admin\category\leftmenu_template.php -->
|
||||||
|
|||||||
45
public/css/front/payment.css
Normal file
45
public/css/front/payment.css
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
.padding{
|
||||||
|
padding:5rem !important;
|
||||||
|
margin-left:300px;
|
||||||
|
}
|
||||||
|
.card {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
position: relative;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-direction: column;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
|
word-wrap: break-word;
|
||||||
|
background-color: #fff;
|
||||||
|
background-clip: border-box;
|
||||||
|
border: 1px solid #c8ced3;
|
||||||
|
border-radius: .25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header:first-child {
|
||||||
|
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
padding: .75rem 1.25rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background-color: #f0f3f5;
|
||||||
|
border-bottom: 1px solid #c8ced3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-body {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
padding: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control:focus {
|
||||||
|
color: #5c6873;
|
||||||
|
background-color: #fff;
|
||||||
|
border-color: #c8ced3 !important;
|
||||||
|
outline: 0;
|
||||||
|
box-shadow: 0 0 0 #F44336;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user