This request should be used to make a request to adjust the tip amount on a payment obtained from an Auth request or payment after a CapturePreAuth request
Inheritance: BaseRequest
コード例 #1
0
 public void TipAdjustAuth(TipAdjustAuthRequest request)
 {
     Send("/TipAdjustAuth", request);
 }
コード例 #2
0
        private void TipAdjustButton_Click(object sender, EventArgs e)
        {
            InputForm inputForm = new InputForm(this);
            inputForm.Label = "Enter Tip Amount";
            inputForm.Title = "Adjust Tip Amount";
            inputForm.FormClosed += (object s, FormClosedEventArgs ce) =>
            {
                if (inputForm.Status == DialogResult.OK)
                {
                    string tipValue = inputForm.Value;
                    try
                    {
                        int tipAmount = int.Parse(tipValue);
                        TipAdjustAuthRequest taRequest = new TipAdjustAuthRequest();

                        if (OrderPaymentsView.SelectedItems.Count == 1)
                        {
                            POSPayment posPayment = OrderPaymentsView.SelectedItems[0].Tag as POSPayment;

                            taRequest.OrderID = posPayment.OrderID;
                            taRequest.PaymentID = posPayment.PaymentID;
                            taRequest.TipAmount = tipAmount;

                            cloverConnector.TipAdjustAuth(taRequest);
                        }

                    }
                    catch (Exception)
                    {
                        AlertForm.Show(this, "Invalid Value", "Invalid tip amount: " + tipValue + " Format of 625 expected.");
                    }
                }
            };
            inputForm.Show(this);
        }
コード例 #3
0
 public void TipAdjustAuth(TipAdjustAuthRequest request)
 {
     if (websocket != null)
     {
         TipAdjustAuthRequestMessage message = new TipAdjustAuthRequestMessage();
         message.payload = request;
         websocket.Send(JsonUtils.serialize(message));
     }
 }