[#1039] Error response in external validator

Migrated from Redmine #1039 | Author: Matteo Frigerio
Status: New | Priority: High, I’m very impatient | Created: 2023-04-03


Good morning:
1- I developed an external validator like GitHub - vetalsimplybook/simplybook-external-validator , but using another language instead of php; in validate case it performs properly, while in case of validation error, the simplybook page returns a generic ‘external_booking_validator_status_error’ instead of the error message that I returned from the validator; my question is, which structures must the response json respect, and which fields it has to contain? Can you provide me a json example? Thank you

Vitaliy Kordiak wrote:

Hi Matteo
The link you wrote above ( GitHub - vetalsimplybook/simplybook-external-validator ) describes what your validator should return to correctly display the custom error text. If you see the error external_booking_validator_status_error , it means that you returned an incorrect result.

To test the functionality of the custom feature, try simply creating a test.json file with content:

{
    "errors":["Your error text"]
}

and set a link to this file in the feature settings:
https://im.ge/i/IyFcg6

And you will get your error when you try to make a booking:
https://im.ge/i/IyFb0z

Matteo Frigerio wrote:

Hi, thanks for the quick response; unfortunately, the structor of the json returned by my validator is the very same of the one you asked me to put in a json file and still I obtain the external_booking_validator_status_error on simplybook frontend

Vitaliy Kordiak wrote:

please provide your validator url to check

Matteo Frigerio wrote:

Np, I found a solution, we can close this.