Hi guys, i'm trying to refactor some of the errorhandeling and
validation code for the handling of IPN and ogone post-sale calls into
out of the controller methods into tg.validators.
During the IPN process paypal posts the transaction details to a
preconfigured URL. Since I can't just assume that the call originates
from PayPal I have to validate the parameters by posting all of them
back to paypal. I'm using the **transaction_details form instead
explict parameter definition since I don't use most of those details in
the controller logic. The following code, however, doesn't work as
expected:
@tg.validate({'transaction_details': ipn_validator})
def ipn(self, **transaction_details):
log.debug("got: %s" % transaction_details")
return
The vallidator doesn't get called when some arbitrary query string is
passed. It only triggers on a "transation_details=...." paramter.
I know that the validate decorator does some getargspec magic to match
the parameter names to the keys in the validators dictonary. The
'to_kw' function however doesn't seem use the varargs or varkw parts of
getargspec().
Any ideas on how to implement this validator with out resorting to some
huge schema?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---