def sendCheckOrderInfo(self): """ 检查支付订单,需要提交REPEAT_SUBMIT_TOKEN passengerTicketStr : 座位编号,0,票类型,乘客名,证件类型,证件号,手机号码,保存常用联系人(Y或N) oldPassengersStr: 乘客名,证件类型,证件号,乘客类型 :return: """ CheckOrderInfoUrls = self.session.urls["checkOrderInfoUrl"] data = self.data_par() checkOrderInfoRep = self.session.httpClint.send( CheckOrderInfoUrls, data) data = checkOrderInfoRep.get("data", {}) if data and data.get("submitStatus", False): print(u'车票提交通过,正在尝试排队') ifShowPassCodeTime = int( checkOrderInfoRep["data"]["ifShowPassCodeTime"]) / float(1000) if "ifShowPassCode" in checkOrderInfoRep[ "data"] and checkOrderInfoRep["data"][ "ifShowPassCode"] == "Y": is_need_code = True elif "ifShowPassCode" in checkOrderInfoRep[ "data"] and checkOrderInfoRep['data'][ 'submitStatus'] is True: is_need_code = False else: is_need_code = False QueueCount = getQueueCount( self.session, is_need_code, ifShowPassCodeTime, self.set_type, self.station_dates, self.train_no, self.ticket_peoples, self.ticketInfoForPassengerForm, self.token, self.oldPassengerStr, self.passengerTicketStrList, ) QueueCount.sendGetQueueCount() elif "errMsg" in checkOrderInfoRep['data'] and checkOrderInfoRep[ 'data']["errMsg"]: print checkOrderInfoRep['data']["errMsg"] elif 'messages' in checkOrderInfoRep and checkOrderInfoRep['messages']: print(checkOrderInfoRep['messages'][0])
def sendCheckOrderInfo(self): """ 检查支付订单,需要提交REPEAT_SUBMIT_TOKEN passengerTicketStr : 座位编号,0,票类型,乘客名,证件类型,证件号,手机号码,保存常用联系人(Y或N) oldPassengersStr: 乘客名,证件类型,证件号,乘客类型 :return: """ CheckOrderInfoUrls = self.session.urls["checkOrderInfoUrl"] data = self.data_par() checkOrderInfoRep = self.session.httpClint.send(CheckOrderInfoUrls, data) data = checkOrderInfoRep.get("data", {}) if data and data.get("submitStatus", False): print (u'车票提交通过,正在尝试排队') ifShowPassCodeTime = int(checkOrderInfoRep["data"]["ifShowPassCodeTime"]) / float(1000) if "ifShowPassCode" in checkOrderInfoRep["data"] and checkOrderInfoRep["data"]["ifShowPassCode"] == "Y": is_need_code = True elif "ifShowPassCode" in checkOrderInfoRep["data"] and checkOrderInfoRep['data']['submitStatus'] is True: is_need_code = False else: is_need_code = False QueueCount = getQueueCount(self.session, is_need_code, ifShowPassCodeTime, self.set_type, self.station_dates, self.train_no, self.ticket_peoples, self.ticketInfoForPassengerForm, self.token, self.oldPassengerStr, self.passengerTicketStrList, ) QueueCount.sendGetQueueCount() elif "errMsg" in data and data["errMsg"]: print(checkOrderInfoRep['data']["errMsg"]) elif 'messages' in checkOrderInfoRep and checkOrderInfoRep['messages']: print (checkOrderInfoRep['messages'][0])