Public transport code scanning ticket checking and settlement method and system
Technical Field
The invention relates to the technical field of code scanning ticket checking, in particular to a public transport code scanning ticket checking settlement method and system.
Background
In recent years, with the development of networks and mobile intelligent terminals, the number of merchants supporting code scanning payment of WeChat, Paibao and the like is rapidly increasing. A large amount of code scanning payment and ticket checking services are also related in the field of public transportation, and the traditional public transportation modes such as buses, subways, taxis, newly developed taxi booking and the like can complete transactions through the code scanning and ticket checking. The consumer sends a ticket buying request to the ticket vending machine through the mobile terminal, and the ticket vending machine sends the ticket buying request containing all ticket buying information to the server. And the server returns a ticket checking code for scanning the code to verify the ticket purchasing information to the mobile terminal after receiving the ticket purchasing request. When the mobile terminal is required to be used, a consumer puts the ticket checking code displayed on the screen of the mobile terminal on a ticket checking machine for checking and settling the ticket.
In order to accelerate business expansion, a large number of payment platforms such as WeChat and the like are connected to an agent, a payment interface of the payment platform is connected to the agent, and then the agent is connected to a ticket vending machine instead of being directly connected to the ticket vending machine through the payment interface. Because the selection and the audit of the payment platform on the agents are not strict, the service level and the safety of some agents are difficult to ensure, and the payment risk of consumers and the money collection risk of merchants on ticket vending machines are increased. In fact, most of the agents do not have the clearing qualification, due to the lack of a supervision mechanism, criminals may utilize the supervision vulnerability, and the transaction information, even the payment account and bank account information of the consumer and the merchant are stolen by tampering the two-dimensional code during payment and even modifying a code scanning machine for ticket checking, so that the information leakage risk is generated.
Disclosure of Invention
The invention aims to avoid the defects in the prior art, provides a public transport code scanning and ticket checking settlement method and a public transport code scanning and ticket checking settlement system, and reduces the payment risk of a consumer and the collection risk of a merchant on a ticket vending machine when a ticket checking code is obtained and ticket checking transaction is carried out at a fixed network.
The method for checking and settling the ticket by scanning the public transport code comprises the following steps:
ticket checking code acquisition: the method comprises the steps that a mobile terminal sends ticket purchasing information to a ticket vending machine, the ticket vending machine is communicated with a server through a pre-applied payment interface, a ticket purchasing request is sent to the server according to the ticket purchasing information, current ticket selling position information is uploaded to the server, the server inquires interface address information of a payment interface of the ticket purchasing request entering the server, whether the interface address information is consistent with the ticket selling position information uploaded by the ticket vending machine or not is judged, if yes, the server generates a ticket checking code stored with an address verification mark according to the received ticket purchasing request and sends the ticket checking code to the mobile terminal, if not, the server returns early warning information to the mobile terminal, and the interface address information of the payment interface entering the server is stored in the early warning information;
checking the ticket and settling accounts: the mobile terminal uses the received ticket checking code for the validation of the ticket checking machine, if the ticket checking machine recognizes that the address validation mark is stored in the ticket checking code, the ticket checking settlement is started, the ticket checking settlement result is returned to the mobile terminal and the server after the ticket checking settlement is completed, if the mobile terminal receives the early warning information, the security of the received interface address information is judged, and if the security is judged, the server is informed to return the ticket checking code to the mobile terminal.
The mobile terminal judges the safety of the interface address information by inquiring whether the payment interface represented by the interface address information is in a safety interface white list of the server or not.
The security interface white list refers to a payment interface directory which is marked as a security interface through the server and allows access.
In the ticket checking code obtaining step, if the mobile terminal receives the early warning information, the current ticket checking code obtaining request is directly terminated.
The ticket checking code returned to the mobile terminal by the server also stores ticket purchasing information, and the ticket purchasing information comprises ticket entrance information identifying the use position of the ticket checking code; in the ticket checking and settlement step, the ticket checking machine identifies the ticket checking code on the mobile terminal, checks whether the ticket entrance information stored in the ticket checking code is consistent with the geographic position of the mobile terminal, and refuses the ticket checking and settlement operation if the checking result is inconsistent.
Wherein, the checking whether the bill entry information stored in the bill checking code is consistent with the geographic position of the mobile terminal refers to: and the mobile terminal acquires the position of the current communication base station, judges whether the ticket checking code using position of the ticket entrance information identifier is in the identification range of the base station, and if the ticket checking code using position of the ticket entrance information identifier is judged to be in the identification range of the base station, the result of the check is inconsistent.
In the ticket checking code obtaining step, if the interface address information is judged to be inconsistent with the ticket selling position information uploaded by the ticket selling machine, the server refuses to return the ticket checking code to the mobile terminal.
The public transport code scanning, ticket checking and clearing method provides a method for distinguishing whether a ticket purchasing request is directly from a ticket selling machine or an agent for a server by verifying whether payment interface information accessed to a payment platform is consistent with ticket selling position information uploaded by the ticket selling machine. Because the current ticket selling position information of the ticket selling machine is consistent with the actual geographical position of the ticket selling machine, the ticket selling machine is directly communicated with the server through the payment interface, and the interface address information of the payment interface is also consistent with the geographical position of the ticket selling machine, the server can obtain a judgment result that the inquired interface address information is consistent with the received ticket selling position information. And for the ticket purchasing request with inconsistent interface address information and ticket selling position information, the server judges that the ticket purchasing request does not come from the ticket vending machine directly, and returns early warning information storing the interface address information of the payment interface entering the server to the mobile terminal. And if the interface address is judged to be unsafe, the operation of checking and settling accounts is refused, so that the condition that the consumer and the ticket vending machine trade through an unsafe agent can be avoided, and the payment risk of the consumer and the collection risk of the merchant on the ticket vending machine are reduced.
The public transport code scanning, ticket checking and settling system comprises a ticket vending machine, a server, a ticket checking machine and a mobile terminal and is used for executing the public transport code scanning, ticket checking and settling method, and the payment risk of consumers and the payment collection risk of merchants on the ticket vending machine during fixed network point transactions are reduced.
Detailed Description
The public transport code scanning, ticket checking and settlement method and system are further described by taking the ticket purchasing network point to acquire the ticket checking code and the station to complete code scanning and ticket checking.
The public transport code scanning, ticket checking and settlement system comprises a ticket vending machine, a server, a ticket checking machine and a mobile terminal which are communicated with each other. The consumer sends a ticket buying request to the ticket vending machine through the mobile terminal, the ticket buying request comprises passenger information, the number of bus taking and the time, the ticket vending machine automatically generates ticket buying information comprising the name, the transaction time, the bus taking place, the destination, the departure time and the passenger information of a merchant owning the ticket vending machine, and a payment process is started. The ticket selling machine sends a ticket purchasing request containing all the ticket purchasing information to the server, and simultaneously uploads the current ticket selling position information of the ticket selling machine to the server. And after receiving the ticket buying request information, the server returns a ticket checking code for code scanning verification of the ticket buying information to the mobile terminal. When the mobile terminal is required to be used, a consumer puts the ticket checking code displayed on the screen of the mobile terminal on a ticket checking machine for checking and settling the ticket.
Under normal conditions, the ticket vending machine is directly connected to a server of the payment platform through a pre-applied payment interface, after the server receives a ticket purchasing request, the server firstly inquires interface address information of the payment interface of the server for the ticket purchasing request through an internal database, simultaneously identifies ticket selling position information uploaded by the ticket vending machine sending the ticket purchasing request, and then analyzes and judges the interface address information and the geographic position contained in the ticket selling position information. Because the current ticket selling position information of the ticket selling machine is consistent with the actual geographical position of the ticket selling machine, the ticket selling machine is directly communicated with the server through the payment interface, and the interface address information of the payment interface is also consistent with the geographical position of the ticket selling machine, the server can obtain a judgment result that the inquired interface address information is consistent with the received ticket selling position information, and at the moment, the server generates a ticket checking code stored with the address verification mark according to the received ticket purchasing request. The ticket checking code returned to the mobile terminal by the server also stores ticket purchasing information, and the ticket purchasing information comprises ticket entrance information identifying the use position of the ticket checking code. The ticket checking machine scans the ticket checking code on the mobile terminal to check and settle accounts, identifies the address verification mark in the ticket checking machine and reads the stored ticket entrance information, meanwhile, the mobile terminal obtains the position of the current communication base station and sends the position to the ticket checking machine, and the ticket checking machine judges and analyzes to obtain the conclusion that the using position of the ticket checking code identified by the read ticket entrance information is in the identification range of the base station, so that the ticket entrance information is consistent with the geographic position of the mobile terminal. And the ticket checking machine identifies the address verification mark in the ticket checking code, verifies that the interface address information stored in the ticket checking code is consistent with the geographic position of the mobile terminal, and then performs the subsequent operation of ticket checking and settlement.
If the ticket vending machine is not directly connected to the payment platform through the payment interface, but is connected to the agent firstly, and then is connected to the payment platform through the payment interface of the agent, the ticket purchasing request sent by the ticket vending machine to the server is received by the agent firstly. The agent can directly return a ticket checking code to the ticket selling machine or transmit the ticket purchasing request to the server of the payment platform and transmit the ticket checking code generated by the server to the ticket selling machine. If the agent directly returns the ticket checking code to the ticket vending machine, the address verification mark of the ticket checking code stored in the server is not stored in the ticket checking code, and the mobile terminal stops the ticket checking settlement when receiving the ticket checking code without the address verification mark. If the agent transfers the ticket buying request to the server of the payment platform, the interface address information of the payment interface applied by the agent to the payment platform is usually not consistent with the ticket selling position information uploaded by the ticket selling machine, so that the server can distinguish whether the ticket buying request directly comes from the ticket selling machine or is transferred by the agent. For the ticket buying request transferred by the agent, the server can directly refuse to return the ticket checking code to the mobile terminal, and then the ticket checking settlement is directly terminated, so that the payment risk of a consumer and the money collection risk of a merchant on a ticket vending machine are avoided; the server can also return the early warning information to the mobile terminal and give the payment option to the mobile terminal. After the mobile terminal identifies the early warning information, the mobile terminal can choose to directly stop obtaining the ticket checking code to finish the ticket checking settlement, so that the payment risk is avoided; the early warning information returned to the mobile terminal by the server stores interface address information of a payment interface entering the server, so that the mobile terminal can also inquire in a payment interface directory (a safety interface white list of the server) which is marked as a safety interface and allows access through the server, judge the safety of the interface address information stored in the payment code, and allow the server to return a ticket checking code to the mobile terminal after judging that the payment interface is the safety interface, so that ticket checking and settlement operations are performed through an agent in the safety interface white list, and the ticket checking and settlement operations are refused when the interface address is unsafe. The safety of the payment interfaces in the safety interface white list is guaranteed, the payment risk of consumers and the payment collection risk of merchants on ticket vending machines are reduced, and meanwhile, the burden of accessing massive payment interfaces to a server of a payment platform is reduced.