Ejemplo n.º 1
0
 public override Task OnPrintRefundPaymentReceipt(Empty request, IServerStreamWriter <PrintRefundPaymentReceiptMessage> responseStream, ServerCallContext context)
 {
     PrintRefundPaymentReceiptHandler = new StreamHandler <sdk.PrintRefundPaymentReceiptMessage, PrintRefundPaymentReceiptMessage>(responseStream, o => Translate.From(o));
     return(PrintRefundPaymentReceiptHandler.Promise.Task);
 }
Ejemplo n.º 2
0
 public override Task OnVerifySignatureRequest(Empty request, IServerStreamWriter <VerifySignatureRequest> responseStream, ServerCallContext context)
 {
     VerifySignatureRequestHandler = new StreamHandler <sdk.VerifySignatureRequest, VerifySignatureRequest>(responseStream, o => Translate.From(o));
     return(VerifySignatureRequestHandler.Promise.Task);
 }
Ejemplo n.º 3
0
 public override Task OnMessageFromActivity(Empty request, IServerStreamWriter <MessageFromActivity> responseStream, ServerCallContext context)
 {
     MessageFromActivityHandler = new StreamHandler <sdk.MessageFromActivity, MessageFromActivity>(responseStream, o => Translate.From(o));
     return(MessageFromActivityHandler.Promise.Task);
 }
Ejemplo n.º 4
0
 public override Task OnPrintJobStatusResponse(Empty request, IServerStreamWriter <PrintJobStatusResponse> responseStream, ServerCallContext context)
 {
     PrintJobStatusResponseHandler = new StreamHandler <sdk.PrintJobStatusResponse, PrintJobStatusResponse>(responseStream, o => Translate.From(o));
     return(PrintJobStatusResponseHandler.Promise.Task);
 }
Ejemplo n.º 5
0
 public override Task OnCapturePreAuthResponse(Empty request, IServerStreamWriter <CapturePreAuthResponse> responseStream, ServerCallContext context)
 {
     CapturePreAuthResponseHandler = new StreamHandler <sdk.CapturePreAuthResponse, CapturePreAuthResponse>(responseStream, o => Translate.From(o));
     return(CapturePreAuthResponseHandler.Promise.Task);
 }
Ejemplo n.º 6
0
 public override Task OnManualRefundResponse(Empty request, IServerStreamWriter <ManualRefundResponse> responseStream, ServerCallContext context)
 {
     ManualRefundResponseHandler = new StreamHandler <sdk.ManualRefundResponse, ManualRefundResponse>(responseStream, o => Translate.From(o));
     return(ManualRefundResponseHandler.Promise.Task);
 }
Ejemplo n.º 7
0
 public override Task OnDeviceReady(Empty request, IServerStreamWriter <MerchantInfo> responseStream, ServerCallContext context)
 {
     DeviceReadyHandler = new StreamHandler <sdk.MerchantInfo, MerchantInfo>(responseStream, o => Translate.From(o));
     return(DeviceReadyHandler.Promise.Task);
 }
Ejemplo n.º 8
0
 public override Task OnTipAdjustAuthResponse(Empty request, IServerStreamWriter <TipAdjustAuthResponse> responseStream, ServerCallContext context)
 {
     TipAdjustAuthResponseHandler = new StreamHandler <sdk.TipAdjustAuthResponse, TipAdjustAuthResponse>(responseStream, o => Translate.From(o));
     return(TipAdjustAuthResponseHandler.Promise.Task);
 }
Ejemplo n.º 9
0
 public override Task OnDeviceDisconnected(Empty request, IServerStreamWriter <Empty> responseStream, ServerCallContext context)
 {
     DeviceDisconnectedHandler = new StreamHandler <EventArgs, Empty>(responseStream, o => new Empty());
     return(DeviceDisconnectedHandler.Promise.Task);
 }
Ejemplo n.º 10
0
 public override Task OnDeviceError(Empty request, IServerStreamWriter <DeviceErrorEvent> responseStream, ServerCallContext context)
 {
     DeviceErrorHandler = new StreamHandler <sdk.CloverDeviceErrorEvent, DeviceErrorEvent>(responseStream, o => Translate.From(o));
     return(DeviceErrorHandler.Promise.Task);
 }
