!Important Bugfix!
This commit is contained in:
@@ -23,21 +23,21 @@ def apiBuyTicket(userId:int, ticketType:int, price:int, playerRating:int, playCo
|
||||
# 构造请求数据 Payload
|
||||
data = json.dumps({
|
||||
"userId": userId,
|
||||
"userChargelog": {
|
||||
"chargeId": ticketType,
|
||||
"price": price,
|
||||
"purchaseDate": (datetime.now(pytz.timezone('Asia/Shanghai')) - timedelta(hours=1)).strftime("%Y-%m-%d %H:%M:%S.0"),
|
||||
"playCount": playCount,
|
||||
"playerRating": playerRating,
|
||||
"placeId": placeId,
|
||||
"regionId": regionId,
|
||||
"clientId": clientId
|
||||
},
|
||||
"userCharge": {
|
||||
"chargeId": ticketType,
|
||||
"stock": 1,
|
||||
"purchaseDate": (datetime.now(pytz.timezone('Asia/Shanghai')) - timedelta(hours=1)).strftime("%Y-%m-%d %H:%M:%S.0"),
|
||||
"validDate": (datetime.now(pytz.timezone('Asia/Shanghai')) - timedelta(hours=1) + timedelta(days=90)).replace(hour=4, minute=0, second=0).strftime("%Y-%m-%d %H:%M:%S")
|
||||
},
|
||||
"userChargelog": {
|
||||
"chargeId": ticketType,
|
||||
"price": price,
|
||||
"purchaseDate": (datetime.now(pytz.timezone('Asia/Shanghai')) - timedelta(hours=1)).strftime("%Y-%m-%d %H:%M:%S.0"),
|
||||
"playcount": playCount,
|
||||
"playerRating": playerRating,
|
||||
"placeId": placeId,
|
||||
"regionId": regionId,
|
||||
"clientId": clientId
|
||||
}
|
||||
})
|
||||
# 发送请求,返回最终得到的 Json String 回执
|
||||
|
||||
Reference in New Issue
Block a user