Validation Callback Class
Validation Callback applies validation on the following aspects in the configuration:
- Entire cart
- Line items in the cart
- Price Ramps
To use the Validation Callback you must create a custom C# that implements the IValidationCallback interface and register the custom C# with Validation Callback Class. You must write your custom logic in the custom C# language.
The following methods are available in the IValidationCallback interface:
Method | Signature | Description |
---|---|---|
BeforePricingValidationAsync | BeforePricingValidationAsync(IActionRequest request) | This extension point is utilized for creating pre-price validation callbacks. |
FinalizeValidationAsync | FinalizeValidationAsync(IActionRequest request) | This hook point is used to write validation callback code for finalize event. |
OnCartValidationAsync | OnCartValidationAsync(IActionRequest actionRequest) | This is generic method for validation callback. |
The following is an example of the custom logic you can implement using Validation example.
Example