item_check_callable examples?

27 views
Skip to first unread message

Jake Lumetta

unread,
Feb 3, 2010, 1:04:53 PM2/3/10
to django-paypal
In /standard/models.py: verify() the comments include the following
statement:

"Provide a callable that takes an instance of this class as a
parameter and returns
a tuple (False, None) if the item is valid. Should return (True,
"reason") if the
item isn't valid. Strange but backward compatible :) This function
should check
that `mc_gross`, `mc_currency` `item_name` and `item_number` are all
correct."

I wanted to know if someone could elaborate on this and perhaps
provide an example of it's intended usage.


One thing that confuses me is in pdt/views.py, the pdt() view is
declared by:
def pdt(request, item_check_callable=None, template="pdt/pdt.html",
context=None):

How exactly would item_check_callable contain a value given that /pdt/
urls.py only has this entry:
url(r'^$', 'pdt', name="paypal-pdt"),

Thanks!

Reply all
Reply to author
Forward
0 new messages