예제 #1
0
        /// <summary>
        /// 取得超商繳費 BarCode
        /// </summary>
        /// <param name="model">取得標的物資料(繳款紀錄) Input</param>
        /// <returns>取得往來明細清單(未繳/逾期) Output</returns>
        public async Task <BaseResult <MergeBarcodeOutput> > GetMergeBarCode(MergeBarcodeInput model)
        {
            // 透過 Api 把資料送出去
            string apiUrl = "APP_FORM_PAY/GET_MERGE_BARCODE";

            BaseResult <MergeBarcodeOutput> result = await ApiService.Instance.ApiGetMergeBarCode(model, apiUrl);

            if (result.Result.ReturnCode == 0 && result.Data != null)
            {
                result.Data.BarCodeImage1 = this.GetBarCodeImage(result.Data.BARCODE1);
                result.Data.BarCodeImage2 = this.GetBarCodeImage(result.Data.BARCODE2);
                result.Data.BarCodeImage3 = this.GetBarCodeImage(result.Data.BARCODE3);
            }

            return(result);
        }
예제 #2
0
        /// <summary>
        /// 取得 Barcod 等其他資訊
        /// </summary>
        /// <param name="arList"></param>
        /// <returns></returns>
        private async Task <BaseResult <MergeBarcodeOutput> > GetMergeBarCodeData(List <ArList> arList)
        {
            MergeBarcodeInput model = new MergeBarcodeInput
            {
                CUST_NO = this.TokenVerify.Id,
                // COMP_ID = this.TokenVerify.CntrtNo,
                MbrId   = this.TokenVerify.MbrId,
                DevId   = this.TokenVerify.DevId,
                Token   = this.TokenVerify.Token,
                SYS_ID  = Common.GetSysId(),
                AR_DATA = arList.Select(x => new ArData
                {
                    MIN_AR_ID = x.AR_ID,
                    CNTRT_NO  = x.AR_PK.Substring(0, x.AR_PK.IndexOf("_")),
                    PAY_AMT   = int.Parse(x.AR_AMT)
                }).ToList()
            };

            AppFormPayService appFormPayService    = new AppFormPayService();
            BaseResult <MergeBarcodeOutput> result = await appFormPayService.GetMergeBarCode(model);

            return(result);
        }
예제 #3
0
        /// <summary>
        /// 取得超商繳費 BarCode
        /// </summary>
        /// <param name="model">param</param>
        /// <param name="apiUrl">Api 路徑</param>
        /// <returns>result</returns>
        public async Task <BaseResult <MergeBarcodeOutput> > ApiGetMergeBarCode(MergeBarcodeInput model, string apiUrl)
        {
            BaseResult <MergeBarcodeOutput> result = await this.GetApiResultAsync <BaseResult <MergeBarcodeOutput> >(apiUrl, model);

            return(result);
        }