コード例 #1
0
        private SZPointAllianceResponseMessage Refund(SZPointAllianceRequestMessage req)
        {
            SZPointAllianceConsumer consumer = new SZPointAllianceConsumer();

            consumer.HandleEvent(req);
            return(consumer.SZResponse);
        }
コード例 #2
0
        public int RefundPrepayCard(decimal refundAmount, int soSysNo, string tNumber, string refundKey)
        {
            SZPointAllianceRequestMessage request = new SZPointAllianceRequestMessage()
            {
                RefundAmount      = refundAmount,
                RefundDescription = string.Empty,
                RefundKey         = refundKey,
                RefundType        = PointAllianceRefundType.PrepaidCard,
                SOSysNo           = soSysNo,
                TNumber           = tNumber
            };
            int result = -1;

            try
            {
                SZPointAllianceResponseMessage response = Refund(request);
                result = response.Result;
                if (result == 2)
                {
                    throw new BizException(response.Message);
                }
            }
            catch (Exception e)
            {
                throw new BizException(e.Message);
            }
            return(result);
        }
コード例 #3
0
        internal static int RefundPrepayCard(decimal refundAmount, int soSysNo, string tNumber, string refundKey)
        {
            //TODO:调用神州退预付卡接口
            var msg = new SZPointAllianceRequestMessage()
            {
                RefundAmount      = refundAmount,
                RefundDescription = string.Empty,
                RefundKey         = refundKey,
                RefundType        = PointAllianceRefundType.PrepaidCard,
                SOSysNo           = soSysNo,
                TNumber           = tNumber
            };

            EventPublisher.Publish <SZPointAllianceRequestMessage>(msg);
            return(0);
        }