@@ -300,17 +309,35 @@ include_once(G5_MSHOP_PATH.'/_head.php');
-
@@ -352,16 +379,35 @@ include_once(G5_MSHOP_PATH.'/_head.php');
-
diff --git a/mobile/shop/personalpayformupdate.php b/mobile/shop/personalpayformupdate.php
index 3f5f0b171..3079ec9da 100644
--- a/mobile/shop/personalpayformupdate.php
+++ b/mobile/shop/personalpayformupdate.php
@@ -115,14 +115,12 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
die("Receipt Amount Error");
}
-if ($is_member)
- $od_pwd = $member['mb_password'];
-else
- $od_pwd = sql_password($_POST['od_pwd']);
+$pp_pg = $default['de_pg_service'];
// 결제정보 입력
$sql = " update {$g5['g5_shop_personalpay_table']}
- set pp_tno = '$pp_tno',
+ set pp_pg = '$pp_pg',
+ pp_tno = '$pp_tno',
pp_app_no = '$app_no',
pp_receipt_price = '$pp_receipt_price',
pp_settle_case = '$pp_settle_case',
@@ -157,6 +155,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = od_receipt_price + '$pp_receipt_price',
od_receipt_time = '$pp_receipt_time',
+ od_pg = '$pp_pg',
od_tno = '$pp_tno',
od_app_no = '$app_no',
od_escrow = '$od_escrow',
diff --git a/mobile/shop/personalpayresult.php b/mobile/shop/personalpayresult.php
index c9331d5a5..dea712d5d 100644
--- a/mobile/shop/personalpayresult.php
+++ b/mobile/shop/personalpayresult.php
@@ -12,6 +12,15 @@ $settle_case = $pp['pp_settle_case'];
$g5['title'] = '개인결제상세내역';
include_once(G5_MSHOP_PATH.'/_head.php');
+
+// LG 현금영수증 JS
+if($od['od_pg'] == 'lg') {
+ if($default['de_card_test']) {
+ echo ''.PHP_EOL;
+ } else {
+ echo ''.PHP_EOL;
+ }
+}
?>
@@ -125,17 +134,35 @@ include_once(G5_MSHOP_PATH.'/_head.php');
-
영수증 출력
+
영수증 출력
-
영수증 출력
+
영수증 출력
diff --git a/shop/kcp/pp_cli_hub.php b/shop/kcp/pp_cli_hub.php
index 6eb440710..d2c456426 100644
--- a/shop/kcp/pp_cli_hub.php
+++ b/shop/kcp/pp_cli_hub.php
@@ -244,7 +244,7 @@ if ($row['cnt']) {
od_cash_no = '$cash_no',
od_cash_info = '$cash_info'
where od_id = '$ordr_idxx' ";
- $result = sql_query($sql);
+ $result = sql_query($sql, false);
if (!$result) $bSucc = "false";
/* = -------------------------------------------------------------------------- = */
diff --git a/shop/lg/taxsave_result.php b/shop/lg/taxsave_result.php
index 3318ca966..daba64731 100644
--- a/shop/lg/taxsave_result.php
+++ b/shop/lg/taxsave_result.php
@@ -23,7 +23,7 @@ switch($od['od_settle_case']) {
break;
default:
die('
현금영수증은 무통장, 가상계좌, 계좌이체에 한해 발급요청이 가능합니다.
');
- break
+ break;
}
$LGD_METHOD = 'AUTH'; //메소드('AUTH':승인, 'CANCEL' 취소)
@@ -33,6 +33,7 @@ $LGD_AMOUNT = $order_price; //금액
$LGD_PRODUCTINFO = $goods_name; //상품명
$LGD_TID = $od['od_tno']; //LG유플러스 거래번호
$LGD_CUSTOM_MERTNAME = $default['de_admin_company_name']; //상점명
+$LGD_CUSTOM_CEONAME = $default['de_admin_company_owner']; //대표자명
$LGD_CUSTOM_BUSINESSNUM = $default['de_admin_company_saupja_no']; //사업자등록번호
$LGD_CUSTOM_MERTPHONE = $default['de_admin_company_tel']; //상점 전화번호
$LGD_CASHCARDNUM = $_POST['id_info']; //발급번호(주민등록번호,현금영수증카드번호,휴대폰번호 등등)
@@ -54,11 +55,12 @@ if ($LGD_METHOD == "AUTH") { // 현금영수증 발급 요청
$xpay->Set("LGD_AMOUNT", $LGD_AMOUNT);
$xpay->Set("LGD_CASHCARDNUM", $LGD_CASHCARDNUM);
$xpay->Set("LGD_CUSTOM_MERTNAME", $LGD_CUSTOM_MERTNAME);
+ $xpay->Set("LGD_CUSTOM_CEONAME", $LGD_CUSTOM_CEONAME);
$xpay->Set("LGD_CUSTOM_BUSINESSNUM", $LGD_CUSTOM_BUSINESSNUM);
$xpay->Set("LGD_CUSTOM_MERTPHONE", $LGD_CUSTOM_MERTPHONE);
$xpay->Set("LGD_CASHRECEIPTUSE", $LGD_CASHRECEIPTUSE);
- if($od['od_tax_flag'] && $od['free_mny'] > ) {
+ if($od['od_tax_flag'] && $od['free_mny'] > 0) {
$xpay->Set("LGD_TAXFREEAMOUNT", $od['free_mny']); //비과세 금액
}
@@ -71,6 +73,7 @@ if ($LGD_METHOD == "AUTH") { // 현금영수증 발급 요청
}
else { //무통장입금 단독건 발급요청
$xpay->Set("LGD_PRODUCTINFO", $LGD_PRODUCTINFO);
+ $xpay->Set("LGD_ENCODING", "UTF-8");
}
}
@@ -81,6 +84,7 @@ if ($LGD_METHOD == "AUTH") { // 현금영수증 발급 요청
*/
if ($xpay->TX()) {
//1)현금영수증 발급/취소결과 화면처리(성공,실패 결과 처리를 하시기 바랍니다.)
+ /*
echo "현금영수증 발급/취소 요청처리가 완료되었습니다.
";
echo "TX Response_code = " . $xpay->Response_Code() . "
";
echo "TX Response_msg = " . $xpay->Response_Msg() . "
";
@@ -90,14 +94,141 @@ if ($xpay->TX()) {
echo "거래번호 : " . $xpay->Response("LGD_TID",0) . "
";
$keys = $xpay->Response_Names();
- foreach($keys as $name) {
- echo $name . " = " . $xpay->Response($name, 0) . "
";
- }
+ foreach($keys as $name) {
+ echo $name . " = " . $xpay->Response($name, 0) . "
";
+ }
+ */
-}else {
+ if($xpay->Response_Code() == '0000') {
+ $LGD_OID = $xpay->Response("LGD_OID",0);
+ $cash_no = $xpay->Response("LGD_CASHRECEIPTNUM",0);
+
+ $cash = array();
+ $cash['LGD_TID'] = $xpay->Response("LGD_TID",0);
+ $cash['LGD_TIMESTAMP'] = $xpay->Response("LGD_TIMESTAMP",0);
+ $cash['LGD_RESPDATE'] = $xpay->Response("LGD_RESPDATE",0);
+ $cash_info = serialize($cash);
+
+ $sql = " update {$g5['g5_shop_order_table']}
+ set od_cash = '1',
+ od_cash_no = '$cash_no',
+ od_cash_info = '$cash_info'
+ where od_id = '$LGD_OID' ";
+ $result = sql_query($sql, false);
+
+ if(!$result) { // DB 정보갱신 실패시 취소
+ $xpay->Set("LGD_TXNAME", "CashReceipt");
+ $xpay->Set("LGD_METHOD", "CANCEL");
+ $xpay->Set("LGD_PAYTYPE", $LGD_PAYTYPE);
+ $xpay->Set("LGD_TID", $LGD_TID);
+
+ if ($LGD_PAYTYPE == "SC0040"){ //가상계좌건 현금영수증 발급취소시 필수
+ $xpay->Set("LGD_SEQNO", $od['od_casseqno']);
+ }
+
+ if ($xpay->TX()) {
+ /*
+ echo "현금영수증 취소 요청처리가 완료되었습니다.
";
+ echo "TX Response_code = " . $xpay->Response_Code() . "
";
+ echo "TX Response_msg = " . $xpay->Response_Msg() . "
";
+
+ echo "결과코드 : " . $xpay->Response("LGD_RESPCODE",0) . "
";
+ echo "결과메세지 : " . $xpay->Response("LGD_RESPMSG",0) . "
";
+ echo "거래번호 : " . $xpay->Response("LGD_TID",0) . "
";
+ */
+ } else {
+ $msg = '현금영수증 취소 요청처리가 정상적으로 완료되지 않았습니다.';
+ if(!$is_admin)
+ $msg .= '쇼핑몰 관리자에게 문의해 주십시오.';
+
+ alert_close($msg);
+ }
+ }
+ }
+
+} else {
//2)API 요청 실패 화면처리
+ /*
echo "현금영수증 발급/취소 요청처리가 실패되었습니다.
";
echo "TX Response_code = " . $xpay->Response_Code() . "
";
echo "TX Response_msg = " . $xpay->Response_Msg() . "
";
+ */
+
+ $msg = '현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.';
+ $msg .= '\\nTX Response_code = '.$xpay->Response_Code();
+ $msg .= '\\nTX Response_msg = '.$xpay->Response_Msg();
+
+ alert($msg);
}
+
+$g5['title'] = '';
+include_once(G5_PATH.'/head.sub.php');
+
+if($default['de_card_test']) {
+ echo ''.PHP_EOL;
+} else {
+ echo ''.PHP_EOL;
+}
+
+switch($LGD_PAYTYPE) {
+ case 'SC0030':
+ $trade_type = 'BANK';
+ break;
+ case 'SC0040':
+ $trade_type = 'CAS';
+ break;
+ default:
+ $trade_type = 'CR';
+ break;
+}
+?>
+
+
+
현금영수증 - LG U+ eCredit
+
+
+
+
+
+
+
+
+
+ | 결과코드 |
+ Response_Code(); ?> |
+
+
+ | 결과 메세지 |
+ Response_Msg(); ?> |
+
+
+ | 현금영수증 거래번호 |
+ Response("LGD_TID",0); ?> |
+
+
+ | 현금영수증 승인번호 |
+ Response("LGD_CASHRECEIPTNUM",0); ?> |
+
+
+ | 승인시간 |
+ Response("LGD_RESPDATE",0)); ?> |
+
+
+ | 현금영수증 URL |
+
+
+ 영수증 확인은 실 등록의 경우에만 가능합니다.
+ |
+
+
+ |
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php
index 119fedf85..322decb6b 100644
--- a/shop/orderformupdate.php
+++ b/shop/orderformupdate.php
@@ -2,7 +2,7 @@
include_once('./_common.php');
include_once(G5_LIB_PATH.'/mailer.lib.php');
-if($default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
+if($od_settle_case != '무통장' && $default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
alert('결제등록 요청 후 주문해 주십시오.');
// 장바구니가 비어있는가?
@@ -404,8 +404,6 @@ if($default['de_tax_flag_use']) {
}
$od_pg = $default['de_pg_service'];
-if($od_settle_case == '무통장')
- $od_pg = '';
// 주문서에 입력
$sql = " insert {$g5['g5_shop_order_table']}
diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php
index e6bf27cd9..8a74d4d75 100644
--- a/shop/orderinquiryview.php
+++ b/shop/orderinquiryview.php
@@ -26,6 +26,15 @@ $settle_case = $od['od_settle_case'];
$g5['title'] = '주문상세내역';
include_once('./_head.php');
+
+// LG 현금영수증 JS
+if($od['od_pg'] == 'lg') {
+ if($default['de_card_test']) {
+ echo ''.PHP_EOL;
+ } else {
+ echo ''.PHP_EOL;
+ }
+}
?>
@@ -317,17 +326,35 @@ include_once('./_head.php');
-
영수증 출력
+
영수증 출력
-
영수증 출력
+
영수증 출력
@@ -369,16 +396,35 @@ include_once('./_head.php');
-
현금영수증 확인하기
+
현금영수증 확인하기
-
현금영수증을 발급하시려면 클릭하십시오.
+
현금영수증을 발급하시려면 클릭하십시오.
diff --git a/shop/personalpayformupdate.php b/shop/personalpayformupdate.php
index 451b1201c..227862849 100644
--- a/shop/personalpayformupdate.php
+++ b/shop/personalpayformupdate.php
@@ -112,9 +112,12 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
die("Receipt Amount Error");
}
+$pp_pg = $default['de_pg_service'];
+
// 결제정보 입력
$sql = " update {$g5['g5_shop_personalpay_table']}
- set pp_tno = '$pp_tno',
+ set pp_pg = '$pp_pg',
+ pp_tno = '$pp_tno',
pp_app_no = '$app_no',
pp_receipt_price = '$pp_receipt_price',
pp_settle_case = '$pp_settle_case',
@@ -149,6 +152,7 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = od_receipt_price + '$pp_receipt_price',
od_receipt_time = '$pp_receipt_time',
+ od_pg = '$pp_pg',
od_tno = '$pp_tno',
od_app_no = '$app_no',
od_escrow = '$od_escrow',
diff --git a/shop/personalpayresult.php b/shop/personalpayresult.php
index 413c69efe..cfb8920d8 100644
--- a/shop/personalpayresult.php
+++ b/shop/personalpayresult.php
@@ -17,6 +17,15 @@ $settle_case = $pp['pp_settle_case'];
$g5['title'] = '개인결제상세내역';
include_once('./_head.php');
+
+// LG 현금영수증 JS
+if($od['od_pg'] == 'lg') {
+ if($default['de_card_test']) {
+ echo ''.PHP_EOL;
+ } else {
+ echo ''.PHP_EOL;
+ }
+}
?>
@@ -131,17 +140,35 @@ include_once('./_head.php');
-
영수증 출력
+
영수증 출력
-
영수증 출력
+
영수증 출력
diff --git a/shop/taxsave_kcp.php b/shop/taxsave.php
similarity index 83%
rename from shop/taxsave_kcp.php
rename to shop/taxsave.php
index b88374f28..d245e7264 100644
--- a/shop/taxsave_kcp.php
+++ b/shop/taxsave.php
@@ -20,7 +20,12 @@ $amt_svc = 0;
$amt_tax = (int)($amt_tot - $amt_sup);
// 신청폼
-include_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/taxsave_form.php');
+if($od['od_pg'])
+ $dir = $od['od_pg'];
+else
+ $dir = $default['de_pg_service'];
+
+include_once(G5_SHOP_PATH.'/'.$dir.'/taxsave_form.php');
include_once(G5_PATH.'/tail.sub.php');
?>