Plugin Directory

Changeset 1830608


Ignore:
Timestamp:
02/28/2018 06:31:56 AM (8 years ago)
Author:
kagla
Message:

1.3.4 update

Location:
gnupay-inicis/trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • gnupay-inicis/trunk/classes/admin_metabox.class.php

    r1467295 r1830608  
    4242        $pay_ids = gnupay_inicis_get_settings('pay_ids');
    4343
    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 );
    4647
    47             $payment_method = $order->payment_method;
     48            $payment_method = $order->get_payment_method();
    4849            $pg_url  = 'https://iniweb.inicis.com/ ';
    4950            $pg_test = 'inicis';
    5051
    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);   //에스크로
    5859        ?>
    5960        <div class="gp_inicis_admin">
     
    8586                if( $od_receipt_price && !$order->get_total_refunded() && ($order->get_total() > 0) && in_array($payment_method, array($pay_ids['vbank'], $pay_ids['bank'])) ){     //가상계좌, 계좌이체
    8687               
    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));
    8889
    89                 $od_cash = get_post_meta($order->id, '_od_cash', true);
     90                $od_cash = get_post_meta($order_id, '_od_cash', true);
    9091                ?>
    9192                    <tr>
     
    102103                            <a href="#" onclick="<?php echo $cash_receipt_script; ?>"><?php _e('현금영수증 확인', GNUPAY_INICIS); ?></a>
    103104                            <?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>
    105106                            <?php
    106107                            }   //end if $od_cash
  • gnupay-inicis/trunk/classes/inicis_card_gateway.class.php

    r1590411 r1830608  
    6161        $this->supports           = array(
    6262            'refunds',   //환불관련
    63             'products',
    64             'subscriptions',
    65             'subscription_cancellation',
     63            'products',
    6664        );
    6765
     
    122120        if( $result ){
    123121            if( $this->id == $this->gnupay_inicis_card ){     //카드일때만 실행;
    124                 $options = apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->setttings );
     122                $options = apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings );
    125123               
    126124                $pay_ids = gnupay_inicis_get_settings('pay_ids');
     
    244242
    245243        $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')) ){     //그누페이 이니시스 결제가 아닌경우 리턴
    248246            return;
    249247        }
     
    313311            }
    314312
    315             include_once(GNUPAY_INICIS_PATH.'inicis/settle_inicis.inc.php');
    316 
    317313            $currency      = 'WON';
    318314
     
    332328            //return new WP_Error('inicis_refund_error', $confirm_price.' '.$tax.' '.$taxfree );
    333329
    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 ){
    373391
    374392                $payment_gateways = gnupay_inicis_get_gateways();
     
    381399                wc_price($amount)
    382400                ) );
    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           
    390406        } catch ( Exception $e ) {
    391407
     
    416432             **************************/
    417433
    418             $cancel_msg = gp_inicis_iconv_euckr('주문자 본인 취소-'.$reason);
     434            $page_msg = is_admin() ? '관리자주문에서 처리-' : '주문자 본인 취소-';
     435            $cancel_msg = gp_inicis_iconv_euckr($page_msg.$reason);
    419436
    420437            /*********************
     
    457474
    458475            $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);
    463480
    464481            return true;
     
    899916
    900917        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']);
    902919        }
    903920
     
    10021019        $res = wp_parse_args(array(
    10031020            'result'    => 'success',
    1004             'order_id'  =>  $order->id,
     1021            'order_id'  =>  $order->get_order_number(),
    10051022            'order_key' =>  $order->order_key,
    10061023            'redirect'  => $this->get_return_url( $order )
  • gnupay-inicis/trunk/classes/inicis_returnurl.class.php

    r1422798 r1830608  
    6161                break;
    6262        }
     63
     64        if( !$inicispay ){
     65            wp_redirect(home_url());
     66        }
    6367        exit;
    6468    }
  • gnupay-inicis/trunk/classes/inicis_tax.class.php

    r1427188 r1830608  
    6060        $od_tel = $order->billing_phone;
    6161
    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);
    6667
    6768        $amt_sup = 0;   //공급가액 초기화
  • gnupay-inicis/trunk/classes/inicis_user_cancel.class.php

    r1439769 r1830608  
    1717        $order = wc_get_order( $order_id );
    1818
    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')) ){     //그누페이 이니시스 결제가 아닌경우 리턴
    2020            return;
    2121        }
     
    3535        $payment_gateways = $this->get_gateways();
    3636
    37         $payment_method = get_post_meta( $order->id, '_payment_method', true );
     37        $payment_method = get_post_meta( $order_id, '_payment_method', true );
    3838
    3939        $file_path = plugin_dir_path( __FILE__ ).'classes/inicis_card_gateway.class.php';
     
    4242        $refund_reason = __('사용자 주문 취소', GNUPAY_INICIS);
    4343
    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 );
    4545       
    4646        $current_user = wp_get_current_user();
     
    8888        $payment_gateways = $this->get_gateways();
    8989
    90         $payment_method = get_post_meta( $order->id, '_payment_method', true );
     90        $payment_method = get_post_meta( $order->get_order_number(), '_payment_method', true );
    9191
    9292        if( !in_array($payment_method, gnupay_inicis_get_settings('pay_ids')) ){
  • gnupay-inicis/trunk/classes/inicis_user_order_details.class.php

    r1422798 r1830608  
    1313    public function order_table($order){
    1414
    15         $order_id = $order->id;
     15        $order_id = $order->get_order_number();
    1616
    1717        if( ! gp_inicis_order_can_view($order_id) ){   //볼수 있는 권한이 없으면
  • gnupay-inicis/trunk/classes/inicis_virtualaccount.class.php

    r1568394 r1830608  
    210210                $pay_options = get_option( $this->plugin_id . $this->id . '_settings' );
    211211
    212                 if( !isset($order->id) || empty($order->id) ){
     212                if( ! $order->get_order_number() ){
    213213                    return;
    214214                }
  • gnupay-inicis/trunk/config.php

    r1590411 r1830608  
    55    public function __construct() {
    66
    7         define( 'GNUPAY_INICIS_VERSION', '1.3.3' );
     7        define( 'GNUPAY_INICIS_VERSION', '1.3.4' );
    88        define( 'GNUPAY_INICIS', 'gnupay-inicis' );
    99        define( 'GNUPAY_INICIS_ORDER_TMP', '_order_tmp_inicis' );
  • gnupay-inicis/trunk/gnupay-inicis.php

    r1590411 r1830608  
    66 *  Author: SIR Soft
    77 *  Author URI: http://sir.kr
    8  *  Version: 1.3.3
     8 *  Version: 1.3.4
    99 *  Tested up to: 4.5
    1010 *  Text Domain: gnupay-inicis
  • gnupay-inicis/trunk/inicis/m_next.php

    r1439769 r1830608  
    5252    parse_str($return, $ret);
    5353    $PAY = array_map('trim', $ret);
     54    $PAY = array_map('strip_tags', $PAY);
     55    $PAY = array_map('sanitize_text_field', $PAY);
    5456
    5557    if($PAY['P_STATUS'] != '00')
  • gnupay-inicis/trunk/inicis/m_noti.php

    r1568394 r1830608  
    7979            $is_noti = true;
    8080            $noti_tno = get_post_meta( $order_id, '_od_tno', true );
    81             $app_no = $PAY["P_AUTH_NO"]; //승인번호;
     81            $app_no = $P_AUTH_NO; //승인번호;
    8282
    8383            update_post_meta($order_id, '_is_noti', 1);   //inicis noti로 받아온건지 수정
  • gnupay-inicis/trunk/inicis/returnurl.php

    r1467295 r1830608  
    7373        $authUrl = isset($_REQUEST["authUrl"]) ? sanitize_text_field($_REQUEST["authUrl"]) : '';    // 승인요청 API url(수신 받은 값으로 설정, 임의 세팅 금지)
    7474
    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값으로 설정, 임의 세팅 금지)
    7876
    7977        //#####################
     
    145143                  처리중 에러 발생시 망취소를 한다.
    146144                 * **************************************************************************** */
    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-8                 
    160                 $checkMap["format"] = $format;  // default=XML     
    161 
    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);
    173145
    174146                echo "<tr><th class='td01'><p>거래 성공 여부</p></th>";
     
    200172            //공통 부분만
    201173
     174            // 수신결과를 파싱후 resultCode가 "0000"이면 승인성공 이외 실패
     175            // 가맹점에서 스스로 파싱후 내부 DB 처리 후 화면에 결과 표시
     176            // payViewType을 popup으로 해서 결제를 하셨을 경우
     177            // 내부처리후 스크립트를 이용해 opener의 화면 전환처리를 하세요
     178            //throw new Exception("강제 Exception");
     179
    202180            $savedata = serialize($resultMap);
    203181           
     
    271249            echo "<pre>", $netcancelResultString . "</pre>";
    272250            // 취소 결과 확인
    273 
    274             if(isset($resultMap['tid'])){
    275                 $tno = $resultMap['tid'];
    276                 include GNUPAY_INICIS_PATH.'/inicis/inipay_cancel.php';
    277             }
    278251        }
    279252    } else {
  • gnupay-inicis/trunk/inicis/settle_inicis.inc.php

    r1467295 r1830608  
    102102
    103103$inipay->SetField("inipayhome", GNUPAY_INICIS_KEY_PATH); // 이니페이 홈디렉터리(상점수정 필요)
    104 $inipay->SetField("debug", GNUPAY_INICIS_DEBUG);                     // 로그모드("true"로 설정하면 상세로그가 생성됨.)
     104$inipay->SetField("debug", "false");                     // 로그모드("true"로 설정하면 상세로그가 생성됨.)
    105105?>
  • gnupay-inicis/trunk/js/inicis_pay.js

    r1590411 r1830608  
    2727        },
    2828        form_set : function(f, json){
     29           
     30            console.log( json );
    2931
    3032            if(json.shipping_last_name == ''){
  • gnupay-inicis/trunk/lib/INICls.php

    r1467295 r1830608  
    44 * Copyright (C) 2007 INICIS Inc.
    55 *
    6  * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼­´Â ¾ÈµË´Ï´Ù.
    7  * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.
     6 * 해당 라이브러리는 절대 수정되어서는 안됩니다.
     7 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다.
    88 *
    99 */
     
    1414/* Global Variables                                    */
    1515/* ----------------------------------------------------- */
     16
    1617$paymethod = isset($paymethod) ? $paymethod : isset($_REQUEST['paymethod']) ? sanitize_text_field($_REQUEST['paymethod']) : '';
    1718
    1819switch ($paymethod) {
    19     case('Card'):    // ½Å¿ëÄ«µå
     20    case('Card'):    // 신용카드
    2021        $pgid = "CARD";
    2122        break;
    22     case('Account'):   // ÀºÇà °èÁ ÀÌü
     23    case('Account'):   // 은행 계좌 이체
    2324        $pgid = "ACCT";
    2425        break;
    25     case('DirectBank'): // ½Ç½Ã°£ °èÁ ÀÌü
     26    case('DirectBank'): // 실시간 계좌 이체
    2627        $pgid = "DBNK";
    2728        break;
     
    2930        $pgid = "OCBP";
    3031        break;
    31     case('VCard'):    // ISP °áÁ¦
     32    case('VCard'):    // ISP 결제
    3233        $pgid = "ISP_";
    3334        break;
    34     case('HPP'):     // ÈÞ´ëÆù °áÁ¦
     35    case('HPP'):     // 휴대폰 결제
    3536        $pgid = "HPP_";
    3637        break;
    37     case('ArsBill'):   // 700 ÀüÈ­°áÁ¦
     38    case('ArsBill'):   // 700 전화결제
    3839        $pgid = "ARSB";
    3940        break;
    40     case('PhoneBill'):  // PhoneBill °áÁ¦(¹Þ´Â ÀüÈ­)
     41    case('PhoneBill'):  // PhoneBill 결제(받는 전화)
    4142        $pgid = "PHNB";
    4243        break;
    43     case('Ars1588Bill'):// 1588 ÀüÈ­°áÁ¦
     44    case('Ars1588Bill'):// 1588 전화결제
    4445        $pgid = "1588";
    4546        break;
    46     case('VBank'):    // °¡»ó°èÁ ÀÌü
     47    case('VBank'):    // 가상계좌 이체
    4748        $pgid = "VBNK";
    4849        break;
    49     case('Culture'):   // ¹®È­»óǰ±Ç °áÁ¦
     50    case('Culture'):   // 문화상품권 결제
    5051        $pgid = "CULT";
    5152        break;
    52     case('CMS'):     // CMS °áÁ¦
     53    case('CMS'):     // CMS 결제
    5354        $pgid = "CMS_";
    5455        break;
    55     case('AUTH'):    // ½Å¿ëÄ«µå À¯È¿¼º °Ë»ç
     56    case('AUTH'):    // 신용카드 유효성 검사
    5657        $pgid = "AUTH";
    5758        break;
    58     case('INIcard'):   // ³×Ƽ¸Ó´Ï °áÁ¦
     59    case('INIcard'):   // 네티머니 결제
    5960        $pgid = "INIC";
    6061        break;
    61     case('MDX'):     // ¸óµ¦½ºÄ«µå
     62    case('MDX'):     // 몬덱스카드
    6263        $pgid = "MDX_";
    6364        break;
    64     default:         // »ó±â ÁöºÒ¼ö´Ü ¿Ü Ãß°¡µÇ´Â ÁöºÒ¼ö´ÜÀÇ °æ¿ì ±âº»À¸·Î paymethod°¡ 4ÀÚ¸®·Î ³Ñ¾î¿Â´Ù.
     65    default:         // 상기 지불수단 외 추가되는 지불수단의 경우 기본으로 paymethod가 4자리로 넘어온다.
    6566        $pgid = $paymethod;
    6667}
     
    6970
    7071if ($quotainterest == "1") {
    71     $interest = "(¹«ÀÌÀÚÇÒºÎ)";
     72    $interest = "(무이자할부)";
    7273}
    7374
     
    7677/* ----------------------------------------------------- */
    7778
    78 function Base64Encode($str) {
    79     return substr(chunk_split(base64_encode($str), 64, "\n"), 0, -1) . "\n";
     79if( !function_exists('Base64Encode') ){
     80    function Base64Encode($str) {
     81        return substr(chunk_split(base64_encode($str), 64, "\n"), 0, -1) . "\n";
     82    }
    8083}
    8184
    82 function GetMicroTime() {
    83     list($usec, $sec) = explode(" ", microtime(true));
    84     return (float) $usec + (float) $sec;
     85if( !function_exists('GetMicroTime') ){
     86    function GetMicroTime() {
     87        list($usec, $sec) = explode(" ", microtime(true));
     88        return (float) $usec + (float) $sec;
     89    }
    8590}
    8691
    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";
     92if( !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    }
    9198}
    92 
    9399/* ----------------------------------------------------- */
    94100/* LOG Class                                           */
    95101/* ----------------------------------------------------- */
     102
     103if ( ! class_exists( 'INILog' ) ) :
    96104
    97105class INILog {
     
    129137            $type = $this->type;
    130138        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";  //로그기록 임의 수정
    132140        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
    134143        $this->handle = fopen($logfile, "a+");
    135144        if (!$this->handle)
     
    168177
    169178}
     179
     180endif;  //end class INILog
    170181
    171182/* ----------------------------------------------------- */
     
    175186/* -Check Field Function                                 */
    176187/* ----------------------------------------------------- */
     188
     189if ( ! class_exists( 'INIData' ) ) :
    177190
    178191class INIData {
     
    191204    var $m_PG2IP;
    192205    //----------------------------
    193     //IFD ¿äûÇʵå
     206    //IFD 요청필드
    194207    //----------------------------
    195208    var $m_sCmd;
     
    208221    var $m_sSessionKey;
    209222    //----------------------------
    210     //IFD ÀÀ´äÇì´õ Çʵå
     223    //IFD 응답헤더 필드
    211224    //----------------------------
    212225    var $m_FlgCrypto;
     
    218231    var $m_REQUEST = array();
    219232    var $m_REQUEST2 = array(); //User Defined Entity
    220     var $m_RESULT = array();  //Encrypted Çʵå hash table
     233    var $m_RESULT = array();  //Encrypted 필드 hash table
    221234    var $m_RESULT2 = array(); //PG Added Entity
    222235
     
    241254            $this->m_sCrypto = FLAG_CRYPTO_3DES;
    242255        }
    243         //°¡»ó°èÁ ºÎºÐȯºÒ Ãß°¡
     256        //가상계좌 부분환불 추가
    244257        else if (( $this->m_Type == TYPE_REPAY) || ( $this->m_Type == TYPE_VACCTREPAY)) {
    245258            $this->m_sCmd = CMD_REQ_PRTC;
     
    268281                $this->m_sCrypto = FLAG_CRYPTO_3DES;
    269282            }
    270         } else if ($this->m_Type == TYPE_REFUND) { //°¡»ó°èÁÂȯºÒ(09.08.05)
     283        } else if ($this->m_Type == TYPE_REFUND) { //가상계좌환불(09.08.05)
    271284            $this->m_sCmd = CMD_REQ_RFD;
    272285            $this->m_sCrypto = FLAG_CRYPTO_3DES;
     
    289302    function CheckField() {
    290303        //---------------------------------
    291         //°øÅë
     304        //공통
    292305        //---------------------------------
    293306        if (trim($this->m_REQUEST["inipayhome"]) == "") {
     
    312325        }
    313326        //---------------------------------
    314         //typeº°·Î
     327        //type별로
    315328        //---------------------------------
    316329        if ($this->m_Type == TYPE_SECUREPAY) {
     
    381394            }
    382395        }
    383         //°¡»ó°èÁ ºÎºÐȯºÒµµ ºÎºÐȯºÒ ·ÎÁ÷¿¡ Ãß°¡
     396        //가상계좌 부분환불도 부분환불 로직에 추가
    384397        else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) {
    385398            if (trim($this->m_REQUEST["oldtid"]) == "") {
     
    399412            }
    400413
    401             //°¡»ó°èÁ ºÎºÐȯºÒ ·ÎÁ÷¿¡¼­´Â °èÁ¶¹øÈ£,ÀºÇàÄÚµå,°èÁÂÁÖ¸íÀÌ Çʼö
     414            //가상계좌 부분환불 로직에서는 계조번호,은행코드,계좌주명이 필수
    402415            if ($this->m_Type == TYPE_VACCTREPAY) {
    403416                if (trim($this->m_REQUEST["refundacctnum"]) == "") {
    404417                    $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM;
    405                     $this->m_ErrMsg = "ȯºÒ°èÁ¹øÈ£";
     418                    $this->m_ErrMsg = "환불계좌번호";
    406419                    return false;
    407420                }
    408421                if (trim($this->m_REQUEST["refundbankcode"]) == "") {
    409422                    $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE;
    410                     $this->m_ErrMsg = "ȯºÒÀºÇàÄÚµå";
     423                    $this->m_ErrMsg = "환불은행코드";
    411424                    return false;
    412425                }
    413426                if (trim($this->m_REQUEST["refundacctname"]) == "") {
    414427                    $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME;
    415                     $this->m_ErrMsg = "ȯºÒ°èÁÂÁÖ¼º¸í";
     428                    $this->m_ErrMsg = "환불계좌주성명";
    416429                    return false;
    417430                }
     
    436449            if (trim($this->m_REQUEST["racctnum"]) == "") {
    437450                $this->m_ErrCode = NULL_FIELD_REFUNDACCTNUM;
    438                 $this->m_ErrMsg = "ȯºÒ°èÁ¹øÈ£";
     451                $this->m_ErrMsg = "환불계좌번호";
    439452                return false;
    440453            }
    441454            if (trim($this->m_REQUEST["rbankcode"]) == "") {
    442455                $this->m_ErrCode = NULL_FIELD_REFUNDBANKCODE;
    443                 $this->m_ErrMsg = "ȯºÒÀºÇàÄÚµå";
     456                $this->m_ErrMsg = "환불은행코드";
    444457                return false;
    445458            }
    446459            if (trim($this->m_REQUEST["racctname"]) == "") {
    447460                $this->m_ErrCode = NULL_FIELD_REFUNDACCTNAME;
    448                 $this->m_ErrMsg = "ȯºÒ°èÁÂÁÖ¼º¸í";
     461                $this->m_ErrMsg = "환불계좌주성명";
    449462                return false;
    450463            }
     
    463476        $datestr = date("YmdHis", $sec) . substr($usec, 2, 3); //YYYYMMDDHHMMSSSSS
    464477
    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적용)
    469482        $this->m_sTID = $this->m_REQUEST["pgid"] . $this->m_REQUEST["mid"] . $datestr_con . mt_rand(1000, 9999);
    470483        if (strlen($this->m_sTID) != TID_LEN) {
     
    527540            $CD = $xml->add_node($CI, TX_PRTC_QUOTA, $this->m_REQUEST["cardquota"]);
    528541            $CD = $xml->add_node($CI, TX_PRTC_INTEREST, $this->m_REQUEST["quotainterest"]);
    529             //I°èÁÂÀÌü ±¹¹ÎÀºÇà ºÎºÐÃë¼Ò½Ã °èÁ¹øÈ£ °èÁÂÁÖ¼º¸íÀ» ¹ÞÀ½ 2011-10-06
     542            //I계좌이체 국민은행 부분취소시 계좌번호 계좌주성명을 받음 2011-10-06
    530543            $CD = $xml->add_node($CI, TX_PRTC_NOACCT, $this->m_REQUEST["no_acct"]);
    531544            $CD = $xml->add_node($CI, TX_PRTC_NMACCT, $this->m_REQUEST["nm_acct"], array("urlencode" => "1"));
    532             //°ú¼¼,ºñ°ú¼¼ Ãß°¡ 2014-07-23 by jung.ks
     545            //과세,비과세 추가 2014-07-23 by jung.ks
    533546            //$CD = $xml->add_node($CI,               TX_PRTC_TAX,      $this->m_REQUEST["tax"]     );
    534547            //$CD = $xml->add_node($CI,               TX_PRTC_TAXFREE,      $this->m_REQUEST["taxfree"]     );
     
    536549            $this->AddUserDefinedEntity(PARTCANCELINFO, "", $xml, $CI);
    537550        }
    538         //°¡»ó°èÁ ºÎºÐȯºÒ
     551        //가상계좌 부분환불
    539552        else if ($this->m_Type == TYPE_VACCTREPAY) {
    540553            //PartCancelInfo(ROOT)
     
    685698        $xml = new XML();
    686699
    687         //ROOT(INIpay) ROOT¸¦ ROOTINFO·Î ¼öÁ¤ 2011-05-23
     700        //ROOT(INIpay) ROOT를 ROOTINFO로 수정 2011-05-23
    688701        $root = $xml->add_node("", ROOTINFO);
    689702
    690703        if ($this->m_Type == TYPE_SECUREPAY || $this->m_Type == TYPE_RECEIPT) {
    691704            //GoodsInfo
    692             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)
    693             //==goodscnt°¡ ¾øÀ» °æ¿ì(Àå¹Ù±¸´Ï ±â´ÉÀÌ ¾Æ´Ò°æ¿ì) ±âº» °ª 1·Î ¼³Á¤
     705            //장바구니 기능 추가(2010.04.13)
     706            //==goodscnt가 없을 경우(장바구니 기능이 아닐경우) 기본 값 1로 설정
    694707            $tGoodCnt = ($this->m_REQUEST["goodscnt"] != null && (int) $this->m_REQUEST["goodscnt"] > 0 ) ? $this->m_REQUEST["goodscnt"] : 1;
    695708
    696709            $GI = $xml->add_node($root, GOODSINFO);
    697             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)
    698             //==TX_GOOSCNT´Â  $tGoodCnt·Î ºÎÅÍ ÀÔ·Â
     710            //장바구니 기능 추가(2010.04.13)
     711            //==TX_GOOSCNT는  $tGoodCnt로 부터 입력
    699712            //$GP = $xml->add_node($GI,     TX_GOOSCNT,         "1"                                                         );
    700713            $GP = $xml->add_node($GI, TX_GOOSCNT, $tGoodCnt);
     
    705718            $this->AddUserDefinedEntity(GOODSINFO, "", $xml, $GI);
    706719
    707             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [START]
    708             //==Àå¹Ù±¸´Ï XML Àü¹® Ãß°¡
     720            //장바구니 기능 추가(2010.04.13) [START]
     721            //==장바구니 XML 전문 추가
    709722            $iGoodCnt = 1;
    710723            while ($iGoodCnt <= $tGoodCnt) {
     
    731744                $iGoodCnt++;
    732745            }
    733             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [END]
     746            //장바구니 기능 추가(2010.04.13) [END]
    734747
    735748            $this->AddUserDefinedEntity(GOODSINFO, GOODS, $xml, $GS);
     
    768781            $CD = $xml->add_node($CI, TX_ENCRYPTED, $this->m_sEncrypted);
    769782        }
    770         //°¡»ó°èÁ ºÎºÐȯºÒÃß°¡
     783        //가상계좌 부분환불추가
    771784        else if (( $this->m_Type == TYPE_REPAY ) || ( $this->m_Type == TYPE_VACCTREPAY )) {
    772785            //PartCancelInfo
     
    807820        } else if ($this->m_Type == TYPE_OPENSUB) {
    808821            //GoodsInfo
    809             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13)
    810             //==goodscnt°¡ ¾øÀ» °æ¿ì(Àå¹Ù±¸´Ï ±â´ÉÀÌ ¾Æ´Ò°æ¿ì) ±âº» °ª 1·Î ¼³Á¤
     822            //장바구니 기능 추가(2010.04.13)
     823            //==goodscnt가 없을 경우(장바구니 기능이 아닐경우) 기본 값 1로 설정
    811824            $tSubCnt = ($this->m_REQUEST["subcnt"] != null && (int) $this->m_REQUEST["subcnt"] > 0 ) ? $this->m_REQUEST["subcnt"] : 1;
    812825
     
    832845                $iSubCnt++;
    833846            }
    834             //Àå¹Ù±¸´Ï ±â´É Ãß°¡(2010.04.13) [END]
     847            //장바구니 기능 추가(2010.04.13) [END]
    835848            $this->AddUserDefinedEntity(OPENSUBINFO, "", $xml, $OI);
    836849        }
     
    904917
    905918        //PAYMENTINFO
    906         //±âŸÁöºÒ¼ö´ÜÀÌ paymethod¸¦ ÁÖÁö ¾Ê¾Æ Àӽ÷Π¿äû Paymethod·Î ´ëü
    907         //PG¿¡¼­ ÁÖ´Â PayMethod¿Í ¿äûPaymethod´Â °°´Ù!
     919        //기타지불수단이 paymethod를 주지 않아 임시로 요청 Paymethod로 대체
     920        //PG에서 주는 PayMethod와 요청Paymethod는 같다!
    908921        $this->m_RESULT[NM_PAYMETHOD] = $this->m_sPayMethod;
    909922
     
    931944
    932945        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가 뭔지 알게 뭐야!!!-_-
    935948            if ($this->m_sPayMethod == NM_TX_CARD) {
    936949                $this->m_RESULT[APPLDATE] = $this->GetXMLData(CARD_APPLDATE);
     
    9971010                $this->m_RESULT[APPLNUM] = $this->GetXMLData(GAMG_APPLNUM);
    9981011                $this->m_RESULT[GAMG_CNT] = $this->GetXMLData(GAMG_CNT);
    999                 //°ÔÀÓ¹®È­»óǰ±ÇÀº Multi°áÁ¦ °¡´É
     1012                //게임문화상품권은 Multi결제 가능
    10001013                MakePathGAMG($this->m_RESULT[GAMG_CNT]);
    10011014                for ($i = 1; $i <= $this->m_RESULT[GAMG_CNT]; $i++) {
     
    10641077    }
    10651078
    1066     // Xpath·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!
     1079    // Xpath로 안가져온다. 한달을 헛지랄 했다!!
    10671080    // added by ddaemiri, 2007.09.03
    10681081    function GetXMLData($node) {
     
    10751088}
    10761089
     1090endif;  //End class INIData
     1091
    10771092/* ----------------------------------------------------- */
    10781093/* Crypto Class                                            */
    1079 /* PHP4.2 & OpenSSL ÇÊ¿ä)                                */
     1094/* PHP4.2 & OpenSSL 필요)                                  */
    10801095/* ----------------------------------------------------- */
     1096
     1097if ( ! class_exists( 'INICrypto' ) ) :
    10811098
    10821099class INICrypto {
     
    13381355
    13391356}
     1357
     1358endif;  // End class INICrypto
    13401359?>
    1341 
  • gnupay-inicis/trunk/lib/INIDFN.php

    r1467295 r1830608  
    44 * Copyright (C) 2007 INICIS Inc.
    55 *
    6  * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼­´Â ¾ÈµË´Ï´Ù.
    7  * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.
     6 * 해당 라이브러리는 절대 수정되어서는 안됩니다.
     7 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다.
    88 *
    99 * @version         5.0
     
    1616 * @buildno             5001
    1717 * @date            2008.01.15
    18  * @note                        ÀÚü¿¡½ºÅ©·Î Ãß°¡, DNS Lookup Timeout Ãß°¡, DNS Lookup ½ÇÆÐ½Ã socket close¾ÈÇÏ´Â ºÎºÐ Ãß°¡
     18 * @note                        자체에스크로 추가, DNS Lookup Timeout 추가, DNS Lookup 실패시 socket close안하는 부분 추가
    1919 * @date            2008.01.16
    20  * @note                        Encrypt,Decrypt ¸ðµâ °³¼±, pkcs5 padding Ãß°¡
     20 * @note                        Encrypt,Decrypt 모듈 개선, pkcs5 padding 추가
    2121 * @date            2008.01.24
    2222 * @note                        non block connect immediate return check code/str   
    2323 * @date            2008.02.11
    24  * @note                        key load ÈÄ read¿¡·¯¹ß»ý½Ã fclose Ãß°¡
     24 * @note                        key load 후 read에러발생시 fclose 추가
    2525 * @date            2008.03.03
    26  * @note                        ÂüÁ¶¿¡ ÀÇÇÑ Àü´Þ(passing by reference) ¼öÁ¤
     26 * @note                        참조에 의한 전달(passing by reference) 수정
    2727 * @date            2008.03.11
    28  * @note                        ¿¡½ºÅ©·Î ¸ÁÃë¼Ò Cmd Ãß°¡
     28 * @note                        에스크로 망취소 Cmd 추가
    2929 * @date            2008.03.12
    30  * @note                        ±âÁ¸ ¿¬°áµÈ IP·Î ¸ÁÃë¼Ò ¼öÁ¤
     30 * @note                        기존 연결된 IP로 망취소 수정
    3131 * @buildno             5002
    32  * @note                        ¸ÁÃë¼Ò½Ã SignÃß°¡(±âÁ¸¿¡ ¾ÈÇßÀ½->5001Àº ¸ÁÃë¼Ò½Ã ¼­¹öÃø¿¡¼­ ¼­¸í¿À·ù°¡ ³²,±×·¡µµ ¸ÁÃë¼Ò󸮴 µÊ)
     32 * @note                        망취소시 Sign추가(기존에 안했음->5001은 망취소시 서버측에서 서명오류가 남,그래도 망취소처리는 됨)
    3333 * @date            2008.03.12
    3434 * @buildno             5016
    35  * @note                        pg1ip, pg2ip Ãß°¡/Ãë¼Ò ¿ø°Å·¡¾øÀ½½Ã drpg·Î Àç½Ãµµ
     35 * @note                        pg1ip, pg2ip 추가/취소 원거래없음시 drpg로 재시도
    3636 * @date            2008.04.02
    3737 * @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로 수정
    4040 * @date            2009.01.12
    4141 * @buildno             5019
     
    4444 * @note                        add mkey/mergelog ( for Makeshop )
    4545 * @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값을 받아 처리하게 변경)
    4949 * @date            2009.05.07
    5050 * @note                        add BUILDDATE in TXVersion
     
    5858 * @note                        add Tax, TaxFree info(TX_TAX, TX_TAXFREE)
    5959 * @date            2010.09.09
    60  * @note                        Ãë¼Ò¿äû½Ã PG ¼³Á¤ º¯°æ(µµ¸ÞÀÎ->IP, INILib.php)
     60 * @note                        취소요청시 PG 설정 변경(도메인->IP, INILib.php)
    6161 * @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로 수정
    6363 * @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 추가
    6666 * @buildno             5036
    6767 * @note            2014.12.09  add gather parameter tid, type
     
    112112
    113113//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값을 받아 처리하게 변경)
    116116//define("MKEY", 1);
    117117//non block connect immediate return check code/str
     
    139139}
    140140
     141
    141142//------------------------------------------------------
    142143// IFD CMD
     
    154155define("CMD_REQ_ACK", "0800");
    155156define("CMD_RES_ACK", "0810");
    156 //ÀÚü¿¡½ºÅ©·Î
     157//자체에스크로
    157158//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)
     159define("CMD_REQ_DLV", "3020"); //배송등록
     160define("CMD_REQ_CNF", "3030"); //구매확인
     161define("CMD_REQ_DNY", "3040"); //구매거절
     162define("CMD_REQ_DNY_CNF", "3080"); //거절확인
     163define("CMD_REQ_DLV_NETC", "3520"); //배송등록망상취소
     164define("CMD_REQ_CNF_NETC", "3530"); //구매확인망상취소
     165define("CMD_REQ_DNY_NETC", "3540"); //구매거절망상취소
     166//가상계좌환불(09.08.05)
    166167define("CMD_REQ_RFD", "0421");
    167168define("CMD_RES_RFD", "0431");
    168169
    169 //°Å·¡Á¶È¸(12.04.20)
     170//거래조회(12.04.20)
    170171define("CMS_REQ_INQR", "0900");
    171172define("CMS_RES_INQR", "0910");
    172173
    173 //¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)
     174//서브몰하위가맹점등록(14.03.06)
    174175define("CMS_REQ_OPEN_SUB", "1040");
    175176define("CMS_RES_OPEN_SUB", "1041");
     
    189190
    190191//------------------------------------------------------
    191 //TYPE(¼­ºñ½ºº°)
     192//TYPE(서비스별)
    192193//------------------------------------------------------
    193194define("TYPE_SECUREPAY", "securepay");
     
    196197define("TYPE_RECEIPT", "receipt");
    197198define("TYPE_REPAY", "repay");
    198 define("TYPE_ESCROW", "escrow");  //ÀÚü¿¡½ºÅ©·Î!
     199define("TYPE_ESCROW", "escrow");  //자체에스크로!
    199200define("TYPE_CONFIRM", "confirm");
    200201define("TYPE_OCBQUERY", "ocbquery");
     
    209210define("TYPE_FORMAUTH", "formauth");
    210211define("TYPE_CHKFAKE", "chkfake");
    211 //°¡»ó°èÁÂȯºÒ(09.08.05)
     212//가상계좌환불(09.08.05)
    212213define("TYPE_REFUND", "refund");
    213 //°¡»ó°èÁºκÐȯºÒ(12.06.05)
     214//가상계좌부분환불(12.06.05)
    214215define("TYPE_VACCTREPAY", "vacctrepay");
    215 //°Å·¡Á¶È¸(12.04.20)
     216//거래조회(12.04.20)
    216217define("TYPE_INQUIRY", "inquiry");
    217 //¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)
     218//서브몰하위가맹점등록(14.03.06)
    218219define("TYPE_OPENSUB", "opensub");
    219220//------------------------------------------------------
    220 //EscrowType(ÀÚü¿¡½ºÅ©·Î ŸÀÔ)
     221//EscrowType(자체에스크로 타입)
    221222//added 2008.01.08
    222223//------------------------------------------------------
    223224define("TYPE_ESCROW_DLV", "dlv");
    224 define("TYPE_ESCROW_CNF", "confirm"); //±¸¸ÅÈ®ÀÎ/°ÅÀý(Ç÷¯±×ÀÎ)
    225 define("TYPE_ESCROW_DNY", "deny");  //À§¿¡¼­ 󸮵Ê,Àǹ̾øÀ½
     225define("TYPE_ESCROW_CNF", "confirm"); //구매확인/거절(플러그인)
     226define("TYPE_ESCROW_DNY", "deny");  //위에서 처리됨,의미없음
    226227define("TYPE_ESCROW_DNY_CNF", "dcnf");
    227228
    228229
    229230//------------------------------------------------------
    230 //PayMethod(¼­ºñ½ºº°, TX)
     231//PayMethod(서비스별, TX)
    231232//------------------------------------------------------
    232233define("NM_TX_ISP", "VCard");
     
    246247
    247248//------------------------------------------------------
    248 //PayMethod(¼­ºñ½ºº°, PG)
     249//PayMethod(서비스별, PG)
    249250//------------------------------------------------------
    250251define("NM_ISP", "ISP");
     
    276277
    277278//------------------------------------------------------
    278 //¿äûÀü¹®
     279//요청전문
    279280//------------------------------------------------------
    280281define("TX_GOOSCNT", "GoodsCnt");
     
    319320define("TX_CANCELTID", "CancelTID");
    320321define("TX_CANCELMSG", "CancelMsg");
    321 define("TX_CANCELREASON", "CancelReason");      //2012-10-19 Ãë¼Ò»çÀ¯ÄÚµå Ãß°¡
    322 //°¡»ó°èÁÂȯºÒ(09.08.05)
     322define("TX_CANCELREASON", "CancelReason");      //2012-10-19 취소사유코드 추가
     323//가상계좌환불(09.08.05)
    323324define("TX_REFUNDACCTNUM", "RefundAcctNum");
    324325define("TX_REFUNDBANKCODE", "RefundBankCode");
     
    335336define("TX_PRTC_CURRENCY", "Currency");
    336337
    337 //±¹¹ÎÀºÇà I°èÁÂÀÌü ºÎºÐÃë¼Ò½Ã °èÁ¹øÈ£/°èÁÂÁÖ¼º¸íÃß°¡ 2011-10-06
     338//국민은행 I계좌이체 부분취소시 계좌번호/계좌주성명추가 2011-10-06
    338339define("TX_PRTC_NOACCT", "PRTC_NoAcctFNBC");
    339340define("TX_PRTC_NMACCT", "PRTC_NmAcctFNBC");
    340 //°¡»ó°èÁ ºÎºÐȯºÒ °ü·Ã Ãß°¡
     341//가상계좌 부분환불 관련 추가
    341342define("TX_PRTC_REFUNDFLGREMIT", "PRTC_RefundFlgRemit");
    342343define("TX_PRTC_REFUNDBANKCODE", "PRTC_RefundBankCode");
    343344//CaptureInfo
    344345define("TX_CAPTURETID", "CaptureTID");
    345 //Çö±Ý¿µ¼öÁõ
     346//현금영수증
    346347define("TX_CSHR_APPLPRICE", "CSHR_ApplPrice");
    347348define("TX_CSHR_SUPPLYPRICE", "CSHR_SupplyPrice");
     
    359360define("TX_CSHR_SUBAPPLPRICE1", "CSHR_SubApplPrice1");
    360361define("TX_CSHR_SUBSERVICEPRICE1", "CSHR_SubServicePrice1");
    361 //°Å·¡Á¶È¸(12.04.20)
     362//거래조회(12.04.20)
    362363define("TX_INQR_TID", "INQR_TID");
    363 //¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)
     364//서브몰하위가맹점등록(14.03.06)
    364365define("TX_OPENREG_TID", "OrgTID");
    365366define("TX_OPENREG_MID", "MID");
     
    376377//------------------------------------------------------
    377378//
    378 //ÀÀ´äÀü¹®
     379//응답전문
    379380//
    380381//------------------------------------------------------
     
    435436//Capture
    436437define("CAPTUREINFO", "CaptureInfo");
    437 //°Å·¡Á¶È¸(12.04.20)
     438//거래조회(12.04.20)
    438439define("INQUIRYINFO", "InquiryInfo");
    439 //¼­ºê¸ôÇÏÀ§°¡¸ÍÁ¡µî·Ï(14.03.06)
     440//서브몰하위가맹점등록(14.03.06)
    440441define("OPENSUBINFO", "OpenSubInfo");
    441442//Escrow
     
    543544//ERROR CODE
    544545//----------------------------------
    545 //!!½ÅTX¿¡ Ãß°¡µÈ ¿¡·¯!!!
     546//!!신TX에 추가된 에러!!!
    546547define("NULL_DIR_ERR", "TX9001");
    547548define("NULL_TYPE_ERR", "TX9002");
     
    553554define("PGPUB_UPDATE_ERR", "TX9612");
    554555
    555 //¾Ïº¹È£È­ ¿¡·¯
     556//암복호화 에러
    556557define("B64DECODE_UPDATE_ERR", "TX9101");
    557558define("B64DECODE_FINAL_ERR", "TX9102");
     
    578579define("ENC_INIT_RAND_ERR", "TX9123");
    579580define("ENC_PUTENV_ERR", "TX9124");
    580 //Çʵåüũ
     581//필드체크
    581582define("NULL_KEYPW_ERR", "TX9201");
    582583define("NULL_MID_ERR", "TX9202");
     
    609610define("NULL_BUYEREMAIL_ERR", "TX9229");
    610611define("NULL_SESSIONKEY_ERR", "TX9230");
    611 //pg°ø°³Å° ·Îµå ¿À·ù
     612//pg공개키 로드 오류
    612613define("NULL_PGCERT_FP_ERR", "TX9231");
    613614define("NULL_X509_ERR", "TX9232");
     
    616617define("RESULT_MSG_FORMAT_ERR", "TX9234");
    617618
    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// 가상 계좌 이체 예약
     620define("NULL_PERNO_ERR", "TX9235");  // 주민번호 빠짐
     621define("NULL_OID_ERR", "TX9236");  // 주문번호 빠짐
     622define("NULL_VCDBANK_ERR", "TX9237");  // 은행코드 빠짐
     623define("NULL_DTINPUT_ERR", "TX9238");  // 입금 예정일 빠짐
     624define("NULL_NMINPUT_ERR", "TX9239");  // 송금자 성명 빠짐
     625//실시간 빌링
     626define("NULL_BILLKEY_ERR", "TX9240");  // 빌키 빠짐
     627define("NULL_CARDPASS_ERR", "TX9241");  // 카드 비번 빠짐
     628define("NULL_BILLTYPE_ERR", "TX9242");  // 빌타입 누락
     629// CMS 계좌이체
     630define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS 출금총금액 빠짐
     631define("NULL_CMSDAY_ERR", "TX9251"); // CMS 출금일자 빠짐
     632define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS 출금시작월 빠짐
     633define("NULL_CMSDATETO_ERR", "TX9253"); // CMS 출금종료월 빠짐
     634// 부분취소
     635define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // 재승인 요청금액 누락 에러
     636// 현금영수증 발행
     637define("NULL_CR_PRICE_ERR", "TX9270"); // 현금결제 금액 빠짐
     638define("NULL_SUP_PRICE_ERR", "TX9271"); // 공급가액 빠짐
     639define("NULL_TAX_ERR", "TX9272"); // 부가세 빠짐
     640define("NULL_SRVC_PRICE_ERR", "TX9273"); // 봉사료 빠짐
     641define("NULL_REG_NUM_ERR", "TX9274");  // 주민번호(사업자번호)
     642define("NULL_USEOPT_ERR", "TX9275"); // 현금영수증 용도 구분자 빠짐
    642643
    643644define("PRIVKEY_FILE_OPEN_ERR", "TX9301");
  • gnupay-inicis/trunk/lib/INILib.php

    r1467295 r1830608  
    77 *
    88 */
     9
    910
    1011    require_once('INICls.php');
  • gnupay-inicis/trunk/lib/INISoc.php

    r1422798 r1830608  
    33 * Copyright (C) 2007 INICIS Inc.
    44 *
    5  * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼­´Â ¾ÈµË´Ï´Ù.
    6  * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.
     5 * 해당 라이브러리는 절대 수정되어서는 안됩니다.
     6 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다.
    77 *
    88 */
     
    9090                return OK;
    9191            }
    92             //EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, ¸ðµç OS üũ ºÒ°¡´ÉÇØ¼­ strÀ¸·Îµµ °Ë»ö )
     92            //EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, 모든 OS 체크 불가능해서 str으로도 검색 )
    9393      if ($err != ERRCODE_INPROGRESS_LINUX && $err != ERRCODE_INPROGRESS_WIN &&
    9494                    $err != ERRCODE_INPROGRESS_FREEBSD && $err_str != ERRSTR_INPROGRESS )
  • gnupay-inicis/trunk/lib/INIStdPayUtil.php

    r1467295 r1830608  
    1212            $milliseconds = round(microtime(true) * 1000); 
    1313            $tempValue1 = round($milliseconds/1000);        //max integer 자릿수가 9이므로 뒤 3자리를 뺀다
    14             $tempValue2 = round(microtime(false) * 1000);   //뒤 3자리를 저장
     14            $tempValue2 = round((int) microtime(false) * 1000); //뒤 3자리를 저장
    1515            switch (strlen($tempValue2)) {
    1616                case '3':
  • gnupay-inicis/trunk/lib/INIXml.php

    r1422798 r1830608  
    4848/**
    4949 *
    50  * ÇØ´ç ¶óÀ̺귯¸®´Â Àý´ë ¼öÁ¤µÇ¾î¼­´Â ¾ÈµË´Ï´Ù.
    51  * ÀÓÀÇ·Î ¼öÁ¤µÈ Äڵ忡 ´ëÇÑ Ã¥ÀÓÀº ÀüÀûÀ¸·Î ¼öÁ¤ÀÚ¿¡°Ô ÀÖÀ½À» ¾Ë·Áµå¸³´Ï´Ù.
     50 * 해당 라이브러리는 절대 수정되어서는 안됩니다.
     51 * 임의로 수정된 코드에 대한 책임은 전적으로 수정자에게 있음을 알려드립니다.
    5252 *
    5353 */
     
    189189    */
    190190        //modify by ddaemiri, 2007.05.28
    191         //load_file -> load_xml·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½.
     191        //load_file -> load_xml로 파일 및 string 으로 모두 입력받을 수 있음.
    192192    public function __construct( $file = "" )
    193193    {
     
    214214    */
    215215        //modify by ddaemiri, 2007.05.28
    216         //load_file -> load_xml·Î ÆÄÀÏ ¹× string À¸·Î ¸ðµÎ ÀԷ¹ÞÀ» ¼ö ÀÖÀ½.
     216        //load_file -> load_xml로 파일 및 string 으로 모두 입력받을 수 있음.
    217217    function load_xml ( $file, $str )
    218218    {
     
    267267       
    268268        //modify by ddaemiri, 2007.05.28
    269         //charset Ãß°¡( header »ý¼º )
     269        //charset 추가( header 생성 )
    270270    function make_xml ( $highlight = array(), $root = "", $level = 0, $charset = "UTF-8" )
    271271        {
    272                 // header Ãß°¡
     272                // header 추가
    273273                $header = "<?xml version=\"1.0\" encoding=\"".$charset."\"?>"."\n";
    274274                $body = $this->get_xml( $highlight, $root, $level );
     
    298298    */
    299299        //modify by ddaemiri, 2007.05.28
    300         //get_file -> get_xml ·Î ÇÔ¼öÀ̸§ º¯°æ.
     300        //get_file -> get_xml 로 함수이름 변경.
    301301    function get_xml ( $highlight = array(), $root = "", $level = 0 )
    302302    {
     
    923923       
    924924        // Set the attributes.
    925                 // Xpath·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!
     925                // Xpath로 안가져온다. 한달을 헛지랄 했다!!
    926926                // modifyed by ddaemiri, 2007.09.03
    927927        // $this->set_attributes($this->path, $attributes);
     
    968968       
    969969        // Save the text.
    970                 // Xpath·Î ¾È°¡Á®¿Â´Ù. ÇÑ´ÞÀ» ÇêÁö¶ö Çß´Ù!!
     970                // Xpath로 안가져온다. 한달을 헛지랄 했다!!
    971971                // modifyed by ddaemiri, 2007.09.03
    972972        //$this->add_content($this->path, addslashes(trim($text)));
     
    974974                // add array, added by ddaemiri, 2007.09.03
    975975                $arr = preg_split( "/[\/]+/", $this->path, -1, PREG_SPLIT_NO_EMPTY  );
    976                 //edited by ddaemiri. libexpatÀº \nÀ» ºÐ¸®ÀÚ·Î ÀνÄ
     976                //edited by ddaemiri. libexpat은 \n을 분리자로 인식
    977977                //$this->xml_node[$arr[count($arr)-1]]["text"] = addslashes(trim($text));
    978978                $this->xml_node[$arr[count($arr)-1]]["text"] = $this->xml_node[$arr[count($arr)-1]]["text"].addslashes(trim($text));
     
    34743474
    34753475        //added by ddaemiri, 2007.05.28
    3476         //entity °¡ Çϳª¸¸ ÀÖ´Ù°í °¡Á¤!! ¹è¿­ÀÇ Ã¹¹øÂ°¸¸ °¡Á®¿È.
     3476        //entity 가 하나만 있다고 가정!! 배열의 첫번째만 가져옴.
    34773477    function get_content_fetch ( $path )
    34783478        {
  • gnupay-inicis/trunk/lib/functions.php

    r1568394 r1830608  
    150150        }
    151151       
    152         $res['order_id'] = $order->id;
     152        $order_id = $res['order_id'] = $order->get_order_number();
    153153
    154154        $goods = '';
     
    327327            );
    328328
    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); // 가맹점 주문번호(가맹점에서 직접 설정)
    330330            $res['p_mname'] = $p_mname;     //상점 이름
    331331            $res['noti_url']   = add_query_arg(array('wc-api'=>'gnupay_inicis_returnurl', 'inicispay'=>'noti'), home_url( '/' ));
     
    369369            $INIStdPayReturn = add_query_arg(array('wc-api'=>'gnupay_inicis_returnurl', 'inicispay'=>'return'), home_url( '/' ));
    370370
    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); // 가맹점 주문번호(가맹점에서 직접 설정)
    372372
    373373            $cardNoInterestQuota = "11-2:3:,34-5:12,14-6:12:24,12-12:36,06-9:12,01-3:4";  // 카드 무이자 여부 설정(가맹점에서 직접 설정)
     
    399399           
    400400 
    401             $payment_method = get_post_meta( $order->id, '_payment_method', true );
     401            $payment_method = get_post_meta( $order_id, '_payment_method', true );
    402402            $pay_ids = gnupay_inicis_get_settings('pay_ids');
    403403
  • gnupay-inicis/trunk/readme.txt

    r1590411 r1830608  
    66Requires at least: 4.0
    77Tested up to: 4.5
    8 Stable tag: 1.3.3
     8Stable tag: 1.3.4
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • gnupay-inicis/trunk/template/order_detail.php

    r1467295 r1830608  
    9292        $default_cash = array('receipt_no'=>'');
    9393
    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));
    9595
    9696        $cash = wp_parse_args($od_cash_info, $default_cash);
     
    100100        <a href="#" onclick="<?php echo $cash_receipt_script; ?>"><?php _e('현금영수증 확인하기', GNUPAY_INICIS); ?></a>
    101101        <?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>
    103103        <?php } ?>
    104104    </td>
  • gnupay-inicis/trunk/template/tax_result.php

    r1467295 r1830608  
    1818 */
    1919
    20 $od_cash = get_post_meta($order->id, '_od_cash', true);
     20$od_cash = get_post_meta($order_id, '_od_cash', true);
    2121
    2222if( $od_cash ){
     
    4747$currency = 'WON';
    4848
    49 $od_currency = get_post_meta($order->id, '_od_currency', true);
     49$od_currency = get_post_meta($order_id, '_od_currency', true);
    5050
    5151if( 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.