Пример #1
0
        /* ==================================================================================== */

        /* ==================================================================================== */
        /* +    METHOD : 망상 취소 처리                                                       + */
        /* - -------------------------------------------------------------------------------- - */
        private bool m_f__do_net_can(ref C_PP_CLI_COM parm_c_PP_CLI)
        {
            int  nDataSetInx_req;
            bool bDoNetCan = false;

            /* -------------------------------------------------------------------------------- */
            /* +    망상 취소 DATA 설정                                                       + */
            /* - ---------------------------------------------------------------------------- - */
            mod_type = "STSC";
            tno      = parm_c_PP_CLI.m_f__get_res("tno");
            /* - ---------------------------------------------------------------------------- - */
            parm_c_PP_CLI.m_f__init();
            /* - ---------------------------------------------------------------------------- - */
            if (req_tx.Equals("pay"))
            {
                bDoNetCan = true;
                mod_desc  = "처리 오류로 인한 거래 자동 취소";
            }
            /* -------------------------------------------------------------------------------- */

            /* -------------------------------------------------------------------------------- */
            /* +    자동 취소 처리                                                            + */
            /* - ---------------------------------------------------------------------------- - */
            if (bDoNetCan == true)
            {
                nDataSetInx_req = m_f__set_dataset_mod(ref parm_c_PP_CLI);
                parm_c_PP_CLI.m_f__do_tx(req_tx, m_strTxCD, nDataSetInx_req, "", m_strCFG_site_cd, m_strCFG_site_key, ordr_idxx);
                m_strResCD  = parm_c_PP_CLI.m_strResCD;
                m_strResMsg = parm_c_PP_CLI.m_strResMsg;

                m_f__disp_rt_can(ref parm_c_PP_CLI);
            }
            /* -------------------------------------------------------------------------------- */

            return(bDoNetCan);
        }
Пример #2
0
        /* ==================================================================================== */

        /* ==================================================================================== */
        /* +    METHOD : 요청 거래 처리                                                       + */
        /* - -------------------------------------------------------------------------------- - */
        private void m_f__do_tx()
        {
            C_PP_CLI_COM c_PP_CLI = new C_PP_CLI_COM();
            int          nDataSetInx_req;
            bool         bRT     = false;
            bool         bNetCan = false;

            /* -------------------------------------------------------------------------------- */
            /* +    초기화                                                                    + */
            /* - ---------------------------------------------------------------------------- - */
            m_strTxCD       = "";
            nDataSetInx_req = 0;
            /* - ---------------------------------------------------------------------------- - */
            c_PP_CLI.m_f__set_env(m_strCFG_paygw_url, m_strCFG_paygw_port,
                                  m_strCFG_log_path, m_strCFG_key_path);

            m_strCustIP = Request.ServerVariables.Get("REMOTE_ADDR");
            /* - ---------------------------------------------------------------------------- - */
            c_PP_CLI.m_f__init();
            /* -------------------------------------------------------------------------------- */

            /* -------------------------------------------------------------------------------- */
            /* +    요청 처리                                                                 + */
            /* - ---------------------------------------------------------------------------- - */
            if (req_tx.Equals("pay"))
            {
                nDataSetInx_req = m_f__set_dataset_pay(ref c_PP_CLI);
            }
            /* - ---------------------------------------------------------------------------- - */
            if (!m_strTxCD.Equals(""))
            {
                c_PP_CLI.m_f__do_tx(req_tx, m_strTxCD, nDataSetInx_req, "",
                                    m_strCFG_site_cd, m_strCFG_site_key, ordr_idxx);

                m_strResCD  = c_PP_CLI.m_strResCD;
                m_strResMsg = c_PP_CLI.m_strResMsg;
            }
            else
            {
                m_strResCD  = "9562";
                m_strResMsg = "지불모듈 연동 오류 (TX_CD) 가 정의되지 않았습니다.";
            }
            /* -------------------------------------------------------------------------------- */

            /* -------------------------------------------------------------------------------- */
            /* +    결과 처리                                                                 + */
            /* - ---------------------------------------------------------------------------- - */
            if (m_strResCD.Equals("0000"))
            {
                /* - ------------------------------------------------------------------------ - */
                if (req_tx.Equals("pay"))
                {
                    /* - -------------------------------------------------------------------- - */
                    bRT = m_f__to_do_shop_pay();          /* 정상 적립/조회/사용 거래 결과 처리 */
                    /* - -------------------------------------------------------------------- - */
                    if (bRT == false)
                    {
                        /* - ---------------------------------------------------------------- - */
                        /* +    TODO (주위) : 망상 취소 처리                                  + */
                        /* -- -------------------------------------------------------------- -- */
                        /* +    적립/사용 결과 처리 중 오류가 발생한 경우 자동 취소를         + */
                        /* +    원하실 경우 아래의 bNetCan 값을 true로 설정하여 주시기        + */
                        /* +    바랍니다. 취소 처리는 거래는 원복을 할 수 없으므로 주위       + */
                        /* +    하여 주시기 바랍니다.                                         + */
                        /* -- -------------------------------------------------------------- -- */
                        bNetCan = false;
                        /* - ---------------------------------------------------------------- - */
                    }
                    /* - -------------------------------------------------------------------- - */
                    if (bNetCan == true)
                    {
                        m_f__do_net_can(ref c_PP_CLI);
                    }
                    else
                    {
                        m_f__disp_rt_pay_succ(ref c_PP_CLI);
                    }
                    /* - -------------------------------------------------------------------- - */
                }
                /* - ------------------------------------------------------------------------ - */
            }
            else
            {
                /* - ------------------------------------------------------------------------ - */
                m_f__to_do_shop_fail();
                /* - ------------------------------------------------------------------------ - */
                m_f__disp_rt_fail();
            }
            /* -------------------------------------------------------------------------------- */
        }