示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /**
             * 1건의 예금주성명을 조회합니다.
             * - https://docs.popbill.com/accountcheck/dotnet/api#CheckAccountInfo
             */

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

            // 기관코드
            String bankCode = "";

            // 계좌번호
            String accountNumber = "";

            try
            {
                result = Global.accountCheckService.CheckAccountInfo(testCorpNum, bankCode, accountNumber);
            }
            catch (PopbillException ex)
            {
                code    = ex.code.ToString();
                message = ex.Message;
            }
        }
示例#2
0
        public async Task <JsonResult> CheckInfo(AccountCheckInfo checkInfo)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    throw new HttpException((int)HttpStatusCode.BadRequest, ConstantHelper.KEY_IN_REQUIRED_FIELD);
                }

                Response.StatusCode = 200;
                var account = await handler.CheckPhoneNumber(checkInfo);

                if (account == null)
                {
                    return(Json("", JsonRequestBehavior.AllowGet));
                }
                return(Json(account.acct_AccountID, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                if (ex.Message == ConstantHelper.ALREADY_REQUEST_LOAN || ex.Message == ConstantHelper.KEY_IN_REQUIRED_FIELD)
                {
                    Response.StatusCode = 400;
                }
                else
                {
                    Response.StatusCode = 500;
                }
                return(Json(ex.Message, JsonRequestBehavior.AllowGet));
            }
        }
示例#3
0
        //-> Check Number
        public async Task <AccountViewDTO> CheckPhoneNumber(AccountCheckInfo checkPhoneNumber)
        {
            checkPhoneNumber = checkPhoneNumber.TrimStringProperties();
            var account = await db.tblAccounts.FirstOrDefaultAsync(a => a.acct_Deleted == null && a.acct_PhoneNumber == checkPhoneNumber.phoneNumber);

            if (account == null)
            {
                return(null);
            }

            return(await SelectByID(account.acct_AccountID));
        }