#288 포인트 계산 코드 수정

This commit is contained in:
chicpro
2013-09-06 11:05:39 +09:00
parent b94e98aba1
commit 82efe3656e
4 changed files with 81 additions and 62 deletions

View File

@ -3,13 +3,10 @@ include_once('./_common.php');
if(get_magic_quotes_gpc())
{
//$_GET = array_map("stripslashes", $_GET);
//$_POST = array_map("stripslashes", $_POST);
$_GET = array_add_callback("stripslashes", $_GET);
$_POST = array_add_callback("stripslashes", $_POST);
}
//$_GET = array_map("mysql_real_escape_string", $_GET);
//$_POST = array_map("mysql_real_escape_string", $_POST);
$_GET = array_add_callback("mysql_real_escape_string", $_GET);
$_POST = array_add_callback("mysql_real_escape_string", $_POST);
@ -264,20 +261,21 @@ if($send_cost2 !== $i_send_cost2)
die("Error...");
// 결제포인트가 상이함
$tot_amount = $tot_od_amount + ($send_cost - $tot_sc_cp_amount);
// 회원이면서 포인트사용이면
$temp_point = 0;
if ($is_member && $config['cf_use_point'])
{
// 포인트 결제 사용 포인트보다 회원의 포인트가 크다면
if ($member['mb_point'] >= $default['de_point_settle'])
{
$temp_point = $tot_amount * ($default['de_point_per'] / 100); // 포인트 결제 % 적용
$temp_point = (int)((int)($temp_point / 100) * 100); // 100점 단위
if($member['mb_point'] >= $default['de_settle_min_point']) {
$temp_point = (int)$default['de_settle_max_point'];
$member_point = (int)((int)($member['mb_point'] / 100) * 100); // 100점 단위
if ($temp_point > $member_point)
$temp_point = $member_point;
if($temp_point > (int)$tot_od_amount)
$temp_point = (int)$tot_od_amount;
if($temp_point > (int)$member['mb_point'])
$temp_point = (int)$member['mb_point'];
$point_unit = (int)$default['de_settle_point_unit'];
$temp_point = (int)((int)($temp_point / $point_unit) * $point_unit);
}
}