I was wondering if anyone has ever made a custom validator in an apex trigger that makes an external web service call via SOAP or REST.

A real world scenario, my scenario, for this is you have a credit card field that you want to validate against your payment gateway in real time when saving an object.

I'm about to attempt it, it should be doable; just want to see if anyone else was successful with it.

Since my server interacts with my payment gateway already, I'll just have SF ping my server with the CC info (in batch of course) and I'll just return whether it's valid or not and fire 'addError()' within the trigger