コード例 #1
0
        static void Main(string[] args)
        {
            cloverConnector = CloverConnectorFactory.createICloverConnector(SampleUtils.GetNetworkConfiguration());
            var ccl = new ExampleCloverConnectionListener(cloverConnector);

            cloverConnector.AddCloverConnectorListener(ccl);
            cloverConnector.InitializeConnection();

            while (!ccl.deviceReady)
            {
                Thread.Sleep(1000);
            }

            var pendingSale = new SaleRequest();

            pendingSale.ExternalId                     = ExternalIDUtil.GenerateRandomString(13);
            pendingSale.Amount                         = 1000;
            pendingSale.AutoAcceptSignature            = true;
            pendingSale.AutoAcceptPaymentConfirmations = true;
            pendingSale.DisableDuplicateChecking       = true;
            cloverConnector.Sale(pendingSale);

            while (!ccl.saleDone)
            {
                Thread.Sleep(1000);
            }
            Console.ReadKey();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            cloverConnector = CloverConnectorFactory.createICloverConnector(SampleUtils.GetNetworkConfiguration());
            var ccl = new ExampleCloverConnectionListener(cloverConnector);

            cloverConnector.AddCloverConnectorListener(ccl);
            cloverConnector.InitializeConnection();

            while (!ccl.deviceConnected)
            {
                Thread.Sleep(1000);
            }

            Console.ReadKey();
        }