This commit is contained in:
aozhiwei 2019-08-22 12:01:49 +08:00
parent 2549d147dd
commit 8f6f2a0156

View File

@ -77,8 +77,9 @@ def sendOneOrder(idx, orderid):
cursor.execute('SELECT sp_pay_result, accountid, itemid, price, orderid, gameid, status '
'FROM orderinfo WHERE orderid="%s";' % conn.escape_string(orderid))
row = cursor.fetchone()
if (not row) or (row[0] != '1'):
if (not row) or (row[0] != 1):
return True
print(row[3])
if row[6] == '0':
timestamp = time.time()
params = {
@ -91,8 +92,8 @@ def sendOneOrder(idx, orderid):
md5signstr = md5Sign(params, secret, timestamp)
url = conf['notify_url'] + '&timestamp=' + str(timestamp) + '&sign=' + md5signstr
req = urllib.request.Request(url)
data = urllib.request.urlopen(req).read()
jsonobj = json.loads(data)
# data = urllib.request.urlopen(req).read()
# jsonobj = json.loads(data)
info('sendNotify end')
return True
except Exception as e: