Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /**
             * 현금영수증 1건의 상태 및 요약정보를 확인합니다.
             * - 리턴값 'CashbillInfo'의 변수 'stateCode'를 통해 현금영수증의 상태코드를 확인합니다.
             * - 현금영수증 상태코드 [https://docs.popbill.com/cashbill/stateCode?lang=dotnet]
             * - https://docs.popbill.com/cashbill/dotnet/api#GetInfo
             */

            // 팝빌회원 사업자번호, '-' 제외 10자리
            String testCorpNum = "1234567890";

            // 현금영수증 문서번호
            String mgtKey = "20220525-001";

            try
            {
                cashbillInfo = Global.cashbillService.GetInfo(testCorpNum, mgtKey);
            }
            catch (PopbillException ex)
            {
                code    = ex.code.ToString();
                message = ex.Message;
            }
        }
Exemple #2
0
        // 현금영수증 요약,상태정보 확인
        private void btnGetInfo_Click(object sender, EventArgs e)
        {
            try
            {
                CashbillInfo cashbillInfo = cashbillService.GetInfo(txtCorpNum.Text, txtMgtKey.Text);

                string tmp = null;

                tmp += "itemKey : " + cashbillInfo.itemKey + CRLF;
                tmp += "mgtKey : " + cashbillInfo.mgtKey + CRLF;
                tmp += "tradeDate : " + cashbillInfo.tradeDate + CRLF;
                tmp += "issueDT : " + cashbillInfo.issueDT + CRLF;
                tmp += "customerName : " + cashbillInfo.customerName + CRLF;
                tmp += "itemName : " + cashbillInfo.itemName + CRLF;
                tmp += "identityNum : " + cashbillInfo.identityNum + CRLF;
                tmp += "taxationType : " + cashbillInfo.taxationType + CRLF;

                tmp += "totalAmount : " + cashbillInfo.totalAmount + CRLF;
                tmp += "tradeUsage : " + cashbillInfo.tradeUsage + CRLF;
                tmp += "tradeType : " + cashbillInfo.tradeType + CRLF;
                tmp += "stateCode : " + cashbillInfo.stateCode + CRLF;
                tmp += "stateDT : " + cashbillInfo.stateDT + CRLF;
                tmp += "printYN : " + cashbillInfo.printYN + CRLF;

                tmp += "confirmNum : " + cashbillInfo.confirmNum + CRLF;
                tmp += "orgTradeDate : " + cashbillInfo.orgTradeDate + CRLF;
                tmp += "orgConfirmNum : " + cashbillInfo.orgConfirmNum + CRLF;

                tmp += "ntssendDT : " + cashbillInfo.ntssendDT + CRLF;
                tmp += "ntsresult : " + cashbillInfo.ntsresult + CRLF;
                tmp += "ntsresultDT : " + cashbillInfo.ntsresultDT + CRLF;
                tmp += "ntsresultCode : " + cashbillInfo.ntsresultCode + CRLF;
                tmp += "ntsresultMessage : " + cashbillInfo.ntsresultMessage + CRLF;

                tmp += "regDT : " + cashbillInfo.regDT;

                MessageBox.Show(tmp);
            }
            catch (PopbillException ex)
            {
                MessageBox.Show(ex.code.ToString() + " | " + ex.Message);
            }
        }