Message used to indicate that a payment should be voided.
Inheritance: Message
        public override void doVoidPayment(Payment payment, VoidReason reason)
        {
            lock (ackLock)
            {
                VoidPaymentMessage vpm = new VoidPaymentMessage();
                vpm.payment    = payment;
                vpm.voidReason = reason;
                string msgId = sendObjectMessage(vpm);

                BackgroundWorker bw = new BackgroundWorker();
                bw.DoWork += new DoWorkEventHandler(delegate(object o, DoWorkEventArgs args)
                {
                    notifyObserversPaymentVoided(payment, reason);
                });

                if (!SupportsAcks)
                {
                    bw.RunWorkerAsync();
                }
                else
                {
                    msgIdToTask.Add(msgId, bw);
                }
            }
        }
Exemplo n.º 2
0
        public override void doVoidPayment(Payment payment, VoidReason reason)
        {
            VoidPaymentMessage vpm = new VoidPaymentMessage
            {
                payment    = payment,
                voidReason = reason
            };

            sendObjectMessage(vpm);
        }
        public override void doVoidPayment(Payment payment, VoidReason reason, Dictionary <string, string> extras)
        {
            VoidPaymentMessage vpm = new VoidPaymentMessage
            {
                payment           = payment,
                voidReason        = reason,
                passThroughValues = extras
            };

            sendObjectMessage(vpm);
        }
        public override void doVoidPayment(Payment payment, VoidReason reason)
        {
            VoidPaymentMessage vpm = new VoidPaymentMessage();
            vpm.payment = payment;
            vpm.voidReason = reason;
            sendObjectMessage(vpm);

            BackgroundWorker bw = new BackgroundWorker();
            // what to do in the background thread
            bw.DoWork += new DoWorkEventHandler(
            delegate (object o, DoWorkEventArgs args)
            {
                notifyObserversPaymentVoided(payment, reason);
            });
            bw.RunWorkerAsync();
        }