Пример #1
0
        public virtual PostReqCNResponse PostReqControlNumber(string OfficerCode, string PaymentId, string PhoneNumber, decimal ExpectedAmount, List <PaymentDetail> products, string controlNumber = null, bool acknowledge = false, bool error = false)
        {
            bool   result     = SaveControlNumberRequest(PaymentId, error);
            string ctrlNumber = null;

            PostReqCNResponse response = new PostReqCNResponse()
            {
                ControlNumber = ctrlNumber,
                Posted        = true,
                ErrorCode     = 0,
                Assigned      = error
            };

            return(response);
        }
Пример #2
0
        public virtual async Task <PostReqCNResponse> PostReqControlNumberAsync(string OfficerCode, int PaymentId, string PhoneNumber, decimal ExpectedAmount, List <PaymentDetail> products, string controlNumber = null, bool acknowledge = false, bool error = false, string rejectedReason = "")
        {
            bool result = await SaveControlNumberRequest(PaymentId, error);

            string ctrlNumber = null;

#if !CHF
            // BEGIN Temporary Control Number Generator(Simulation For Testing Only)
            var randomNumber = new Random().Next(100000, 999999);
            ctrlNumber = randomNumber.ToString();
            //END Temporary
#endif
            PostReqCNResponse response = new PostReqCNResponse()
            {
                ControlNumber = ctrlNumber,
                Posted        = error == false ? true : false,
                ErrorCode     = 0,
                ErrorOccured  = error,
                Assigned      = error,
                ErrorMessage  = rejectedReason
            };

            return(response);
        }
Пример #3
0
        public virtual PostReqCNResponse PostReqControlNumber(string OfficerCode, string PaymentId, string PhoneNumber, decimal ExpectedAmount, List <PaymentDetail> products, string controlNumber = null, bool acknowledge = false, bool error = false)
        {
            bool   result     = SaveControlNumberRequest(PaymentId, error);
            string ctrlNumber = null;

            //BEGIN Temporary Control Number Generator(Simulation For Testing Only)
            // var randomNumber = new Random().Next(100000, 999999);

            //if(randomNumber%2 == 0)
            //{
            //   ctrlNumber = randomNumber.ToString();
            //}
            //END Temporary

            PostReqCNResponse response = new PostReqCNResponse()
            {
                ControlNumber = ctrlNumber,
                Posted        = true,
                ErrorCode     = 0,
                Assigned      = error
            };

            return(response);
        }