public virtual void OnRefundPaymentResponse(RefundPaymentResponse response) { }
public void OnRefundPaymentResponse(RefundPaymentResponse response) { System.Console.WriteLine("Refund Payment Response:" + response.Refund.amount); this.refundPaymentResponse = response; this.hasResponse = true; }
public void OnRefundPaymentResponse(RefundPaymentResponse response) { Send("/RefundPaymentResponse", Serialize(response)); }
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); } }
public void OnRefundPaymentResponse(RefundPaymentResponse response) { }
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); } }
public void OnRefundPaymentResponse(RefundPaymentResponse response) { OnRefundPaymentResponseMessage refundPaymentResponse = new OnRefundPaymentResponseMessage(); refundPaymentResponse.payload = response; WebSocket.Send(Serialize(refundPaymentResponse)); }