コード例 #1
0
        public Dictionary <string, object> RollBack(Dictionary <string, object> Input)
        {
            Dictionary <string, object> Output = new Dictionary <string, object>();
            string vchr = (string)Input["Voucher"];
            var    msg  = VoucherClient.UnRedeeemVoucher(vchr);

            Output.Add("VoucherMessage", msg);
            return(Output);
        }
コード例 #2
0
        public void RollBack()
        {
            if (!Input.ContainsKey("Voucher"))
            {
                throw new ArgumentException("Voucher not passed");
            }
            string vchr = (string)Input["Voucher"];
            var    msg  = VoucherClient.UnRedeeemVoucher(vchr);

            Output.Add("VoucherMessage", msg);
        }
コード例 #3
0
        public void Execute()
        {
            if (!Input.ContainsKey("Voucher"))
            {
                throw new ArgumentException("Voucher not passed");
            }
            if (!Input.ContainsKey("OrderNumber"))
            {
                throw new ArgumentException("OrderNumber not passed");
            }
            if (!Input.ContainsKey("CustomerKey"))
            {
                throw new ArgumentException("CustomerKey not passed");
            }
            string vchr        = (string)Input["Voucher"];
            string customerkey = (string)Input["CustomerKey"];
            var    msg         = VoucherClient.RedeeemVoucher(vchr);

            Output.Add("VoucherMessage", msg);
            _logger.LogInformation(msg);
        }
コード例 #4
0
        public Dictionary <string, object> Execute(Dictionary <string, object> Input)
        {
            Dictionary <string, object> Output = new Dictionary <string, object>();

            if (!Input.ContainsKey("Voucher"))
            {
                throw new ArgumentException("Voucher not passed");
            }
            if (!Input.ContainsKey("OrderNumber"))
            {
                throw new ArgumentException("OrderNumber not passed");
            }
            if (!Input.ContainsKey("CustomerKey"))
            {
                throw new ArgumentException("CustomerKey not passed");
            }
            string vchr        = (string)Input["Voucher"];
            string customerkey = (string)Input["CustomerKey"];
            var    msg         = VoucherClient.RedeeemVoucher(vchr);

            Output.Add("VoucherMessage", msg);
            _logger.LogInformation(msg);
            return(Output);
        }