Exemple #1
0
        // 현금영수증 프린트 URL
        private void btnGetPrintURL_Click(object sender, EventArgs e)
        {
            try
            {
                string url = cashbillService.GetPrintURL(txtCorpNum.Text, txtMgtKey.Text, txtUserId.Text);

                MessageBox.Show(url);
            }
            catch (PopbillException ex)
            {
                MessageBox.Show(ex.code.ToString() + " | " + ex.Message);
            }
        }
        /*
         * 현금영수증 1건을 인쇄하기 위한 페이지의 팝업 URL을 반환합니다.
         * - 반환되는 URL은 보안 정책상 30초 동안 유효하며, 시간을 초과한 후에는 해당 URL을 통한 페이지 접근이 불가합니다.
         * - https://docs.popbill.com/cashbill/dotnetcore/api#GetPrintURL
         */
        public IActionResult GetPrintURL()
        {
            // 현금영수증 문서번호
            string mgtKey = "20220527-003";

            try
            {
                var result = _cashbillService.GetPrintURL(corpNum, mgtKey, userID);
                return(View("Result", result));
            }
            catch (PopbillException pe)
            {
                return(View("Exception", pe));
            }
        }