Advertisement
Guest User

Untitled

a guest
Nov 15th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. def on_paid(sender, **kwargs):
  3.     print "CHEGOU NO METODO ON_PAID"
  4.     transaction = kwargs.pop('transaction')
  5.     ref = transaction['reference']
  6.     status = transaction['status']
  7.  
  8.     print "IMPRIMINDO A REFERENCIA QUE CHEGOU EM ref = transaction['reference'] ", ref
  9.  
  10.     p = Pedido()
  11.     p = Pedido.objects.get(reference=ref)
  12.     p.statuspagamento = status
  13.     print "AQUI E O STATUS"
  14.     print p.statuspagamento
  15.     p.save()
  16.  
  17.  
  18. transaction_paid.connect(on_paid)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement