(request)
return HttpResponseRedirect (reverse ('payment_error'))
Handler for synchronous updating billing information.
Handler for synchronous updating billing information.
Handler for synchronous updating billing information .
def return_url_handler (request):
  """
  Handler for synchronous updating billing information.
  """
  logger1.info('>> return url handler start')
  if notify_verify (request.GET):
    tn = request.GET.get('out_trade_no')
    trade_no = request.GET.get('trade_no')
    logger1.info('Change the status of bill %s'%tn)
    bill = Bill.objects.get (pk=tn)
    trade_status = request.GET.get('trade_status')
    logger1.info('the status changed to %s'%trade_status)
    bill.trade_status = trade_status
    upgrade_bill (bill, 30*6+7)
    url=send_goods_confirm_by_platform (trade_no)
    req=urllib.urlopen (url)
    logger1.info('send goods confirmation. %s'%url)
    return HttpResponseRedirect (reverse ('payment_success'))
  return HttpResponseRedirect (reverse ('payment_error'))
def return_url_handler ( request ) : logger1 . info ( '>> return url handler start' ) if notify_verify ( request . GET ) : tn = request . GET . get ( 'out_trade_no' ) trade_no = request . GET . get ( 'trade_no' ) logger1 . info ( 'Change the status of bill %s' % tn ) bill = Bill . objects . get ( pk = tn ) trade_status = request . GET . get ( 'trade_status' ) logger1 . info ( 'the status changed to %s' % trade_status ) bill . trade_status = trade_status upgrade_bill ( bill , 30 * 6 + 7 ) url = send_goods_confirm_by_platform ( trade_no ) req = urllib . urlopen ( url ) logger1 . info ( 'send goods confirmation. %s' % url ) return HttpResponseRedirect ( reverse ( 'payment_success' ) ) return HttpResponseRedirect ( reverse ( 'payment_error' ) )