ValidateGuestRequest
Magento\OrderCancellationGraphQl\Model\Validator\ValidateGuestRequest
What it does
This validator ensures that guest users (non-logged-in customers) can securely cancel their orders via GraphQL by verifying they have the correct order token, last name, and email.
Developers use this class to validate guest order cancellation requests before processing them, preventing unauthorized access to orders.
It throws specific GraphQL exceptions when validation fails, such as missing input data, mismatched customer details, or when a logged-in customer attempts to use the guest cancellation endpoint.
Public Methods
- validateInput()
- validateOrderDetails()
- cannotLocateOrder()