@require_GET
def pdt(request, item_check_callable=None, template='pdt/pdt.html', context=None):
 context = (context or {})
 pdt_obj = None
 txn_id = request.GET.get('tx')
 failed = False
 if (txn_id is not None):
  try:
   pdt_obj = PayPalPDT.objects.get(txn_id=txn_id)
  except PayPalPDT.DoesNotExist:
   pass
  if (pdt_obj is None):
   form = PayPalPDTForm(request.GET)
   if form.is_valid():
    try:
     pdt_obj = form.save(commit=False)
    except Exception as e:
     error = repr(e)
     failed = True
   else:
    error = form.errors
    failed = True
   if failed:
    pdt_obj = PayPalPDT()
    pdt_obj.set_flag(('Invalid form. %s' % error))
   pdt_obj.initialize(request)
   if (not failed):
    pdt_obj.verify(item_check_callable)
 else:
  pass
 context.update({'failed': failed, 'pdt_obj': pdt_obj})
 return render_to_response(template, context, RequestContext(request))

@ require_GET def pdt ( request , item_check_callable = None , template = 'pdt/pdt.html' , context = None ) : context = ( context or { } ) pdt_obj = None txn_id = request . GET . get ( 'tx' ) failed = False if ( txn_id is not None ) : try : pdt_obj = PayPalPDT . objects . get ( txn_id = txn_id ) except PayPalPDT . DoesNotExist : pass if ( pdt_obj is None ) : form = PayPalPDTForm ( request . GET ) if form . is_valid ( ) : try : pdt_obj = form . save ( commit = False ) except Exception as e : error = repr ( e ) failed = True else : error = form . errors failed = True if failed : pdt_obj = PayPalPDT ( ) pdt_obj . set_flag ( ( 'Invalid form. %s' % error ) ) pdt_obj . initialize ( request ) if ( not failed ) : pdt_obj . verify ( item_check_callable ) else : pass context . update ( { 'failed' : failed , 'pdt_obj' : pdt_obj } ) return render_to_response ( template , context , RequestContext ( request ) )
payment data transfer implementation: URL .