Ejemplo n.º 1
0
        // 현금영수증 팩스 전송
        private void btnSendFAX_Click(object sender, EventArgs e)
        {
            try
            {
                //SendFAX(사업자번호, 문서관리번호, 발신번호, 수신팩스번호, 회원아이디)
                Response response = cashbillService.SendFAX(txtCorpNum.Text, txtMgtKey.Text, "1111-2222", "000-1111-2222", txtUserId.Text);

                MessageBox.Show(response.message);
            }
            catch (PopbillException ex)
            {
                MessageBox.Show(ex.code.ToString() + " | " + ex.Message);
            }
        }
        /*
         * 현금영수증을 팩스로 전송하는 함수로, 팝빌 사이트 [문자·팩스] > [팩스] > [전송내역] 메뉴에서 전송결과를 확인 할 수 있습니다.
         * - 함수 호출 시 포인트가 과금됩니다. (전송실패시 환불처리
         * - https://docs.popbill.com/cashbill/dotnetcore/api#SendFAX
         */
        public IActionResult SendFAX()
        {
            // 현금영수증 문서번호
            string mgtKey = "20220527-003";

            // 발신번호
            string sender = "";

            // 수신번호
            string receiver = "";

            try
            {
                var response = _cashbillService.SendFAX(corpNum, mgtKey, sender, receiver);
                return(View("Response", response));
            }
            catch (PopbillException pe)
            {
                return(View("Exception", pe));
            }
        }
        /*
         * 현금영수증을 팩스전송합니다.
         * - 팩스 전송 요청시 포인트가 차감됩니다. (전송실패시 환불처리)
         * - 전송내역 확인은 "팝빌 로그인" > [문자 팩스] > [팩스] > [전송내역] 메뉴에서 전송결과를 확인할 수 있습니다.
         * - https://docs.popbill.com/cashbill/dotnetcore/api#SendFAX
         */
        public IActionResult SendFAX()
        {
            // 현금영수증 문서번호
            string mgtKey = "20190115-003";

            // 발신번호
            string sender = "070-4304-2991";

            // 수신번호
            string receiver = "010-111-222";

            try
            {
                var response = _cashbillService.SendFAX(corpNum, mgtKey, sender, receiver, userID);
                return(View("Response", response));
            }
            catch (PopbillException pe)
            {
                return(View("Exception", pe));
            }
        }