Changeset 1830608
- Timestamp:
- 02/28/2018 06:31:56 AM (8 years ago)
- Location:
- gnupay-inicis/trunk
- Files:
-
- 24 edited
-
classes/admin_metabox.class.php (modified) (3 diffs)
-
classes/inicis_card_gateway.class.php (modified) (10 diffs)
-
classes/inicis_returnurl.class.php (modified) (1 diff)
-
classes/inicis_tax.class.php (modified) (1 diff)
-
classes/inicis_user_cancel.class.php (modified) (4 diffs)
-
classes/inicis_user_order_details.class.php (modified) (1 diff)
-
classes/inicis_virtualaccount.class.php (modified) (1 diff)
-
config.php (modified) (1 diff)
-
gnupay-inicis.php (modified) (1 diff)
-
inicis/m_next.php (modified) (1 diff)
-
inicis/m_noti.php (modified) (1 diff)
-
inicis/returnurl.php (modified) (4 diffs)
-
inicis/settle_inicis.inc.php (modified) (1 diff)
-
js/inicis_pay.js (modified) (1 diff)
-
lib/INICls.php (modified) (33 diffs)
-
lib/INIDFN.php (modified) (22 diffs)
-
lib/INILib.php (modified) (1 diff)
-
lib/INISoc.php (modified) (2 diffs)
-
lib/INIStdPayUtil.php (modified) (1 diff)
-
lib/INIXml.php (modified) (9 diffs)
-
lib/functions.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
-
template/order_detail.php (modified) (2 diffs)
-
template/tax_result.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gnupay-inicis/trunk/classes/admin_metabox.class.php
r1467295 r1830608 42 42 $pay_ids = gnupay_inicis_get_settings('pay_ids'); 43 43 44 if( !empty($order->payment_method) && in_array($order->payment_method, $pay_ids) ){ 45 $config = gnupay_inicis_get_config_payment( $order->id ); 44 if( !empty($order->get_payment_method()) && in_array($order->payment_method, $pay_ids) ){ 45 $order_id = $order->get_order_number(); 46 $config = gnupay_inicis_get_config_payment( $order_id ); 46 47 47 $payment_method = $order-> payment_method;48 $payment_method = $order->get_payment_method(); 48 49 $pg_url = 'https://iniweb.inicis.com/ '; 49 50 $pg_test = 'inicis'; 50 51 51 $od_pg = get_post_meta($order ->id, '_od_pg', true); //결제 pg사를 저장52 $od_pay_method = get_post_meta($order ->id, '_od_pay_method', true); //결제 pg사를 저장53 $od_tno = get_post_meta($order ->id, '_od_tno', true); //결제 pg사를 주문번호54 $od_app_no = get_post_meta($order ->id, '_od_app_no', true); //결제 승인 번호55 $od_receipt_price = get_post_meta($order ->id, '_od_receipt_price', true); //결제 금액56 $od_test = get_post_meta($order ->id, '_od_test', true); //테스트체크57 $od_escrow = get_post_meta($order ->id, '_od_escrow', true); //에스크로52 $od_pg = get_post_meta($order_id, '_od_pg', true); //결제 pg사를 저장 53 $od_pay_method = get_post_meta($order_id, '_od_pay_method', true); //결제 pg사를 저장 54 $od_tno = get_post_meta($order_id, '_od_tno', true); //결제 pg사를 주문번호 55 $od_app_no = get_post_meta($order_id, '_od_app_no', true); //결제 승인 번호 56 $od_receipt_price = get_post_meta($order_id, '_od_receipt_price', true); //결제 금액 57 $od_test = get_post_meta($order_id, '_od_test', true); //테스트체크 58 $od_escrow = get_post_meta($order_id, '_od_escrow', true); //에스크로 58 59 ?> 59 60 <div class="gp_inicis_admin"> … … 85 86 if( $od_receipt_price && !$order->get_total_refunded() && ($order->get_total() > 0) && in_array($payment_method, array($pay_ids['vbank'], $pay_ids['bank'])) ){ //가상계좌, 계좌이체 86 87 87 $od_cash_info = maybe_unserialize(get_post_meta($order ->id, '_od_cash_info', true));88 $od_cash_info = maybe_unserialize(get_post_meta($order_id, '_od_cash_info', true)); 88 89 89 $od_cash = get_post_meta($order ->id, '_od_cash', true);90 $od_cash = get_post_meta($order_id, '_od_cash', true); 90 91 ?> 91 92 <tr> … … 102 103 <a href="#" onclick="<?php echo $cash_receipt_script; ?>"><?php _e('현금영수증 확인', GNUPAY_INICIS); ?></a> 103 104 <?php } else { ?> 104 <a href="#" onclick="window.open('<?php echo add_query_arg(array('wc-api'=>'gnupay_inicis_tax', 'order_id'=>$order ->id, 'tx'=>'taxsave'), home_url( '/' )); ?>', 'taxsave', 'width=550,height=600,scrollbars=1,menus=0');"><?php _e('현금영수증 발급', GNUPAY_INICIS); ?></a>105 <a href="#" onclick="window.open('<?php echo add_query_arg(array('wc-api'=>'gnupay_inicis_tax', 'order_id'=>$order_id, 'tx'=>'taxsave'), home_url( '/' )); ?>', 'taxsave', 'width=550,height=600,scrollbars=1,menus=0');"><?php _e('현금영수증 발급', GNUPAY_INICIS); ?></a> 105 106 <?php 106 107 } //end if $od_cash -
gnupay-inicis/trunk/classes/inicis_card_gateway.class.php
r1590411 r1830608 61 61 $this->supports = array( 62 62 'refunds', //환불관련 63 'products', 64 'subscriptions', 65 'subscription_cancellation', 63 'products', 66 64 ); 67 65 … … 122 120 if( $result ){ 123 121 if( $this->id == $this->gnupay_inicis_card ){ //카드일때만 실행; 124 $options = apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->sett tings );122 $options = apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings ); 125 123 126 124 $pay_ids = gnupay_inicis_get_settings('pay_ids'); … … 244 242 245 243 $order = wc_get_order( $order_id ); 246 247 if( !in_array($order-> payment_method, gnupay_inicis_get_settings('pay_ids')) ){ //그누페이 이니시스 결제가 아닌경우 리턴244 245 if( !in_array($order->get_payment_method(), gnupay_inicis_get_settings('pay_ids')) ){ //그누페이 이니시스 결제가 아닌경우 리턴 248 246 return; 249 247 } … … 313 311 } 314 312 315 include_once(GNUPAY_INICIS_PATH.'inicis/settle_inicis.inc.php');316 317 313 $currency = 'WON'; 318 314 … … 332 328 //return new WP_Error('inicis_refund_error', $confirm_price.' '.$tax.' '.$taxfree ); 333 329 334 /*********************** 335 * 3. 재승인 정보 설정 * 336 ***********************/ 337 $inipay->SetField("type", "repay"); // 고정 (절대 수정 불가) 338 $inipay->SetField("pgid", "INIphpRPAY"); // 고정 (절대 수정 불가) 339 $inipay->SetField("subpgip", "203.238.3.10"); // 고정 340 $inipay->SetField("mid", $config['de_inicis_mid']); // 상점아이디 341 $inipay->SetField("admin", $config['de_inicis_admin_key']); //비대칭 사용키 키패스워드 342 $inipay->SetField("oldtid", $oldtid); // 취소할 거래의 거래아이디 343 $inipay->SetField("currency", $currency); // 화폐단위 344 $inipay->SetField("price", $price); // 취소금액 345 $inipay->SetField("confirm_price", $confirm_price); // 승인요청금액 346 $inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소 347 $inipay->SetField("tax", $tax); // 부가세금액 348 $inipay->SetField("taxfree", $taxfree); // 비과세금액 349 350 351 /****************** 352 * 4. 재승인 요청 * 353 ******************/ 354 $inipay->startAction(); 355 356 357 /******************************************************************* 358 * 5. 재승인 결과 * 359 * * 360 * 신거래번호 : $inipay->getResult('TID') * 361 * 결과코드 : $inipay->getResult('ResultCode') ("00"이면 재승인 성공) * 362 * 결과내용 : $inipay->getResult('ResultMsg') (재승인결과에 대한 설명) * 363 * 원거래 번호 : $inipay->getResult('PRTC_TID') * 364 * 최종결제 금액 : $inipay->getResult('PRTC_Remains') * 365 * 부분취소 금액 : $inipay->getResult('PRTC_Price') * 366 * 부분취소,재승인 구분값 : $inipay->getResult('PRTC_Type') * 367 * ("0" : 재승인, "1" : 부분취소) * 368 * 부분취소(재승인) 요청횟수 : $inipay->getResult('PRTC_Cnt') * 369 *******************************************************************/ 370 371 372 if($inipay->getResult('ResultCode') == '00') { 330 $is_refund_success = false; // 환불 성공/실패 플래그 변수 초기화 331 332 // 환불할 금액이 주문금액과 같고, 취소하면 남은잔액이 0원이면 333 if( $order->get_total() && (int) $amount === (int) $order->get_total() && (int) $confirm_price === 0 ){ 334 335 // 전액 환불 처리합니다. 336 $is_refund_success = $this->order_inicis_refund($order->get_id(), null, $reason); 337 338 } else { 339 340 include_once(GNUPAY_INICIS_PATH.'inicis/settle_inicis.inc.php'); 341 //아래는 부분취소 처리 342 /*********************** 343 * 3. 재승인 정보 설정 * 344 ***********************/ 345 $inipay->SetField("type", "repay"); // 고정 (절대 수정 불가) 346 $inipay->SetField("pgid", "INIphpRPAY"); // 고정 (절대 수정 불가) 347 $inipay->SetField("subpgip", "203.238.3.10"); // 고정 348 $inipay->SetField("mid", $config['de_inicis_mid']); // 상점아이디 349 $inipay->SetField("admin", $config['de_inicis_admin_key']); //비대칭 사용키 키패스워드 350 $inipay->SetField("oldtid", $oldtid); // 취소할 거래의 거래아이디 351 $inipay->SetField("currency", $currency); // 화폐단위 352 $inipay->SetField("price", $price); // 취소금액 353 $inipay->SetField("confirm_price", $confirm_price); // 승인요청금액 354 $inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소 355 $inipay->SetField("tax", $tax); // 부가세금액 356 $inipay->SetField("taxfree", $taxfree); // 비과세금액 357 358 359 /****************** 360 * 4. 재승인 요청 * 361 ******************/ 362 $inipay->startAction(); 363 364 365 /******************************************************************* 366 * 5. 재승인 결과 * 367 * * 368 * 신거래번호 : $inipay->getResult('TID') * 369 * 결과코드 : $inipay->getResult('ResultCode') ("00"이면 재승인 성공) * 370 * 결과내용 : $inipay->getResult('ResultMsg') (재승인결과에 대한 설명) * 371 * 원거래 번호 : $inipay->getResult('PRTC_TID') * 372 * 최종결제 금액 : $inipay->getResult('PRTC_Remains') * 373 * 부분취소 금액 : $inipay->getResult('PRTC_Price') * 374 * 부분취소,재승인 구분값 : $inipay->getResult('PRTC_Type') * 375 * ("0" : 재승인, "1" : 부분취소) * 376 * 부분취소(재승인) 요청횟수 : $inipay->getResult('PRTC_Cnt') * 377 *******************************************************************/ 378 379 380 if($inipay->getResult('ResultCode') == '00') { 381 382 $is_refund_success = true; 383 384 } else { 385 return new WP_Error('inicis_refund_error', gp_inicis_iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode") ); 386 } 387 388 } //end if 389 390 if( $is_refund_success ){ 373 391 374 392 $payment_gateways = gnupay_inicis_get_gateways(); … … 381 399 wc_price($amount) 382 400 ) ); 383 384 } else { 385 return new WP_Error('inicis_refund_error', gp_inicis_iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode") ); 386 } 387 388 return true; 389 401 return true; 402 } else { 403 return new WP_Error('inicis_refund_error', __( '환불에 실패하였습니다.', GNUPAY_INICIS ) ); 404 } 405 390 406 } catch ( Exception $e ) { 391 407 … … 416 432 **************************/ 417 433 418 $cancel_msg = gp_inicis_iconv_euckr('주문자 본인 취소-'.$reason); 434 $page_msg = is_admin() ? '관리자주문에서 처리-' : '주문자 본인 취소-'; 435 $cancel_msg = gp_inicis_iconv_euckr($page_msg.$reason); 419 436 420 437 /********************* … … 457 474 458 475 $current_user = wp_get_current_user(); 459 $inicis_order->add_order_note( sprintf(__( '%s 님의 요청으로 인해 %s 이 환불되었습니다.', GNUPAY_INICIS ), 460 $current_user->user_login.' ( '.$current_user->ID.' ) ',461 wc_price($amount) 462 ));476 477 $cancel_msg = is_admin() ? __('관리자페이지에서 취소처리 되었습니다.', GNUPAY_INICIS ) : sprintf(__( '%s 님의 요청으로 인해 %s 이 환불되었습니다.', GNUPAY_INICIS ), $current_user->user_login.' ( '.$current_user->ID.' ) ', wc_price($amount)); 478 479 $inicis_order->add_order_note($cancel_msg); 463 480 464 481 return true; … … 899 916 900 917 if( !ini_get('allow_url_fopen') ) { 901 $this->gnu_errors[] = sprintf(__('allow_url_fopen 을 php.ini 에서 활성화 해주세요.', GNUPAY_INICIS), $config['de_inicis_mid']);918 //$this->gnu_errors[] = sprintf(__('allow_url_fopen 을 php.ini 에서 활성화 해주세요.', GNUPAY_INICIS), $config['de_inicis_mid']); 902 919 } 903 920 … … 1002 1019 $res = wp_parse_args(array( 1003 1020 'result' => 'success', 1004 'order_id' => $order-> id,1021 'order_id' => $order->get_order_number(), 1005 1022 'order_key' => $order->order_key, 1006 1023 'redirect' => $this->get_return_url( $order ) -
gnupay-inicis/trunk/classes/inicis_returnurl.class.php
r1422798 r1830608 61 61 break; 62 62 } 63 64 if( !$inicispay ){ 65 wp_redirect(home_url()); 66 } 63 67 exit; 64 68 } -
gnupay-inicis/trunk/classes/inicis_tax.class.php
r1427188 r1830608 60 60 $od_tel = $order->billing_phone; 61 61 62 $od_tax_mny = get_post_meta($order->id, '_od_tax_mny', true); 63 $od_vat_mny = get_post_meta($order->id, '_od_vat_mny', true); 64 $od_free_mny = get_post_meta($order->id, '_od_free_mny', true); 65 $od_tax_flag = get_post_meta($order->id, '_od_tax_flag', true); 62 $order_id = $order->get_order_number(); 63 $od_tax_mny = get_post_meta($order_id, '_od_tax_mny', true); 64 $od_vat_mny = get_post_meta($order_id, '_od_vat_mny', true); 65 $od_free_mny = get_post_meta($order_id, '_od_free_mny', true); 66 $od_tax_flag = get_post_meta($order_id, '_od_tax_flag', true); 66 67 67 68 $amt_sup = 0; //공급가액 초기화 -
gnupay-inicis/trunk/classes/inicis_user_cancel.class.php
r1439769 r1830608 17 17 $order = wc_get_order( $order_id ); 18 18 19 if( !in_array($order-> payment_method, gnupay_inicis_get_settings('pay_ids')) ){ //그누페이 이니시스 결제가 아닌경우 리턴19 if( !in_array($order->get_payment_method(), gnupay_inicis_get_settings('pay_ids')) ){ //그누페이 이니시스 결제가 아닌경우 리턴 20 20 return; 21 21 } … … 35 35 $payment_gateways = $this->get_gateways(); 36 36 37 $payment_method = get_post_meta( $order ->id, '_payment_method', true );37 $payment_method = get_post_meta( $order_id, '_payment_method', true ); 38 38 39 39 $file_path = plugin_dir_path( __FILE__ ).'classes/inicis_card_gateway.class.php'; … … 42 42 $refund_reason = __('사용자 주문 취소', GNUPAY_INICIS); 43 43 44 $result = $payment_gateways[ $order-> payment_method]->order_inicis_refund( $order_id, $refund_amount, $refund_reason );44 $result = $payment_gateways[ $order->get_payment_method() ]->order_inicis_refund( $order_id, $refund_amount, $refund_reason ); 45 45 46 46 $current_user = wp_get_current_user(); … … 88 88 $payment_gateways = $this->get_gateways(); 89 89 90 $payment_method = get_post_meta( $order-> id, '_payment_method', true );90 $payment_method = get_post_meta( $order->get_order_number(), '_payment_method', true ); 91 91 92 92 if( !in_array($payment_method, gnupay_inicis_get_settings('pay_ids')) ){ -
gnupay-inicis/trunk/classes/inicis_user_order_details.class.php
r1422798 r1830608 13 13 public function order_table($order){ 14 14 15 $order_id = $order-> id;15 $order_id = $order->get_order_number(); 16 16 17 17 if( ! gp_inicis_order_can_view($order_id) ){ //볼수 있는 권한이 없으면 -
gnupay-inicis/trunk/classes/inicis_virtualaccount.class.php
r1568394 r1830608 210 210 $pay_options = get_option( $this->plugin_id . $this->id . '_settings' ); 211 211 212 if( ! isset($order->id) || empty($order->id) ){212 if( ! $order->get_order_number() ){ 213 213 return; 214 214 } -
gnupay-inicis/trunk/config.php
r1590411 r1830608 5 5 public function __construct() { 6 6 7 define( 'GNUPAY_INICIS_VERSION', '1.3. 3' );7 define( 'GNUPAY_INICIS_VERSION', '1.3.4' ); 8 8 define( 'GNUPAY_INICIS', 'gnupay-inicis' ); 9 9 define( 'GNUPAY_INICIS_ORDER_TMP', '_order_tmp_inicis' ); -
gnupay-inicis/trunk/gnupay-inicis.php
r1590411 r1830608 6 6 * Author: SIR Soft 7 7 * Author URI: http://sir.kr 8 * Version: 1.3. 38 * Version: 1.3.4 9 9 * Tested up to: 4.5 10 10 * Text Domain: gnupay-inicis -
gnupay-inicis/trunk/inicis/m_next.php
r1439769 r1830608 52 52 parse_str($return, $ret); 53 53 $PAY = array_map('trim', $ret); 54 $PAY = array_map('strip_tags', $PAY); 55 $PAY = array_map('sanitize_text_field', $PAY); 54 56 55 57 if($PAY['P_STATUS'] != '00') -
gnupay-inicis/trunk/inicis/m_noti.php
r1568394 r1830608 79 79 $is_noti = true; 80 80 $noti_tno = get_post_meta( $order_id, '_od_tno', true ); 81 $app_no = $P AY["P_AUTH_NO"]; //승인번호;81 $app_no = $P_AUTH_NO; //승인번호; 82 82 83 83 update_post_meta($order_id, '_is_noti', 1); //inicis noti로 받아온건지 수정 -
gnupay-inicis/trunk/inicis/returnurl.php
r1467295 r1830608 73 73 $authUrl = isset($_REQUEST["authUrl"]) ? sanitize_text_field($_REQUEST["authUrl"]) : ''; // 승인요청 API url(수신 받은 값으로 설정, 임의 세팅 금지) 74 74 75 $netCancel = isset($_REQUEST["netCancel"]) ? sanitize_text_field($_REQUEST["netCancel"]) : ''; // 망취소 API url(수신 받은f값으로 설정, 임의 세팅 금지) 76 77 $ackUrl = isset($_REQUEST["checkAckUrl"]) ? sanitize_text_field($_REQUEST["checkAckUrl"]) : ''; // 가맹점 내부 로직 처리후 최종 확인 API URL(수신 받은 값으로 설정, 임의 세팅 금지) 75 $netCancel = isset($_REQUEST["netCancelUrl"]) ? sanitize_text_field($_REQUEST["netCancelUrl"]) : ''; // 망취소 API url(수신 받은f값으로 설정, 임의 세팅 금지) 78 76 79 77 //##################### … … 145 143 처리중 에러 발생시 망취소를 한다. 146 144 * **************************************************************************** */ 147 148 149 /* * ***************************************************************************150 내부로직 처리가 정상적으로 완료 되면 ackUrl로 결과 통신한다.151 만약 ACK통신중 에러 발생시(exeption) 망취소를 한다.152 * **************************************************************************** */153 $checkMap["mid"] = $mid; // 필수154 $checkMap["tid"] = $resultMap["tid"]; // 필수155 $checkMap["applDate"] = $resultMap["applDate"]; // 필수156 $checkMap["applTime"] = $resultMap["applTime"]; // 필수157 $checkMap["price"] = $resultMap["TotPrice"]; // 필수158 $checkMap["goodsName"] = isset($resultMap["goodsname"]) ? $resultMap["goodsname"] : ''; // 필수159 $checkMap["charset"] = $charset; // default=UTF-8160 $checkMap["format"] = $format; // default=XML161 162 $ackResultString = "";163 if ($httpUtil->processHTTP($ackUrl, $checkMap)) {164 $ackResultString = $httpUtil->body;165 } else {166 echo "Http Connect Error\n";167 echo $httpUtil->errormsg;168 169 throw new Exception("Http Connect Error");170 }171 172 $ackMap = json_decode($ackResultString);173 145 174 146 echo "<tr><th class='td01'><p>거래 성공 여부</p></th>"; … … 200 172 //공통 부분만 201 173 174 // 수신결과를 파싱후 resultCode가 "0000"이면 승인성공 이외 실패 175 // 가맹점에서 스스로 파싱후 내부 DB 처리 후 화면에 결과 표시 176 // payViewType을 popup으로 해서 결제를 하셨을 경우 177 // 내부처리후 스크립트를 이용해 opener의 화면 전환처리를 하세요 178 //throw new Exception("강제 Exception"); 179 202 180 $savedata = serialize($resultMap); 203 181 … … 271 249 echo "<pre>", $netcancelResultString . "</pre>"; 272 250 // 취소 결과 확인 273 274 if(isset($resultMap['tid'])){275 $tno = $resultMap['tid'];276 include GNUPAY_INICIS_PATH.'/inicis/inipay_cancel.php';277 }278 251 } 279 252 } else { -
gnupay-inicis/trunk/inicis/settle_inicis.inc.php
r1467295 r1830608 102 102 103 103 $inipay->SetField("inipayhome", GNUPAY_INICIS_KEY_PATH); // 이니페이 홈디렉터리(상점수정 필요) 104 $inipay->SetField("debug", GNUPAY_INICIS_DEBUG); // 로그모드("true"로 설정하면 상세로그가 생성됨.)104 $inipay->SetField("debug", "false"); // 로그모드("true"로 설정하면 상세로그가 생성됨.) 105 105 ?> -
gnupay-inicis/trunk/js/inicis_pay.js
r1590411 r1830608 27 27 }, 28 28 form_set : function(f, json){ 29 30 console.log( json ); 29 31 30 32 if(json.shipping_last_name == ''){ -
gnupay-inicis/trunk/lib/INICls.php
r1467295 r1830608 4 4 * Copyright (C) 2007 INICIS Inc. 5 5 * 6 * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼´Â ¾ÈµË´Ï´Ù.7 * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.6 * 해당 라이브러리는 절대 수정되어서는 안됩니다. 7 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다. 8 8 * 9 9 */ … … 14 14 /* Global Variables */ 15 15 /* ----------------------------------------------------- */ 16 16 17 $paymethod = isset($paymethod) ? $paymethod : isset($_REQUEST['paymethod']) ? sanitize_text_field($_REQUEST['paymethod']) : ''; 17 18 18 19 switch ($paymethod) { 19 case('Card'): // ½Å¿ëÄ«µå20 case('Card'): // 신용카드 20 21 $pgid = "CARD"; 21 22 break; 22 case('Account'): // ÀºÇà °èÁ ÀÌü23 case('Account'): // 은행 계좌 이체 23 24 $pgid = "ACCT"; 24 25 break; 25 case('DirectBank'): // ½Ç½Ã°£ °èÁ ÀÌü26 case('DirectBank'): // 실시간 계좌 이체 26 27 $pgid = "DBNK"; 27 28 break; … … 29 30 $pgid = "OCBP"; 30 31 break; 31 case('VCard'): // ISP °áÁ¦32 case('VCard'): // ISP 결제 32 33 $pgid = "ISP_"; 33 34 break; 34 case('HPP'): // ÈÞ´ëÆù °áÁ¦35 case('HPP'): // 휴대폰 결제 35 36 $pgid = "HPP_"; 36 37 break; 37 case('ArsBill'): // 700 ÀüȰáÁ¦38 case('ArsBill'): // 700 전화결제 38 39 $pgid = "ARSB"; 39 40 break; 40 case('PhoneBill'): // PhoneBill °áÁ¦(¹Þ´Â ÀüÈ)41 case('PhoneBill'): // PhoneBill 결제(받는 전화) 41 42 $pgid = "PHNB"; 42 43 break; 43 case('Ars1588Bill'):// 1588 ÀüȰáÁ¦44 case('Ars1588Bill'):// 1588 전화결제 44 45 $pgid = "1588"; 45 46 break; 46 case('VBank'): // °¡»ó°èÁ ÀÌü47 case('VBank'): // 가상계좌 이체 47 48 $pgid = "VBNK"; 48 49 break; 49 case('Culture'): // ¹®È»óǰ±Ç °áÁ¦50 case('Culture'): // 문화상품권 결제 50 51 $pgid = "CULT"; 51 52 break; 52 case('CMS'): // CMS °áÁ¦53 case('CMS'): // CMS 결제 53 54 $pgid = "CMS_"; 54 55 break; 55 case('AUTH'): // ½Å¿ëÄ«µå À¯È¿¼º °Ë»ç56 case('AUTH'): // 신용카드 유효성 검사 56 57 $pgid = "AUTH"; 57 58 break; 58 case('INIcard'): // ³×Ƽ¸Ó´Ï °áÁ¦59 case('INIcard'): // 네티머니 결제 59 60 $pgid = "INIC"; 60 61 break; 61 case('MDX'): // ¸óµ¦½ºÄ«µå62 case('MDX'): // 몬덱스카드 62 63 $pgid = "MDX_"; 63 64 break; 64 default: // »ó±â ÁöºÒ¼ö´Ü ¿Ü Ãß°¡µÇ´Â ÁöºÒ¼ö´ÜÀÇ °æ¿ì ±âº»À¸·Î paymethod°¡ 4ÀÚ¸®·Î ³Ñ¾î¿Â´Ù.65 default: // 상기 지불수단 외 추가되는 지불수단의 경우 기본으로 paymethod가 4자리로 넘어온다. 65 66 $pgid = $paymethod; 66 67 } … … 69 70 70 71 if ($quotainterest == "1") { 71 $interest = "( ¹«ÀÌÀÚÇÒºÎ)";72 $interest = "(무이자할부)"; 72 73 } 73 74 … … 76 77 /* ----------------------------------------------------- */ 77 78 78 function Base64Encode($str) { 79 return substr(chunk_split(base64_encode($str), 64, "\n"), 0, -1) . "\n"; 79 if( !function_exists('Base64Encode') ){ 80 function Base64Encode($str) { 81 return substr(chunk_split(base64_encode($str), 64, "\n"), 0, -1) . "\n"; 82 } 80 83 } 81 84 82 function GetMicroTime() { 83 list($usec, $sec) = explode(" ", microtime(true)); 84 return (float) $usec + (float) $sec; 85 if( !function_exists('GetMicroTime') ){ 86 function GetMicroTime() { 87 list($usec, $sec) = explode(" ", microtime(true)); 88 return (float) $usec + (float) $sec; 89 } 85 90 } 86 91 87 function SetTimestamp() { 88 $m = explode(' ', microtime()); 89 list($totalSeconds, $extraMilliseconds) = array($m[1], (int) round($m[0] * 1000, 3)); 90 return date("Y-m-d H:i:s", $totalSeconds) . ":$extraMilliseconds"; 92 if( !function_exists('SetTimestamp') ){ 93 function SetTimestamp() { 94 $m = explode(' ', microtime()); 95 list($totalSeconds, $extraMilliseconds) = array($m[1], (int) round($m[0] * 1000, 3)); 96 return date("Y-m-d H:i:s", $totalSeconds) . ":$extraMilliseconds"; 97 } 91 98 } 92 93 99 /* ----------------------------------------------------- */ 94 100 /* LOG Class */ 95 101 /* ----------------------------------------------------- */ 102 103 if ( ! class_exists( 'INILog' ) ) : 96 104 97 105 class INILog { … … 129 137 $type = $this->type; 130 138 if ($this->mergelog == "1") 131 $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_mergelog_" . date("ymd") . ".log"; 139 $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_mergelog_" . date("ymd") . ".log"; //로그기록 임의 수정 132 140 else 133 $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_" . $this->mid . "_" . date("ymd") . ".log"; 141 $logfile = $this->homedir . "/log/" . PROGRAM . "_" . $type . "_" . $this->mid . "_" . date("ymd") . ".log"; //로그기록 임의 수정 142 134 143 $this->handle = fopen($logfile, "a+"); 135 144 if (!$this->handle) … … 168 177 169 178 } 179 180 endif; //end class INILog 170 181 171 182 /* ----------------------------------------------------- */ … … 175 186 /* -Check Field Function */ 176 187 /* ----------------------------------------------------- */ 188 189 if ( ! class_exists( 'INIData' ) ) : 177 190 178 191 class INIData { … … 191 204 var $m_PG2IP; 192 205 //---------------------------- 193 //IFD ¿äûÇʵå206 //IFD 요청필드 194 207 //---------------------------- 195 208 var $m_sCmd; … … 208 221 var $m_sSessionKey; 209 222 //---------------------------- 210 //IFD ÀÀ´äÇì´õ Çʵå223 //IFD 응답헤더 필드 211 224 //---------------------------- 212 225 var $m_FlgCrypto; … … 218 231 var $m_REQUEST = array(); 219 232 var $m_REQUEST2 = array(); //User Defined Entity 220 var $m_RESULT = array(); //Encrypted Çʵåhash table233 var $m_RESULT = array(); //Encrypted 필드 hash table 221 234 var $m_RESULT2 = array(); //PG Added Entity 222 235 … … 241 254 $this->m_sCrypto = FLAG_CRYPTO_3DES; 242 255 } 243 // °¡»ó°èÁ ºÎºÐȯºÒ Ãß°¡256 //가상계좌 부분환불 추가 244 257 else if (( $this->m_Type == TYPE_REPAY) || ( $this->m_Type == TYPE_VACCTREPAY)) { 245 258 $this->m_sCmd = CMD_REQ_PRTC; … … 268 281 $this->m_sCrypto = FLAG_CRYPTO_3DES; 269 282 } 270 } else if ($this->m_Type == TYPE_REFUND) { // °¡»ó°èÁÂȯºÒ(09.08.05)283 } else if ($this->m_Type == TYPE_REFUND) { //가상계좌환불(09.08.05) 271 284 $this->m_sCmd = CMD_REQ_RFD; 272 285 $this->m_sCrypto = FLAG_CRYPTO_3DES; … … 289 302 function CheckField() { 290 303 //--------------------------------- 291 // °øÅë304 //공통 292 305 //--------------------------------- 293 306 if (trim($this->m_REQUEST["inipayhome"]) == "") { … … 312 325 } 313 326 //--------------------------------- 314 //type º°·Î327 //type별로 315 328 //--------------------------------- 316 329 if ($this->m_Type == TYPE_SECUREPAY) { … … 381 394 } 382 395 } 383 // °¡»ó°èÁ ºÎºÐȯºÒµµ ºÎºÐȯºÒ ·ÎÁ÷¿¡ Ãß°¡396 //가상계좌 부분환불도 부분환불 로직에 추가 384 397 else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) { 385 398 if (trim($this->m_REQUEST["oldtid"]) == "") { … … 399 412 } 400 413 401 // °¡»ó°èÁ ºÎºÐȯºÒ ·ÎÁ÷¿¡¼´Â °èÁ¶¹øÈ£,ÀºÇàÄÚµå,°èÁÂÁÖ¸íÀÌ Çʼö414 //가상계좌 부분환불 로직에서는 계조번호,은행코드,계좌주명이 필수 402 415 if ($this->m_Type == TYPE_VACCTREPAY) { 403 416 if (trim($this->m_REQUEST["refundacctnum"]) == "") { 404 417 $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM; 405 $this->m_ErrMsg = " ȯºÒ°èÁ¹øÈ£";418 $this->m_ErrMsg = "환불계좌번호"; 406 419 return false; 407 420 } 408 421 if (trim($this->m_REQUEST["refundbankcode"]) == "") { 409 422 $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE; 410 $this->m_ErrMsg = " ȯºÒÀºÇàÄÚµå";423 $this->m_ErrMsg = "환불은행코드"; 411 424 return false; 412 425 } 413 426 if (trim($this->m_REQUEST["refundacctname"]) == "") { 414 427 $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME; 415 $this->m_ErrMsg = " ȯºÒ°èÁÂÁÖ¼º¸í";428 $this->m_ErrMsg = "환불계좌주성명"; 416 429 return false; 417 430 } … … 436 449 if (trim($this->m_REQUEST["racctnum"]) == "") { 437 450 $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM; 438 $this->m_ErrMsg = " ȯºÒ°èÁ¹øÈ£";451 $this->m_ErrMsg = "환불계좌번호"; 439 452 return false; 440 453 } 441 454 if (trim($this->m_REQUEST["rbankcode"]) == "") { 442 455 $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE; 443 $this->m_ErrMsg = " ȯºÒÀºÇàÄÚµå";456 $this->m_ErrMsg = "환불은행코드"; 444 457 return false; 445 458 } 446 459 if (trim($this->m_REQUEST["racctname"]) == "") { 447 460 $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME; 448 $this->m_ErrMsg = " ȯºÒ°èÁÂÁÖ¼º¸í";461 $this->m_ErrMsg = "환불계좌주성명"; 449 462 return false; 450 463 } … … 463 476 $datestr = date("YmdHis", $sec) . substr($usec, 2, 3); //YYYYMMDDHHMMSSSSS 464 477 465 $datestr_con = substr($datestr, 0, 14) . substr($datestr, 15, 2); //YYYYMMDDHHMMSSxSS Áß°£ÀÇ x°ªÀº ¹ö¸²(milli secondÀÇ Ã¹¹øÂ° ÀÚ¸®¼ö)466 467 mt_srand(getmypid() * mt_rand(1, 999)); //mt_rand ÇϱâÀü¿¡ srand ·Î seed Àû¿ë, seed key = pid * mt_rand(1,999)468 //pgid + mid + 16 ÀÚ¸® ³¯Â¥¹× ½Ã°£ + random_key 4ÀÚ¸® (seedÀû¿ë)478 $datestr_con = substr($datestr, 0, 14) . substr($datestr, 15, 2); //YYYYMMDDHHMMSSxSS 중간의 x값은 버림(milli second의 첫번째 자리수) 479 480 mt_srand(getmypid() * mt_rand(1, 999)); //mt_rand 하기전에 srand 로 seed 적용 , seed key = pid * mt_rand(1,999) 481 //pgid + mid + 16자리 날짜및 시간 + random_key 4자리 (seed적용) 469 482 $this->m_sTID = $this->m_REQUEST["pgid"] . $this->m_REQUEST["mid"] . $datestr_con . mt_rand(1000, 9999); 470 483 if (strlen($this->m_sTID) != TID_LEN) { … … 527 540 $CD = $xml->add_node($CI, TX_PRTC_QUOTA, $this->m_REQUEST["cardquota"]); 528 541 $CD = $xml->add_node($CI, TX_PRTC_INTEREST, $this->m_REQUEST["quotainterest"]); 529 //I °èÁÂÀÌü ±¹¹ÎÀºÇà ºÎºÐÃë¼Ò½Ã °èÁ¹øÈ£ °èÁÂÁÖ¼º¸íÀ» ¹ÞÀ½2011-10-06542 //I계좌이체 국민은행 부분취소시 계좌번호 계좌주성명을 받음 2011-10-06 530 543 $CD = $xml->add_node($CI, TX_PRTC_NOACCT, $this->m_REQUEST["no_acct"]); 531 544 $CD = $xml->add_node($CI, TX_PRTC_NMACCT, $this->m_REQUEST["nm_acct"], array("urlencode" => "1")); 532 // °ú¼¼,ºñ°ú¼¼ Ãß°¡2014-07-23 by jung.ks545 //과세,비과세 추가 2014-07-23 by jung.ks 533 546 //$CD = $xml->add_node($CI, TX_PRTC_TAX, $this->m_REQUEST["tax"] ); 534 547 //$CD = $xml->add_node($CI, TX_PRTC_TAXFREE, $this->m_REQUEST["taxfree"] ); … … 536 549 $this->AddUserDefinedEntity(PARTCANCELINFO, "", $xml, $CI); 537 550 } 538 // °¡»ó°èÁ ºÎºÐȯºÒ551 //가상계좌 부분환불 539 552 else if ($this->m_Type == TYPE_VACCTREPAY) { 540 553 //PartCancelInfo(ROOT) … … 685 698 $xml = new XML(); 686 699 687 //ROOT(INIpay) ROOT ¸¦ ROOTINFO·Î ¼öÁ¤2011-05-23700 //ROOT(INIpay) ROOT를 ROOTINFO로 수정 2011-05-23 688 701 $root = $xml->add_node("", ROOTINFO); 689 702 690 703 if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) { 691 704 //GoodsInfo 692 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)693 //==goodscnt °¡ ¾øÀ» °æ¿ì(Àå¹Ù±¸´Ï ±â´ÉÀÌ ¾Æ´Ò°æ¿ì) ±âº» °ª 1·Î ¼³Á¤705 //장바구니 기능 추가(2010.04.13) 706 //==goodscnt가 없을 경우(장바구니 기능이 아닐경우) 기본 값 1로 설정 694 707 $tGoodCnt = ($this->m_REQUEST["goodscnt"] != null && (int) $this->m_REQUEST["goodscnt"] > 0 ) ? $this->m_REQUEST["goodscnt"] : 1; 695 708 696 709 $GI = $xml->add_node($root, GOODSINFO); 697 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)698 //==TX_GOOSCNT ´Â $tGoodCnt·Î ºÎÅÍ ÀÔ·Â710 //장바구니 기능 추가(2010.04.13) 711 //==TX_GOOSCNT는 $tGoodCnt로 부터 입력 699 712 //$GP = $xml->add_node($GI, TX_GOOSCNT, "1" ); 700 713 $GP = $xml->add_node($GI, TX_GOOSCNT, $tGoodCnt); … … 705 718 $this->AddUserDefinedEntity(GOODSINFO, "", $xml, $GI); 706 719 707 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [START]708 //== Àå¹Ù±¸´Ï XML Àü¹® Ãß°¡720 //장바구니 기능 추가(2010.04.13) [START] 721 //==장바구니 XML 전문 추가 709 722 $iGoodCnt = 1; 710 723 while ($iGoodCnt <= $tGoodCnt) { … … 731 744 $iGoodCnt++; 732 745 } 733 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [END]746 //장바구니 기능 추가(2010.04.13) [END] 734 747 735 748 $this->AddUserDefinedEntity(GOODSINFO, GOODS, $xml, $GS); … … 768 781 $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted); 769 782 } 770 // °¡»ó°èÁ ºÎºÐȯºÒÃß°¡783 //가상계좌 부분환불추가 771 784 else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) { 772 785 //PartCancelInfo … … 807 820 } else if ($this->m_Type == TYPE_OPENSUB) { 808 821 //GoodsInfo 809 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)810 //==goodscnt °¡ ¾øÀ» °æ¿ì(Àå¹Ù±¸´Ï ±â´ÉÀÌ ¾Æ´Ò°æ¿ì) ±âº» °ª 1·Î ¼³Á¤822 //장바구니 기능 추가(2010.04.13) 823 //==goodscnt가 없을 경우(장바구니 기능이 아닐경우) 기본 값 1로 설정 811 824 $tSubCnt = ($this->m_REQUEST["subcnt"] != null && (int) $this->m_REQUEST["subcnt"] > 0 ) ? $this->m_REQUEST["subcnt"] : 1; 812 825 … … 832 845 $iSubCnt++; 833 846 } 834 // Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [END]847 //장바구니 기능 추가(2010.04.13) [END] 835 848 $this->AddUserDefinedEntity(OPENSUBINFO, "", $xml, $OI); 836 849 } … … 904 917 905 918 //PAYMENTINFO 906 // ±âŸÁöºÒ¼ö´ÜÀÌ paymethod¸¦ ÁÖÁö ¾Ê¾Æ Àӽ÷Π¿äû Paymethod·Î ´ëü907 //PG ¿¡¼ ÁÖ´Â PayMethod¿Í ¿äûPaymethod´Â °°´Ù!919 //기타지불수단이 paymethod를 주지 않아 임시로 요청 Paymethod로 대체 920 //PG에서 주는 PayMethod와 요청Paymethod는 같다! 908 921 $this->m_RESULT[NM_PAYMETHOD] = $this->m_sPayMethod; 909 922 … … 931 944 932 945 if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) { 933 // ½ÂÀγ¯Â¥(ApplDate), ½ÂÀνð£(ApplTime), ½ÂÀιøÈ£(ApplNum)´Â °øÅë!!(OCB, Çö±Ý¿µ¼öÁõ Á¦¿Ü)934 //ISP, CARD ´Â CARD·Î assign. °í°´/»óÁ¡Àº ISP°¡ ¹ºÁö, CARD°¡ ¹ºÁö ¾Ë°Ô ¹¹¾ß!!!-_-946 //승인날짜(ApplDate), 승인시간(ApplTime), 승인번호(ApplNum)는 공통!!(OCB, 현금영수증 제외) 947 //ISP, CARD는 CARD로 assign. 고객/상점은 ISP가 뭔지, CARD가 뭔지 알게 뭐야!!!-_- 935 948 if ($this->m_sPayMethod == NM_TX_CARD) { 936 949 $this->m_RESULT[APPLDATE] = $this->GetXMLData(CARD_APPLDATE); … … 997 1010 $this->m_RESULT[APPLNUM] = $this->GetXMLData(GAMG_APPLNUM); 998 1011 $this->m_RESULT[GAMG_CNT] = $this->GetXMLData(GAMG_CNT); 999 // °ÔÀÓ¹®È»óǰ±ÇÀº Multi°áÁ¦ °¡´É1012 //게임문화상품권은 Multi결제 가능 1000 1013 MakePathGAMG($this->m_RESULT[GAMG_CNT]); 1001 1014 for ($i = 1; $i <= $this->m_RESULT[GAMG_CNT]; $i++) { … … 1064 1077 } 1065 1078 1066 // Xpath ·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!1079 // Xpath로 안가져온다. 한달을 헛지랄 했다!! 1067 1080 // added by ddaemiri, 2007.09.03 1068 1081 function GetXMLData($node) { … … 1075 1088 } 1076 1089 1090 endif; //End class INIData 1091 1077 1092 /* ----------------------------------------------------- */ 1078 1093 /* Crypto Class */ 1079 /* PHP4.2 & OpenSSL ÇÊ¿ä) */1094 /* PHP4.2 & OpenSSL 필요) */ 1080 1095 /* ----------------------------------------------------- */ 1096 1097 if ( ! class_exists( 'INICrypto' ) ) : 1081 1098 1082 1099 class INICrypto { … … 1338 1355 1339 1356 } 1357 1358 endif; // End class INICrypto 1340 1359 ?> 1341 -
gnupay-inicis/trunk/lib/INIDFN.php
r1467295 r1830608 4 4 * Copyright (C) 2007 INICIS Inc. 5 5 * 6 * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼´Â ¾ÈµË´Ï´Ù.7 * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.6 * 해당 라이브러리는 절대 수정되어서는 안됩니다. 7 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다. 8 8 * 9 9 * @version 5.0 … … 16 16 * @buildno 5001 17 17 * @date 2008.01.15 18 * @note ÀÚü¿¡½ºÅ©·Î Ãß°¡, DNS Lookup Timeout Ãß°¡, DNS Lookup ½ÇÆÐ½Ã socket close¾ÈÇÏ´Â ºÎºÐ Ãß°¡18 * @note 자체에스크로 추가, DNS Lookup Timeout 추가, DNS Lookup 실패시 socket close안하는 부분 추가 19 19 * @date 2008.01.16 20 * @note Encrypt,Decrypt ¸ðµâ °³¼±, pkcs5 padding Ãß°¡20 * @note Encrypt,Decrypt 모듈 개선, pkcs5 padding 추가 21 21 * @date 2008.01.24 22 22 * @note non block connect immediate return check code/str 23 23 * @date 2008.02.11 24 * @note key load ÈÄ read¿¡·¯¹ß»ý½Ã fclose Ãß°¡24 * @note key load 후 read에러발생시 fclose 추가 25 25 * @date 2008.03.03 26 * @note ÂüÁ¶¿¡ ÀÇÇÑ Àü´Þ(passing by reference) ¼öÁ¤26 * @note 참조에 의한 전달(passing by reference) 수정 27 27 * @date 2008.03.11 28 * @note ¿¡½ºÅ©·Î ¸ÁÃë¼Ò Cmd Ãß°¡28 * @note 에스크로 망취소 Cmd 추가 29 29 * @date 2008.03.12 30 * @note ±âÁ¸ ¿¬°áµÈ IP·Î ¸ÁÃë¼Ò ¼öÁ¤30 * @note 기존 연결된 IP로 망취소 수정 31 31 * @buildno 5002 32 * @note ¸ÁÃë¼Ò½Ã SignÃß°¡(±âÁ¸¿¡ ¾ÈÇßÀ½->5001Àº ¸ÁÃë¼Ò½Ã ¼¹öÃø¿¡¼ ¼¸í¿À·ù°¡ ³²,±×·¡µµ ¸ÁÃë¼Ò󸮴 µÊ)32 * @note 망취소시 Sign추가(기존에 안했음->5001은 망취소시 서버측에서 서명오류가 남,그래도 망취소처리는 됨) 33 33 * @date 2008.03.12 34 34 * @buildno 5016 35 * @note pg1ip, pg2ip Ãß°¡/Ãë¼Ò ¿ø°Å·¡¾øÀ½½Ã drpg·Î Àç½Ãµµ35 * @note pg1ip, pg2ip 추가/취소 원거래없음시 drpg로 재시도 36 36 * @date 2008.04.02 37 37 * @buildno 5017 38 * @note 1)chkfake ½Ã ÆÄ¶ó¹ÌÅÍ ·Î±ë »èÁ¦(Áߺ¹)39 * 2)call-time pass-by-reference => pass-by-value ·Î ¼öÁ¤38 * @note 1)chkfake시 파라미터 로깅 삭제(중복) 39 * 2)call-time pass-by-reference => pass-by-value로 수정 40 40 * @date 2009.01.12 41 41 * @buildno 5019 … … 44 44 * @note add mkey/mergelog ( for Makeshop ) 45 45 * @date 2009.02.24 46 * @note 1)define MKEY deprecated 2009.02.19 ( Makeshop Ãʱâ Çѹø³ª°¨. ¼ºñ½ºµÇ°í ÀÖ´ÂÁö´Â ¸ð¸§)47 * 2)Makeshop PG Updrade ¿ëÀ¸·Î »õ·Î³ª°¨ 2009.02.19 (interface¿¡¼ mkey°ªÀ» ¹Þ¾Æ ó¸®ÇÏ°Ô º¯°æ)48 * 3)Makeshop PG Updrade ¿ëÀ¸·Î »õ·Î³ª°¨ 2009.02.24 (interface¿¡¼ mergelog°ªÀ» ¹Þ¾Æ ó¸®ÇÏ°Ô º¯°æ)46 * @note 1)define MKEY deprecated 2009.02.19 ( Makeshop 초기 한번나감. 서비스되고 있는지는 모름) 47 * 2)Makeshop PG Updrade용으로 새로나감 2009.02.19 (interface에서 mkey값을 받아 처리하게 변경) 48 * 3)Makeshop PG Updrade용으로 새로나감 2009.02.24 (interface에서 mergelog값을 받아 처리하게 변경) 49 49 * @date 2009.05.07 50 50 * @note add BUILDDATE in TXVersion … … 58 58 * @note add Tax, TaxFree info(TX_TAX, TX_TAXFREE) 59 59 * @date 2010.09.09 60 * @note Ãë¼Ò¿äû½Ã PG ¼³Á¤ º¯°æ(µµ¸ÞÀÎ->IP, INILib.php)60 * @note 취소요청시 PG 설정 변경(도메인->IP, INILib.php) 61 61 * @note BUILDDATE update(100414 -> 100909) 62 * @note 2011.05.23 5030 XML ELEMENT Áß ROOT ¸¦ ROOTINFO·Î ¼öÁ¤62 * @note 2011.05.23 5030 XML ELEMENT 중 ROOT 를 ROOTINFO로 수정 63 63 * @buildno 5032 64 * @note 2012.07.09 °Å·¡Á¶È¸ Ãß°¡(TYPE_INQUIRY)65 * @note 2012.07.09 PHP ini ÆÄÀÏ error display setting Ãß°¡64 * @note 2012.07.09 거래조회 추가 (TYPE_INQUIRY) 65 * @note 2012.07.09 PHP ini 파일 error display setting 추가 66 66 * @buildno 5036 67 67 * @note 2014.12.09 add gather parameter tid, type … … 112 112 113 113 //define for mkey 114 //deprecated 2009.02.19 ( Makeshop Ãʱâ Çѹø³ª°¨. ¼ºñ½ºµÇ°í ÀÖ´ÂÁö´Â ¸ð¸§)115 //Makeshop PG Updrade ¿ëÀ¸·Î »õ·Î³ª°¨ 2009.02.19 (interface¿¡¼ mkey°ªÀ» ¹Þ¾Æ ó¸®ÇÏ°Ô º¯°æ)114 //deprecated 2009.02.19 ( Makeshop 초기 한번나감. 서비스되고 있는지는 모름) 115 //Makeshop PG Updrade용으로 새로나감 2009.02.19 (interface에서 mkey값을 받아 처리하게 변경) 116 116 //define("MKEY", 1); 117 117 //non block connect immediate return check code/str … … 139 139 } 140 140 141 141 142 //------------------------------------------------------ 142 143 // IFD CMD … … 154 155 define("CMD_REQ_ACK", "0800"); 155 156 define("CMD_RES_ACK", "0810"); 156 // ÀÚü¿¡½ºÅ©·Î157 //자체에스크로 157 158 //added 2008.01.08 158 define("CMD_REQ_DLV", "3020"); // ¹è¼Ûµî·Ï159 define("CMD_REQ_CNF", "3030"); // ±¸¸ÅÈ®ÀÎ160 define("CMD_REQ_DNY", "3040"); // ±¸¸Å°ÅÀý161 define("CMD_REQ_DNY_CNF", "3080"); // °ÅÀýÈ®ÀÎ162 define("CMD_REQ_DLV_NETC", "3520"); // ¹è¼Ûµî·Ï¸Á»óÃë¼Ò163 define("CMD_REQ_CNF_NETC", "3530"); // ±¸¸ÅÈ®ÀθÁ»óÃë¼Ò164 define("CMD_REQ_DNY_NETC", "3540"); // ±¸¸Å°ÅÀý¸Á»óÃë¼Ò165 // °¡»ó°èÁÂȯºÒ(09.08.05)159 define("CMD_REQ_DLV", "3020"); //배송등록 160 define("CMD_REQ_CNF", "3030"); //구매확인 161 define("CMD_REQ_DNY", "3040"); //구매거절 162 define("CMD_REQ_DNY_CNF", "3080"); //거절확인 163 define("CMD_REQ_DLV_NETC", "3520"); //배송등록망상취소 164 define("CMD_REQ_CNF_NETC", "3530"); //구매확인망상취소 165 define("CMD_REQ_DNY_NETC", "3540"); //구매거절망상취소 166 //가상계좌환불(09.08.05) 166 167 define("CMD_REQ_RFD", "0421"); 167 168 define("CMD_RES_RFD", "0431"); 168 169 169 // °Å·¡Á¶È¸(12.04.20)170 //거래조회(12.04.20) 170 171 define("CMS_REQ_INQR", "0900"); 171 172 define("CMS_RES_INQR", "0910"); 172 173 173 // ¼ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)174 //서브몰하위가맹점등록(14.03.06) 174 175 define("CMS_REQ_OPEN_SUB", "1040"); 175 176 define("CMS_RES_OPEN_SUB", "1041"); … … 189 190 190 191 //------------------------------------------------------ 191 //TYPE( ¼ºñ½ºº°)192 //TYPE(서비스별) 192 193 //------------------------------------------------------ 193 194 define("TYPE_SECUREPAY", "securepay"); … … 196 197 define("TYPE_RECEIPT", "receipt"); 197 198 define("TYPE_REPAY", "repay"); 198 define("TYPE_ESCROW", "escrow"); // ÀÚü¿¡½ºÅ©·Î!199 define("TYPE_ESCROW", "escrow"); //자체에스크로! 199 200 define("TYPE_CONFIRM", "confirm"); 200 201 define("TYPE_OCBQUERY", "ocbquery"); … … 209 210 define("TYPE_FORMAUTH", "formauth"); 210 211 define("TYPE_CHKFAKE", "chkfake"); 211 // °¡»ó°èÁÂȯºÒ(09.08.05)212 //가상계좌환불(09.08.05) 212 213 define("TYPE_REFUND", "refund"); 213 // °¡»ó°èÁºκÐȯºÒ(12.06.05)214 //가상계좌부분환불(12.06.05) 214 215 define("TYPE_VACCTREPAY", "vacctrepay"); 215 // °Å·¡Á¶È¸(12.04.20)216 //거래조회(12.04.20) 216 217 define("TYPE_INQUIRY", "inquiry"); 217 // ¼ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)218 //서브몰하위가맹점등록(14.03.06) 218 219 define("TYPE_OPENSUB", "opensub"); 219 220 //------------------------------------------------------ 220 //EscrowType( ÀÚü¿¡½ºÅ©·Î ŸÀÔ)221 //EscrowType(자체에스크로 타입) 221 222 //added 2008.01.08 222 223 //------------------------------------------------------ 223 224 define("TYPE_ESCROW_DLV", "dlv"); 224 define("TYPE_ESCROW_CNF", "confirm"); // ±¸¸ÅÈ®ÀÎ/°ÅÀý(Ç÷¯±×ÀÎ)225 define("TYPE_ESCROW_DNY", "deny"); // À§¿¡¼ 󸮵Ê,Àǹ̾øÀ½225 define("TYPE_ESCROW_CNF", "confirm"); //구매확인/거절(플러그인) 226 define("TYPE_ESCROW_DNY", "deny"); //위에서 처리됨,의미없음 226 227 define("TYPE_ESCROW_DNY_CNF", "dcnf"); 227 228 228 229 229 230 //------------------------------------------------------ 230 //PayMethod( ¼ºñ½ºº°, TX)231 //PayMethod(서비스별, TX) 231 232 //------------------------------------------------------ 232 233 define("NM_TX_ISP", "VCard"); … … 246 247 247 248 //------------------------------------------------------ 248 //PayMethod( ¼ºñ½ºº°, PG)249 //PayMethod(서비스별, PG) 249 250 //------------------------------------------------------ 250 251 define("NM_ISP", "ISP"); … … 276 277 277 278 //------------------------------------------------------ 278 // ¿äûÀü¹®279 //요청전문 279 280 //------------------------------------------------------ 280 281 define("TX_GOOSCNT", "GoodsCnt"); … … 319 320 define("TX_CANCELTID", "CancelTID"); 320 321 define("TX_CANCELMSG", "CancelMsg"); 321 define("TX_CANCELREASON", "CancelReason"); //2012-10-19 Ãë¼Ò»çÀ¯ÄÚµå Ãß°¡322 // °¡»ó°èÁÂȯºÒ(09.08.05)322 define("TX_CANCELREASON", "CancelReason"); //2012-10-19 취소사유코드 추가 323 //가상계좌환불(09.08.05) 323 324 define("TX_REFUNDACCTNUM", "RefundAcctNum"); 324 325 define("TX_REFUNDBANKCODE", "RefundBankCode"); … … 335 336 define("TX_PRTC_CURRENCY", "Currency"); 336 337 337 // ±¹¹ÎÀºÇà I°èÁÂÀÌü ºÎºÐÃë¼Ò½Ã °èÁ¹øÈ£/°èÁÂÁÖ¼º¸íÃß°¡2011-10-06338 //국민은행 I계좌이체 부분취소시 계좌번호/계좌주성명추가 2011-10-06 338 339 define("TX_PRTC_NOACCT", "PRTC_NoAcctFNBC"); 339 340 define("TX_PRTC_NMACCT", "PRTC_NmAcctFNBC"); 340 // °¡»ó°èÁ ºÎºÐȯºÒ °ü·Ã Ãß°¡341 //가상계좌 부분환불 관련 추가 341 342 define("TX_PRTC_REFUNDFLGREMIT", "PRTC_RefundFlgRemit"); 342 343 define("TX_PRTC_REFUNDBANKCODE", "PRTC_RefundBankCode"); 343 344 //CaptureInfo 344 345 define("TX_CAPTURETID", "CaptureTID"); 345 // Çö±Ý¿µ¼öÁõ346 //현금영수증 346 347 define("TX_CSHR_APPLPRICE", "CSHR_ApplPrice"); 347 348 define("TX_CSHR_SUPPLYPRICE", "CSHR_SupplyPrice"); … … 359 360 define("TX_CSHR_SUBAPPLPRICE1", "CSHR_SubApplPrice1"); 360 361 define("TX_CSHR_SUBSERVICEPRICE1", "CSHR_SubServicePrice1"); 361 // °Å·¡Á¶È¸(12.04.20)362 //거래조회(12.04.20) 362 363 define("TX_INQR_TID", "INQR_TID"); 363 // ¼ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)364 //서브몰하위가맹점등록(14.03.06) 364 365 define("TX_OPENREG_TID", "OrgTID"); 365 366 define("TX_OPENREG_MID", "MID"); … … 376 377 //------------------------------------------------------ 377 378 // 378 // ÀÀ´äÀü¹®379 //응답전문 379 380 // 380 381 //------------------------------------------------------ … … 435 436 //Capture 436 437 define("CAPTUREINFO", "CaptureInfo"); 437 // °Å·¡Á¶È¸(12.04.20)438 //거래조회(12.04.20) 438 439 define("INQUIRYINFO", "InquiryInfo"); 439 // ¼ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)440 //서브몰하위가맹점등록(14.03.06) 440 441 define("OPENSUBINFO", "OpenSubInfo"); 441 442 //Escrow … … 543 544 //ERROR CODE 544 545 //---------------------------------- 545 //!! ½ÅTX¿¡ Ãß°¡µÈ ¿¡·¯!!!546 //!!신TX에 추가된 에러!!! 546 547 define("NULL_DIR_ERR", "TX9001"); 547 548 define("NULL_TYPE_ERR", "TX9002"); … … 553 554 define("PGPUB_UPDATE_ERR", "TX9612"); 554 555 555 // ¾Ïº¹È£È ¿¡·¯556 //암복호화 에러 556 557 define("B64DECODE_UPDATE_ERR", "TX9101"); 557 558 define("B64DECODE_FINAL_ERR", "TX9102"); … … 578 579 define("ENC_INIT_RAND_ERR", "TX9123"); 579 580 define("ENC_PUTENV_ERR", "TX9124"); 580 // Çʵåüũ581 //필드체크 581 582 define("NULL_KEYPW_ERR", "TX9201"); 582 583 define("NULL_MID_ERR", "TX9202"); … … 609 610 define("NULL_BUYEREMAIL_ERR", "TX9229"); 610 611 define("NULL_SESSIONKEY_ERR", "TX9230"); 611 //pg °ø°³Å° ·Îµå ¿À·ù612 //pg공개키 로드 오류 612 613 define("NULL_PGCERT_FP_ERR", "TX9231"); 613 614 define("NULL_X509_ERR", "TX9232"); … … 616 617 define("RESULT_MSG_FORMAT_ERR", "TX9234"); 617 618 618 // °¡»ó °èÁ ÀÌü ¿¹¾à619 define("NULL_PERNO_ERR", "TX9235"); // ÁֹιøÈ£ ºüÁü620 define("NULL_OID_ERR", "TX9236"); // ÁÖ¹®¹øÈ£ ºüÁü621 define("NULL_VCDBANK_ERR", "TX9237"); // ÀºÇàÄÚµå ºüÁü622 define("NULL_DTINPUT_ERR", "TX9238"); // ÀÔ±Ý ¿¹Á¤ÀÏ ºüÁü623 define("NULL_NMINPUT_ERR", "TX9239"); // ¼Û±ÝÀÚ ¼º¸í ºüÁü624 // ½Ç½Ã°£ ºô¸µ625 define("NULL_BILLKEY_ERR", "TX9240"); // ºôŰ ºüÁü626 define("NULL_CARDPASS_ERR", "TX9241"); // Ä«µå ºñ¹ø ºüÁü627 define("NULL_BILLTYPE_ERR", "TX9242"); // ºôŸÀÔ ´©¶ô628 // CMS °èÁÂÀÌü629 define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS Ãâ±ÝÃÑ±Ý¾× ºüÁü630 define("NULL_CMSDAY_ERR", "TX9251"); // CMS Ãâ±ÝÀÏÀÚ ºüÁü631 define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS Ãâ±Ý½ÃÀÛ¿ù ºüÁü632 define("NULL_CMSDATETO_ERR", "TX9253"); // CMS Ãâ±ÝÁ¾·á¿ù ºüÁü633 // ºÎºÐÃë¼Ò634 define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // Àç½ÂÀÎ ¿äû±Ý¾× ´©¶ô ¿¡·¯635 // Çö±Ý¿µ¼öÁõ ¹ßÇà636 define("NULL_CR_PRICE_ERR", "TX9270"); // Çö±Ý°áÁ¦ ±Ý¾× ºüÁü637 define("NULL_SUP_PRICE_ERR", "TX9271"); // °ø±Þ°¡¾× ºüÁü638 define("NULL_TAX_ERR", "TX9272"); // ºÎ°¡¼¼ ºüÁü639 define("NULL_SRVC_PRICE_ERR", "TX9273"); // ºÀ»ç·á ºüÁü640 define("NULL_REG_NUM_ERR", "TX9274"); // ÁֹιøÈ£(»ç¾÷ÀÚ¹øÈ£)641 define("NULL_USEOPT_ERR", "TX9275"); // Çö±Ý¿µ¼öÁõ ¿ëµµ ±¸ºÐÀÚ ºüÁü619 // 가상 계좌 이체 예약 620 define("NULL_PERNO_ERR", "TX9235"); // 주민번호 빠짐 621 define("NULL_OID_ERR", "TX9236"); // 주문번호 빠짐 622 define("NULL_VCDBANK_ERR", "TX9237"); // 은행코드 빠짐 623 define("NULL_DTINPUT_ERR", "TX9238"); // 입금 예정일 빠짐 624 define("NULL_NMINPUT_ERR", "TX9239"); // 송금자 성명 빠짐 625 //실시간 빌링 626 define("NULL_BILLKEY_ERR", "TX9240"); // 빌키 빠짐 627 define("NULL_CARDPASS_ERR", "TX9241"); // 카드 비번 빠짐 628 define("NULL_BILLTYPE_ERR", "TX9242"); // 빌타입 누락 629 // CMS 계좌이체 630 define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS 출금총금액 빠짐 631 define("NULL_CMSDAY_ERR", "TX9251"); // CMS 출금일자 빠짐 632 define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS 출금시작월 빠짐 633 define("NULL_CMSDATETO_ERR", "TX9253"); // CMS 출금종료월 빠짐 634 // 부분취소 635 define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // 재승인 요청금액 누락 에러 636 // 현금영수증 발행 637 define("NULL_CR_PRICE_ERR", "TX9270"); // 현금결제 금액 빠짐 638 define("NULL_SUP_PRICE_ERR", "TX9271"); // 공급가액 빠짐 639 define("NULL_TAX_ERR", "TX9272"); // 부가세 빠짐 640 define("NULL_SRVC_PRICE_ERR", "TX9273"); // 봉사료 빠짐 641 define("NULL_REG_NUM_ERR", "TX9274"); // 주민번호(사업자번호) 642 define("NULL_USEOPT_ERR", "TX9275"); // 현금영수증 용도 구분자 빠짐 642 643 643 644 define("PRIVKEY_FILE_OPEN_ERR", "TX9301"); -
gnupay-inicis/trunk/lib/INILib.php
r1467295 r1830608 7 7 * 8 8 */ 9 9 10 10 11 require_once('INICls.php'); -
gnupay-inicis/trunk/lib/INISoc.php
r1422798 r1830608 3 3 * Copyright (C) 2007 INICIS Inc. 4 4 * 5 * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼´Â ¾ÈµË´Ï´Ù.6 * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.5 * 해당 라이브러리는 절대 수정되어서는 안됩니다. 6 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다. 7 7 * 8 8 */ … … 90 90 return OK; 91 91 } 92 //EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, ¸ðµç OS üũ ºÒ°¡´ÉÇØ¼ strÀ¸·Îµµ °Ë»ö)92 //EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, 모든 OS 체크 불가능해서 str으로도 검색 ) 93 93 if ($err != ERRCODE_INPROGRESS_LINUX && $err != ERRCODE_INPROGRESS_WIN && 94 94 $err != ERRCODE_INPROGRESS_FREEBSD && $err_str != ERRSTR_INPROGRESS ) -
gnupay-inicis/trunk/lib/INIStdPayUtil.php
r1467295 r1830608 12 12 $milliseconds = round(microtime(true) * 1000); 13 13 $tempValue1 = round($milliseconds/1000); //max integer 자릿수가 9이므로 뒤 3자리를 뺀다 14 $tempValue2 = round( microtime(false) * 1000); //뒤 3자리를 저장14 $tempValue2 = round((int) microtime(false) * 1000); //뒤 3자리를 저장 15 15 switch (strlen($tempValue2)) { 16 16 case '3': -
gnupay-inicis/trunk/lib/INIXml.php
r1422798 r1830608 48 48 /** 49 49 * 50 * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼´Â ¾ÈµË´Ï´Ù.51 * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.50 * 해당 라이브러리는 절대 수정되어서는 안됩니다. 51 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다. 52 52 * 53 53 */ … … 189 189 */ 190 190 //modify by ddaemiri, 2007.05.28 191 //load_file -> load_xml ·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½.191 //load_file -> load_xml로 파일 및 string 으로 모두 입력받을 수 있음. 192 192 public function __construct( $file = "" ) 193 193 { … … 214 214 */ 215 215 //modify by ddaemiri, 2007.05.28 216 //load_file -> load_xml ·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½.216 //load_file -> load_xml로 파일 및 string 으로 모두 입력받을 수 있음. 217 217 function load_xml ( $file, $str ) 218 218 { … … 267 267 268 268 //modify by ddaemiri, 2007.05.28 269 //charset Ãß°¡( header »ý¼º)269 //charset 추가( header 생성 ) 270 270 function make_xml ( $highlight = array(), $root = "", $level = 0, $charset = "UTF-8" ) 271 271 { 272 // header Ãß°¡272 // header 추가 273 273 $header = "<?xml version=\"1.0\" encoding=\"".$charset."\"?>"."\n"; 274 274 $body = $this->get_xml( $highlight, $root, $level ); … … 298 298 */ 299 299 //modify by ddaemiri, 2007.05.28 300 //get_file -> get_xml ·Î ÇÔ¼öÀ̸§ º¯°æ.300 //get_file -> get_xml 로 함수이름 변경. 301 301 function get_xml ( $highlight = array(), $root = "", $level = 0 ) 302 302 { … … 923 923 924 924 // Set the attributes. 925 // Xpath ·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!925 // Xpath로 안가져온다. 한달을 헛지랄 했다!! 926 926 // modifyed by ddaemiri, 2007.09.03 927 927 // $this->set_attributes($this->path, $attributes); … … 968 968 969 969 // Save the text. 970 // Xpath ·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!970 // Xpath로 안가져온다. 한달을 헛지랄 했다!! 971 971 // modifyed by ddaemiri, 2007.09.03 972 972 //$this->add_content($this->path, addslashes(trim($text))); … … 974 974 // add array, added by ddaemiri, 2007.09.03 975 975 $arr = preg_split( "/[\/]+/", $this->path, -1, PREG_SPLIT_NO_EMPTY ); 976 //edited by ddaemiri. libexpat Àº \nÀ» ºÐ¸®ÀÚ·Î ÀνÄ976 //edited by ddaemiri. libexpat은 \n을 분리자로 인식 977 977 //$this->xml_node[$arr[count($arr)-1]]["text"] = addslashes(trim($text)); 978 978 $this->xml_node[$arr[count($arr)-1]]["text"] = $this->xml_node[$arr[count($arr)-1]]["text"].addslashes(trim($text)); … … 3474 3474 3475 3475 //added by ddaemiri, 2007.05.28 3476 //entity °¡ Çϳª¸¸ ÀÖ´Ù°í °¡Á¤!! ¹è¿ÀÇ Ã¹¹øÂ°¸¸ °¡Á®¿È.3476 //entity 가 하나만 있다고 가정!! 배열의 첫번째만 가져옴. 3477 3477 function get_content_fetch ( $path ) 3478 3478 { -
gnupay-inicis/trunk/lib/functions.php
r1568394 r1830608 150 150 } 151 151 152 $ res['order_id'] = $order->id;152 $order_id = $res['order_id'] = $order->get_order_number(); 153 153 154 154 $goods = ''; … … 327 327 ); 328 328 329 $res['oid'] = apply_filters('gnupay_inicis_get_ordernumber', $mid . "_" . $order ->id, $mid, $order->id); // 가맹점 주문번호(가맹점에서 직접 설정)329 $res['oid'] = apply_filters('gnupay_inicis_get_ordernumber', $mid . "_" . $order_id, $mid, $order_id); // 가맹점 주문번호(가맹점에서 직접 설정) 330 330 $res['p_mname'] = $p_mname; //상점 이름 331 331 $res['noti_url'] = add_query_arg(array('wc-api'=>'gnupay_inicis_returnurl', 'inicispay'=>'noti'), home_url( '/' )); … … 369 369 $INIStdPayReturn = add_query_arg(array('wc-api'=>'gnupay_inicis_returnurl', 'inicispay'=>'return'), home_url( '/' )); 370 370 371 $orderNumber = apply_filters('gnupay_inicis_get_ordernumber', $mid . "_" . $order ->id, $mid, $order->id); // 가맹점 주문번호(가맹점에서 직접 설정)371 $orderNumber = apply_filters('gnupay_inicis_get_ordernumber', $mid . "_" . $order_id, $mid, $order_id); // 가맹점 주문번호(가맹점에서 직접 설정) 372 372 373 373 $cardNoInterestQuota = "11-2:3:,34-5:12,14-6:12:24,12-12:36,06-9:12,01-3:4"; // 카드 무이자 여부 설정(가맹점에서 직접 설정) … … 399 399 400 400 401 $payment_method = get_post_meta( $order ->id, '_payment_method', true );401 $payment_method = get_post_meta( $order_id, '_payment_method', true ); 402 402 $pay_ids = gnupay_inicis_get_settings('pay_ids'); 403 403 -
gnupay-inicis/trunk/readme.txt
r1590411 r1830608 6 6 Requires at least: 4.0 7 7 Tested up to: 4.5 8 Stable tag: 1.3. 38 Stable tag: 1.3.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
gnupay-inicis/trunk/template/order_detail.php
r1467295 r1830608 92 92 $default_cash = array('receipt_no'=>''); 93 93 94 $od_cash_info = maybe_unserialize(get_post_meta($order ->id, '_od_cash_info', true));94 $od_cash_info = maybe_unserialize(get_post_meta($order_id, '_od_cash_info', true)); 95 95 96 96 $cash = wp_parse_args($od_cash_info, $default_cash); … … 100 100 <a href="#" onclick="<?php echo $cash_receipt_script; ?>"><?php _e('현금영수증 확인하기', GNUPAY_INICIS); ?></a> 101 101 <?php } else { ?> 102 <a href="#" onclick="window.open('<?php echo add_query_arg(array('wc-api'=>'gnupay_inicis_tax', 'order_id'=>$order ->id, 'tx'=>'taxsave'), home_url( '/' )); ?>', 'taxsave', 'width=550,height=600,scrollbars=1,menus=0');"><?php _e('현금영수증 발급', GNUPAY_INICIS); ?></a>102 <a href="#" onclick="window.open('<?php echo add_query_arg(array('wc-api'=>'gnupay_inicis_tax', 'order_id'=>$order_id, 'tx'=>'taxsave'), home_url( '/' )); ?>', 'taxsave', 'width=550,height=600,scrollbars=1,menus=0');"><?php _e('현금영수증 발급', GNUPAY_INICIS); ?></a> 103 103 <?php } ?> 104 104 </td> -
gnupay-inicis/trunk/template/tax_result.php
r1467295 r1830608 18 18 */ 19 19 20 $od_cash = get_post_meta($order ->id, '_od_cash', true);20 $od_cash = get_post_meta($order_id, '_od_cash', true); 21 21 22 22 if( $od_cash ){ … … 47 47 $currency = 'WON'; 48 48 49 $od_currency = get_post_meta($order ->id, '_od_currency', true);49 $od_currency = get_post_meta($order_id, '_od_currency', true); 50 50 51 51 if( in_array( $od_currency, array('AUD', 'ARS', 'CAD', 'CLP', 'COP', 'HKD', 'MXN', 'NZD', 'SGD', 'USD') ) ){ //달러
Note: See TracChangeset
for help on using the changeset viewer.