Object passed in to OnRefundPaymentResponse
Inheritance: BaseResponse
コード例 #1
0
 public virtual void OnRefundPaymentResponse(RefundPaymentResponse response)
 {
 }
コード例 #2
0
ファイル: MainTest.cs プロジェクト: clover/remote-pay-windows
 public void OnRefundPaymentResponse(RefundPaymentResponse response)
 {
     System.Console.WriteLine("Refund Payment Response:" + response.Refund.amount);
     this.refundPaymentResponse = response;
     this.hasResponse = true;
 }
コード例 #3
0
 public void OnRefundPaymentResponse(RefundPaymentResponse response)
 {
     Send("/RefundPaymentResponse", Serialize(response));
 }
コード例 #4
0
        public void OnRefundPaymentResponse(RefundPaymentResponse response)
        {
            if (response.Success)
            {
                string paymentID = response.PaymentId;
                string employeeID = null;
                if (paymentID != null)
                {
                    uiThread.Send(delegate (object state) {

                        object orderObj = null;

                        TempObjectMap.TryGetValue(paymentID, out orderObj);
                        if (orderObj != null)
                        {
                            TempObjectMap.Remove(paymentID);
                            if (response.Refund.employee != null)
                            {
                                employeeID = response.Refund.employee.id;
                            }

                            POSRefund refund = new POSRefund(response.Refund.id, response.PaymentId, response.OrderId, employeeID, response.Refund.amount);

                            ((POSOrder)orderObj).Status = POSOrder.OrderStatus.OPEN; //re-open order for editing/payment
                            ((POSOrder)orderObj).AddRefund(refund);
                        }
                        else
                        {
                            AlertForm.Show(this, "Error", "Couldn't find order for refunded payment");
                        }

                    }, null);
                }
                else
                {
                    AlertForm.Show(this, "Error", "Couldn't find paymentID");
                }
            }
            else if (response.Result.Equals(ResponseCode.FAIL))
            {
                uiThread.Send(delegate (object state) {
                    AlertForm.Show(this, "Error", response.Message);
                    PaymentReset();
                }, null);
            }
        }
コード例 #5
0
 public void OnRefundPaymentResponse(RefundPaymentResponse response)
 {
 }
コード例 #6
0
        public void OnRefundPaymentResponse(RefundPaymentResponse response)
        {
            if (TxState.SUCCESS.Equals(response.Code))
            {
                uiThread.Send(delegate (object state) {
                    object orderObj;
                    TempObjectMap.TryGetValue(response.OrderId, out orderObj);
                    TempObjectMap.Remove(response.OrderId);
                    POSRefund refund = new POSRefund(response.PaymentId, response.OrderId, null, response.RefundObj.amount);

                    ((POSOrder)orderObj).AddRefund(refund);

                    ListViewItem lvi = new ListViewItem();
                    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 = "REFUND";
                    lvi.SubItems[3].Text = (response.RefundObj.amount / 100.0).ToString("C2");

                    OrderPaymentsView.Items.Add(lvi);
                }, null);
            }
            else if (TxState.FAIL.Equals(response.Code))
            {
                uiThread.Send(delegate (object state) {
                    MessageBox.Show("Card authentication failed");
                    PaymentReset();
                }, null);
            }
        }
コード例 #7
0
 public void OnRefundPaymentResponse(RefundPaymentResponse response)
 {
     OnRefundPaymentResponseMessage refundPaymentResponse = new OnRefundPaymentResponseMessage();
     refundPaymentResponse.payload = response;
     WebSocket.Send(Serialize(refundPaymentResponse));
 }