Click or drag to resize

IExternalPaymentProcessorOnPreliminaryPaymentEditing Method

Perform operations when preliminary payment is going to be edited. If method throws exception, payment is removed from order.

Namespace:  Resto.Front.Api.V5
Assembly:  Resto.Front.Api.V5 (in Resto.Front.Api.V5.dll)
Syntax
C#
bool OnPreliminaryPaymentEditing(
	IOrder order,
	IPaymentItem paymentItem,
	IUser cashier,
	IOperationService operationService,
	IReceiptPrinter printer,
	IViewManager viewManager,
	IPaymentDataContext context,
	IProgressBar progressBar
)

Parameters

order
Type: Resto.Front.Api.V5.Data.OrdersIOrder
Order.
paymentItem
Type: Resto.Front.Api.V5.Data.PaymentsIPaymentItem
Payment item.
cashier
Type: Resto.Front.Api.V5.Data.SecurityIUser
User handling payments and receipts.
operationService
Type: Resto.Front.Api.V5IOperationService
Allows to edit entities within this method. Should not be used after method returns.
printer
Type: Resto.Front.Api.V5IReceiptPrinter
IReceiptPrinter object to perform print actions. Should not be used after method returns.
viewManager
Type: Resto.Front.Api.V5.UIIViewManager
IViewManager object to show dialogs. Should not be used after method returns.
context
Type: Resto.Front.Api.V5IPaymentDataContext
IPaymentDataContext object to work with plugin saved data in iiko storage.
progressBar
Type: Resto.Front.Api.V5.UIIProgressBar
Object, that provides communication with progress bar.

Return Value

Type: Boolean
Whether standard numpad is active after method ends. If new sum is set in action and no further edit is considered, return false. Otherwise return true to enable editing sum via numbad.
Exceptions
ExceptionCondition
PaymentActionCancelledExceptionException to notify that payment actions were cancelled with no message shown.
PaymentActionFailedExceptionException to notify that payment actions were not successful.
See Also