Ejemplo n.º 11
0
 public override Task OnCustomerProvidedData(Empty request, IServerStreamWriter <CustomerProvidedDataEvent> responseStream, ServerCallContext context)
 {
     CustomerProvidedDataHandler = new StreamHandler <sdk.CustomerProvidedDataEvent, CustomerProvidedDataEvent>(responseStream, o => Translate.From(o));
     return(CustomerProvidedDataHandler.Promise.Task);
 }
Ejemplo n.º 12
0
 public override Task OnCustomActivityResponse(Empty request, IServerStreamWriter <CustomActivityResponse> responseStream, ServerCallContext context)
 {
     CustomActivityResponseHandler = new StreamHandler <sdk.CustomActivityResponse, CustomActivityResponse>(responseStream, o => Translate.From(o));
     return(CustomActivityResponseHandler.Promise.Task);
 }
Ejemplo n.º 13
0
 public override Task OnConfirmPaymentRequest(Empty request, IServerStreamWriter <ConfirmPaymentRequest> responseStream, ServerCallContext context)
 {
     ConfirmPaymentRequestHandler = new StreamHandler <sdk.ConfirmPaymentRequest, ConfirmPaymentRequest>(responseStream, o => Translate.From(o));
     return(ConfirmPaymentRequestHandler.Promise.Task);
 }
Ejemplo n.º 14
0
 public override Task OnResetDeviceResponse(Empty request, IServerStreamWriter <ResetDeviceResponse> responseStream, ServerCallContext context)
 {
     ResetDeviceResponseHandler = new StreamHandler <sdk.ResetDeviceResponse, ResetDeviceResponse>(responseStream, o => Translate.From(o));
     return(ResetDeviceResponseHandler.Promise.Task);
 }
Ejemplo n.º 15
0
 public override Task OnDisplayReceiptOptionsResponse(Empty request, IServerStreamWriter <DisplayReceiptOptionsResponse> responseStream, ServerCallContext context)
 {
     DisplayReceiptOptionsResponseHandler = new StreamHandler <sdk.DisplayReceiptOptionsResponse, DisplayReceiptOptionsResponse>(responseStream, o => Translate.From(o));
     return(DisplayReceiptOptionsResponseHandler.Promise.Task);
 }
Ejemplo n.º 16
0
 public override Task OnTipAdded(Empty request, IServerStreamWriter <TipAddedMessage> responseStream, ServerCallContext context)
 {
     TipAddedHandler = new StreamHandler <transport.TipAddedMessage, TipAddedMessage>(responseStream, o => Translate.From(o));
     return(TipAddedHandler.Promise.Task);
 }
Ejemplo n.º 17
0
 public override Task OnInvalidStateTransitionResponse(Empty request, IServerStreamWriter <InvalidStateTransitionNotification> responseStream, ServerCallContext context)
 {
     InvalidStateTransitionResponseHandler = new StreamHandler <sdk.InvalidStateTransitionNotification, InvalidStateTransitionNotification>(responseStream, o => Translate.From(o));
     return(InvalidStateTransitionResponseHandler.Promise.Task);
 }
Ejemplo n.º 18
0
 public override Task OnVoidPaymentResponse(Empty request, IServerStreamWriter <VoidPaymentResponse> responseStream, ServerCallContext context)
 {
     VoidPaymentResponseHandler = new StreamHandler <sdk.VoidPaymentResponse, VoidPaymentResponse>(responseStream, o => Translate.From(o));
     return(VoidPaymentResponseHandler.Promise.Task);
 }
