Beispiel #1
0
        /// <summary>
        /// 결제완료이나 통신실패시, BASKET생성 및 완료
        /// </summary>
        /// <param name="respData"></param>
        /// <param name="errorCode"></param>
        /// <param name="errorMessage"></param>
        void OnEndPayment(PV04RespData respData, string errorCode, string errorMessage)
        {
            BasketCashIC basket = null;

            if (m_orgCashIC != null)
            {
                basket             = (BasketCashIC)(BasketCashIC.Parse(typeof(BasketCashIC), m_orgCashIC.ToString()));
                basket.ForceCancFg = respData != null ? string.Empty : "1";
                basket.CancRcvCode = respData != null ? string.Empty : errorCode;
                basket.CancRcvMsg  = respData != null ? string.Empty : errorMessage;
            }
            else
            {
                basket = new BasketCashIC()
                {
                    CancFg        = "0",
                    InputType     = "C",
                    ApprAmtIncVat = m_taxAmt.ToString(),
                    PayAmt        = m_payAmt.ToString(),
                };
            }

            #region 공통속성
            basket.OTApprNo   = txtOrgApprNo.Text;
            basket.OTSaleDate = txtOrgApprDate.Text;
            #endregion

            #region 승인받을때
            if (respData != null)
            {
                basket.CardNm          = respData.CardName;
                basket.CashICAccountNo = respData.PayAcctNo;
                basket.IssueComCd      = respData.IssuerCode;
                basket.IssueComNm      = respData.IssuerName;
                basket.MaeipComCd      = respData.MaeipCode;
                basket.MaeipComNm      = respData.MaeipName;
                basket.VanID           = respData.ApprVanCode;
                basket.ICCardSeqNo     = m_icCardSeqNo;
            }

            #endregion

            basket.ApprNo           = respData != null ? respData.ApprNo : string.Empty;
            basket.RealApprProcDate = respData != null ? respData.ApprDate : DateTime.Today.ToString("yyyyMMdd");
            basket.RealApprProcTime = respData != null ? respData.ApprTime : DateTime.Now.ToString("HHmmss");

            this.ReturnResult.Add("PAY_DATA", basket);
            if (!string.IsNullOrEmpty(errorCode) || !string.IsNullOrEmpty(errorMessage))
            {
                this.ReturnResult.Add("ERROR_CODE", errorCode);
                this.ReturnResult.Add("ERROR_MSG", errorMessage);
            }
            this.DialogResult = DialogResult.OK;
        }
Beispiel #2
0
        /// <summary>
        /// VAN 승인결와 성공
        /// </summary>
        /// <param name="respData"></param>
        public void OnReturnSuccess(PV04RespData respData)
        {
            ShowProgressMessage(false);
            if (PV04RespData.REQ_RAND_NUM.Equals(respData.TrxnType))
            {
                if (this.InvokeRequired)
                {
                    this.BeginInvoke((MethodInvoker) delegate()
                    {
                        RequestICCardReader(respData.NoticeMessage2);
                    });
                }
                else
                {
                    RequestICCardReader(respData.NoticeMessage2);
                }
                return;
            }

            StatusMessage = string.Format("[{0}] {1}", respData.ApprNo, respData.RespMessage1);
            OnEndPayment(respData, null, null);
        }