I want to write a custom module that integrates my Drupal site with Fastspring's e-commerce system (fastspring.com). My question arises out of this aspect of the integration: When a customer inputs their payment details on the fastspring site, they are presented a text box that I have defined in the fastspring back-end admin system. Fastspring provides the ability to validate the data that they enter into the text box by sending that data via GET to a URL of my choosing. If the data does not validate, that URL is supposed to send back a 403 error. I would like to validate the data against the Drupal database (specifically, I would like to see if the data they have entered is unique across all entries in a particular field). For this reason I am thinking that a custom module is a good idea.
Via my custom module, I would like to create a path on my Drupal site that I can enter as the validation URL on the Fastspring back-end admin site. I could always make a module that checks the URL request on my Drupal site for GET variables (e.g., the module monitors the URL requested on my Drupal site for ?validation=yes or something like that), but I don't want this module running for every single node as I fear performance issues. I would like to be able to use a specific URL such as mydrupalsite.com/?q=validate, and have my module kick in its own code only when that URL is visited. I'd rather not create a node to do this as I just want to return a 403 error on validation errors, and it seems bad practice to override a node in this way. I feel like there is probably a really simple solution to this that I am missing.
Thanks so much in advance for anyone who can make helpful suggestions about how to accomplish this task.