The object passed in to OnManualRefundResponse
Inheritance: BaseResponse
 public void OnManualRefundResponse(ManualRefundResponse response)
 {
     uiThread.Send(delegate (object state) {
         MessageBox.Show("Refund of " + (response.credit.amount / 100.0).ToString("c2") + " was applied to card ending with " + response.credit.cardTransaction.last4);
         RefundAmount.Text = "";
     }, null);
 }
Exemplo n.º 2
0
 public virtual void OnManualRefundResponse(ManualRefundResponse response)
 {
 }
Exemplo n.º 3
0
 public void OnManualRefundResponse(ManualRefundResponse response)
 {
     System.Console.WriteLine("Manual Refund Response:" + response.Credit.amount);
     this.manualRefundResponse = response;
     this.hasResponse = true;
 }
 public void OnManualRefundResponse(ManualRefundResponse response)
 {
     Send("/ManualRefundResponse", Serialize(response));
 }
        public void OnManualRefundResponse(ManualRefundResponse response)
        {
            if (response.Success)
            {
                uiThread.Send(delegate (object state) {
                    ListViewItem lvi = new ListViewItem();
                    POSManualRefund manualRefund = new POSManualRefund(response.Credit.id, response.Credit.orderRef.id, response.Credit.amount);
                    lvi.Tag = manualRefund;

                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());

                    lvi.SubItems[0].Text = (response.Credit.amount / 100.0).ToString("C2");
                    lvi.SubItems[1].Text = new DateTime(response.Credit.createdTime).ToLongDateString();
                    lvi.SubItems[2].Text = response.Credit.cardTransaction.last4;

                    string msg = "Refund of " + (response.Credit.amount / 100.0).ToString("C2") + " was applied to card ending with " + response.Credit.cardTransaction.last4;
                    AlertForm.Show(this, "Refund applied", msg);

                    RefundAmount.Text = "";
                    ManualRefundButton.Enabled = false;
                    //ManualRefundReceiptButton.Enabled = false;

                    TransactionsListView.Items.Add(lvi);
                    autoResizeColumns(TransactionsListView);
                }, null);
            }
            else if (response.Result.Equals(ResponseCode.FAIL))
            {
                uiThread.Send(delegate (object state) {
                    AlertForm.Show(this, response.Reason, response.Message);
                    PaymentReset();
                }, null);
            }
            else if (response.Result.Equals(ResponseCode.CANCEL))
            {
                uiThread.Send(delegate (object state) {
                    AlertForm.Show(this, response.Reason, response.Message);
                    PaymentReset();
                }, null);
            }
        }
 public void OnManualRefundResponse(ManualRefundResponse response)
 {
 }
        public void OnManualRefundResponse(ManualRefundResponse response)
        {
            if (TransactionResponse.SUCCESS.Equals(response.Code))
            {
                uiThread.Send(delegate (object state) {
                    ListViewItem lvi = new ListViewItem();
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem());

                    lvi.SubItems[0].Text = (response.Credit.amount / 100.0).ToString("C2");
                    lvi.SubItems[1].Text = new DateTime(response.Credit.createdTime).ToLongDateString();
                    lvi.SubItems[2].Text = response.Credit.cardTransaction.last4;

                    MessageBox.Show("Refund of " + (response.Credit.amount / 100.0).ToString("C2") + " was applied to card ending with " + response.Credit.cardTransaction.last4);
                    RefundAmount.Text = "0";

                    TransactionsListView.Items.Add(lvi);
                }, null);
            }
            else if (TransactionResponse.FAIL.Equals(response.Code))
            {
                uiThread.Send(delegate (object state) {
                    MessageBox.Show("Card authentication failed");
                    PaymentReset();
                }, null);
            }
            else if (TransactionResponse.CANCEL.Equals(response.Code))
            {
                uiThread.Send(delegate (object state) {
                    MessageBox.Show("User canceled transaction.");
                    PaymentReset();
                }, null);
            }
        }
 public void OnManualRefundResponse(ManualRefundResponse response)
 {
     OnManualRefundResponseMessage manualRefundResponse = new OnManualRefundResponseMessage();
     manualRefundResponse.payload = response;
     WebSocket.Send(Serialize(manualRefundResponse));
 }