Ejemplo n.º 19
0
        public override Task <DisposeResponse> Dispose(DisposeRequest request, ServerCallContext context)
        {
            Program.WriteLine("Dispose");

            AuthResponseHandler?.Promise.TrySetResult(0);
            AuthResponseHandler = null;
            CapturePreAuthResponseHandler?.Promise.TrySetResult(0);
            CapturePreAuthResponseHandler = null;
            CloseoutResponseHandler?.Promise.TrySetResult(0);
            CloseoutResponseHandler = null;
            ConfirmPaymentRequestHandler?.Promise.TrySetResult(0);
            ConfirmPaymentRequestHandler = null;
            CustomActivityResponseHandler?.Promise.TrySetResult(0);
            CustomActivityResponseHandler = null;
            CustomerProvidedDataHandler?.Promise.TrySetResult(0);
            CustomerProvidedDataHandler = null;
            DeviceActivityEndHandler?.Promise.TrySetResult(0);
            DeviceActivityEndHandler = null;
            DeviceActivityStartHandler?.Promise.TrySetResult(0);
            DeviceActivityStartHandler = null;
            DeviceConnectedHandler?.Promise.TrySetResult(0);
            DeviceConnectedHandler = null;
            DeviceDisconnectedHandler?.Promise.TrySetResult(0);
            DeviceDisconnectedHandler = null;
            DeviceErrorHandler?.Promise.TrySetResult(0);
            DeviceErrorHandler = null;
            DeviceReadyHandler?.Promise.TrySetResult(0);
            DeviceReadyHandler = null;
            DisplayReceiptOptionsResponseHandler?.Promise.TrySetResult(0);
            DisplayReceiptOptionsResponseHandler = null;
            InvalidStateTransitionResponseHandler?.Promise.TrySetResult(0);
            InvalidStateTransitionResponseHandler = null;
            ManualRefundResponseHandler?.Promise.TrySetResult(0);
            ManualRefundResponseHandler = null;
            MessageFromActivityHandler?.Promise.TrySetResult(0);
            MessageFromActivityHandler = null;
            PreAuthResponseHandler?.Promise.TrySetResult(0);
            PreAuthResponseHandler = null;
            PrintJobStatusResponseHandler?.Promise.TrySetResult(0);
            PrintJobStatusResponseHandler = null;
            PrintManualRefundDeclineReceiptHandler?.Promise.TrySetResult(0);
            PrintManualRefundDeclineReceiptHandler = null;
            PrintManualRefundReceiptHandler?.Promise.TrySetResult(0);
            PrintManualRefundReceiptHandler = null;
            PrintPaymentDeclineReceiptHandler?.Promise.TrySetResult(0);
            PrintPaymentDeclineReceiptHandler = null;
            PrintPaymentMerchantCopyReceiptHandler?.Promise.TrySetResult(0);
            PrintPaymentMerchantCopyReceiptHandler = null;
            PrintPaymentReceiptHandler?.Promise.TrySetResult(0);
            PrintPaymentReceiptHandler = null;
            PrintRefundPaymentReceiptHandler?.Promise.TrySetResult(0);
            PrintRefundPaymentReceiptHandler = null;
            ReadCardDataResponseHandler?.Promise.TrySetResult(0);
            ReadCardDataResponseHandler = null;
            RefundPaymentResponseHandler?.Promise.TrySetResult(0);
            RefundPaymentResponseHandler = null;
            ResetDeviceResponseHandler?.Promise.TrySetResult(0);
            ResetDeviceResponseHandler = null;
            RetrieveDeviceStatusResponseHandler?.Promise.TrySetResult(0);
            RetrieveDeviceStatusResponseHandler = null;
            RetrievePaymentResponseHandler?.Promise.TrySetResult(0);
            RetrievePaymentResponseHandler = null;
            RetrievePendingPaymentsResponseHandler?.Promise.TrySetResult(0);
            RetrievePendingPaymentsResponseHandler = null;
            RetrievePrintersResponseHandler?.Promise.TrySetResult(0);
            RetrievePrintersResponseHandler = null;
            SaleResponseHandler?.Promise.TrySetResult(0);
            SaleResponseHandler = null;
            TipAddedHandler?.Promise.TrySetResult(0);
            TipAddedHandler = null;
            TipAdjustAuthResponseHandler?.Promise.TrySetResult(0);
            TipAdjustAuthResponseHandler = null;
            VaultCardResponseHandler?.Promise.TrySetResult(0);
            VaultCardResponseHandler = null;
            VerifySignatureRequestHandler?.Promise.TrySetResult(0);
            VerifySignatureRequestHandler = null;
            VoidPaymentRefundResponseHandler?.Promise.TrySetResult(0);
            VoidPaymentRefundResponseHandler = null;
            VoidPaymentResponseHandler?.Promise.TrySetResult(0);
            VoidPaymentResponseHandler = null;

            //connector.RemoveCloverConnectorListener(listener);
            //connector.Dispose();

            //connector = null;
            //listener = null;

            return(Task.FromResult(new DisposeResponse()));
        }