CN108197914B - Information acquisition method and device and server - Google Patents

Information acquisition method and device and server Download PDF

Info

Publication number
CN108197914B
CN108197914B CN201711487554.9A CN201711487554A CN108197914B CN 108197914 B CN108197914 B CN 108197914B CN 201711487554 A CN201711487554 A CN 201711487554A CN 108197914 B CN108197914 B CN 108197914B
Authority
CN
China
Prior art keywords
payment
information
server
target
bill information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711487554.9A
Other languages
Chinese (zh)
Other versions
CN108197914A (en
Inventor
程寅捷
王猛
刘小梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Juntian Electronic Technology Co Ltd
Original Assignee
Zhuhai Juntian Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Juntian Electronic Technology Co Ltd filed Critical Zhuhai Juntian Electronic Technology Co Ltd
Priority to CN201711487554.9A priority Critical patent/CN108197914B/en
Publication of CN108197914A publication Critical patent/CN108197914A/en
Application granted granted Critical
Publication of CN108197914B publication Critical patent/CN108197914B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Accounting & Taxation (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the invention provides an information acquisition method, an information acquisition device and a server, wherein the information acquisition method comprises the following steps: receiving a payment request of a target transaction sent by a client; simulating a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; receiving payment bill information of the target transaction sent by the target server as second payment bill information, wherein the target server is as follows: a server providing a service for the client; matching the second payment bill information with the first payment bill information to obtain a matching result; obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server. By the technical scheme provided by the embodiment of the invention, developers can test the function of supporting the third-party payment process in the client conveniently.

Description

Information acquisition method and device and server
Technical Field
The present invention relates to the field of software testing technologies, and in particular, to an information acquisition method, an information acquisition apparatus, and a server.
Background
With the popularization of intelligent terminals such as smart phones and iPads, more and more users use the intelligent terminals. In the process of using the intelligent terminal, a user can use various clients, such as Taobao, Kyoto, the current network, a road dictionary, ofo shared bicycle and the like.
The user often uses a third party to pay in the process of using the client, for example, the user can pay through a third party payment platform such as a savings card, a credit card, a pay bank and the like in the process of using the Taobao to purchase the needed goods.
In order to ensure that the user can safely pay through the third party payment platform in the process of using the client. Before the client releases, a developer is required to test the functions in the client for supporting the third party payment process.
In the prior art, when testing a function of a client for supporting a third-party payment process, the test generally needs to be completed by means of a third-party payment platform, and in the test process, payment verification information fed back to the client by the third-party payment platform needs to be analyzed, so as to determine whether the function of the client for paying the third-party payment process is still problematic, wherein the payment verification information can be understood as: and confirming whether the third party payment platform normally receives the payment. However, since the types of the third party payment platforms are many and the expression form of the payment verification information is set by each third party payment platform, when there is a problem in the function of supporting the third party payment process in the client, the types of the payment verification information obtained by the client are many, so that it is difficult to locate the problem in the function of supporting the third party payment process in the client according to the payment verification information.
Disclosure of Invention
The embodiment of the invention aims to provide a testing method, a testing device and a testing server, so that a developer can test functions for supporting a third-party payment process in a client. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an information obtaining method, which is applied to a server, and the method includes:
receiving a payment request of a target transaction sent by a client;
simulating a third party payment platform to generate payment bill information of the target transaction as first payment bill information;
sending the first payment bill information to the client;
receiving payment bill information of the target transaction sent by a target server as second payment bill information, wherein the target server is as follows: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
matching the second payment bill information with the first payment bill information to obtain a matching result;
obtaining payment verification information matched with the matching result from pre-stored payment verification information;
and sending the searched payment verification information to the target server.
Optionally, the sending the found payment verification information to the target server includes:
and sending the searched payment verification information to the target server through a preset payment callback interface of the target server.
Optionally, the receiving payment instrument information of the target transaction sent by the target server includes:
and receiving payment bill information of the target transaction sent by the target server through a self-preset payment callback interface.
Optionally, the payment request is: and triggering a request for requesting payment for the target transaction, which is generated after the client generates the order information, by executing the test script.
Optionally, the receiving payment instrument information of the target transaction sent by the target server includes:
and receiving payment bill information of the target transaction sent after the target server verifies that the order information and the corresponding transaction identification of the target transaction are not matched with the completed order information and the corresponding transaction identification pre-stored by the target server.
In a second aspect, an embodiment of the present invention further provides an information obtaining apparatus, which is applied to a server, where the apparatus includes:
the payment request receiving module is used for receiving a payment request of a target transaction sent by a client;
the first payment bill information generation module is used for simulating a third-party payment platform to generate the payment bill information of the target transaction as first payment bill information;
the first payment bill information sending module is used for sending the first payment bill information to the client;
the second payment bill information receiving module is configured to receive payment bill information of the target transaction sent by a target server as second payment bill information, where the target server is: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
the payment bill information matching module is used for matching the second payment bill information with the first payment bill information to obtain a matching result;
the payment verification information acquisition module is used for acquiring payment verification information matched with the matching result from the pre-stored payment verification information;
and the payment verification information sending module is used for sending the searched payment verification information to the target server.
Optionally, the payment verification information sending module is specifically configured to:
and sending the searched payment verification information to the target server through a preset payment callback interface of the target server.
Optionally, the second payment ticket information receiving module is specifically configured to:
and receiving payment bill information of the target transaction, which is sent by the target server through a preset payment callback interface of the target server.
Optionally, the payment request is: and triggering a request for requesting payment for the target transaction, which is generated after the client generates the order information, by executing the test script.
Optionally, the second payment ticket information receiving module is specifically configured to:
and receiving payment bill information of the target transaction sent after the target server verifies that the order information and the corresponding transaction identification of the target transaction are not matched with the completed order information and the corresponding transaction identification pre-stored by the target server.
In a third aspect, an embodiment of the present invention provides a server, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor, configured to implement any of the information acquisition methods described in the first aspect when executing a program stored in the memory.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any one of the information acquisition methods described in the first aspect.
Compared with the prior art, after receiving a payment request of a target transaction sent by a client, the executive main body server simulates a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; after receiving the first bill information sent by the server, the client stores the first bill information as second payment bill information and sends the second payment bill information to the target server, and the target server sends the second payment bill information to the executive main body server; after receiving the second payment bill information, the execution main body server matches the second payment bill information with the first payment bill information to obtain a matching result; then obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server.
Therefore, by the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that developers can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an information obtaining method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an information acquisition apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problem of the prior art, embodiments of the present invention provide an information obtaining method, an information obtaining apparatus, and a server, so that a developer can test a function of supporting a third party payment process in a client.
It should be noted that, in the embodiment of the present invention, an execution subject of the information obtaining method is a server, and the server can simulate a third party payment platform to generate the payment receipt information of the target transaction. In order to distinguish this server from the target server mentioned in the embodiments of the present invention, in the following description, this server is referred to as: the principal server is executed.
In a first aspect, an information obtaining method provided in an embodiment of the present invention will be described.
As shown in fig. 1, an information obtaining method provided in an embodiment of the present invention includes the following steps:
s110, receiving a payment request of a target transaction sent by a client;
s120, simulating a third party payment platform to generate payment bill information of the target transaction as first payment bill information;
s130, sending the first payment bill information to a client;
s140, receiving payment receipt information of the target transaction sent by the target server as second payment receipt information, where the target server is: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
s150, matching the second payment bill information with the first payment bill information to obtain a matching result;
s160, obtaining payment verification information matched with the matching result from the pre-stored payment verification information;
and S170, sending the searched payment verification information to the target server.
Compared with the prior art, according to the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that a developer can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
The information acquisition method and the like provided by the embodiment shown in fig. 1 will be described in detail below.
S110, receiving a payment request of a target transaction sent by a client;
when a developer tests a function for supporting a third party payment process in a client, a real transaction process needs to be simulated. Therefore, the client is required to send the payment request of the target transaction to the execution main body server, and after the client sends the payment request to the execution main body server, the execution main body server receives the payment request sent by the client.
In an implementation manner, the payment request of the target transaction sent by the client to the executive main server may carry order information and a corresponding transaction identifier, where the order information may include commodity information, transaction time, transaction amount, and the like, the transaction identifier corresponding to the target transaction may be an order number, a transaction number, and the like, and the transaction identifier of the target transaction is automatically generated when the order information of the target transaction is generated. The embodiment of the invention does not specifically limit the order information and the transaction identifier.
It will be appreciated that the client sends the payment request to the fulfillment entities server after generating the order information. There are various ways in which the client generates the order information. Specifically, the method comprises the following steps:
the first way may be: manual triggering. Optionally, the user manually opens the client to select the commodity, and the client generates the order information.
The second way is: by executing test script triggers. Optionally, the client is triggered to automatically select the commodity by executing the test script, and the client generates the order information. The test script can be executed in the target server, and as long as the test script is executed in the target server, one client can automatically generate order information.
It is obvious that the second way of generating order information can reduce labor cost and save time compared with the first way of generating order information.
After the client generates order information, selecting a third party to pay, at the moment, sending a request to a target server by the client, and sending payment address information to the client after receiving the request by the target server, wherein the address pointed by the payment address information is the address of an execution main server; after receiving the virtual payment address information, the client sends order information to the execution main body server, namely, the client sends a payment request to the execution main body server, and at the moment, the execution main body server receives the payment request of the target transaction sent by the client.
Of course, in the embodiment of the present invention, the order information may also be generated in other manners, and the manner of generating the order information is not particularly limited in the embodiment of the present invention.
S120, simulating a third party payment platform to generate payment bill information of the target transaction as first payment bill information;
wherein, the payment bill information is: and the receipt information proves that the user pays for the order, and the payment bill information can comprise order information, a corresponding transaction identifier, a third-party payment platform encryption verification code and the like.
In order to accurately test the function of the client for supporting the third-party payment process, after receiving a payment request of a target transaction sent by the client, the server simulates a third-party payment platform to generate payment bill information of the target transaction.
S130, sending the first payment bill information to a client;
after the execution main body server generates the first payment bill information, a real transaction scene is simulated, and the server sends the generated first payment bill information to the client.
S140, receiving payment receipt information of the target transaction sent by the target server as second payment receipt information, where the target server is: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
after receiving the first payment bill information, the client can store the first payment bill information as second payment bill information, the client sends the second payment bill information to the target server, and the target server sends the second payment bill information to the execution main server after receiving the second payment bill information.
In the process that the execution main server sends the first payment bill information to the client and the client stores the first payment bill information as the second payment bill information and sends the second payment bill information to the target server, the first payment bill information and the second payment bill information can be tampered due to network transmission errors, network attacks and the like. If any one of the first payment bill information and the second payment bill information is tampered, the second payment bill information is not completely consistent with the first payment bill information; and if the first payment bill information and the second payment bill information are not tampered, the second payment bill information is completely consistent with the first payment bill information.
In one embodiment, when sending the second payment ticket information to the executing agent server, the target server may call its own preset payment callback interface to send the second payment ticket information to the executing agent server, that is, the second payment ticket information received by the executing agent server may be: and the target server sends the payment bill information of the target transaction to the execution main body server through a preset payment callback interface of the target server.
In one embodiment, the target server stores all completed order information and corresponding transaction identifiers, so that before the target server sends the second payment bill information to the execution main server, the target server can verify whether the order information of the target transaction sent by the client and the corresponding transaction identifier are matched with the completed order information and the corresponding transaction identifier stored by the target server, if the order information of the target transaction sent by the client and the corresponding transaction identifier are matched with the completed order information and the corresponding transaction identifier stored by the target server, the target server does not need to request again because the order is completed, and therefore, the target server can verify that the function for supporting the third-party payment process in the client is abnormal; and if the order information of the target transaction and the corresponding transaction identifier sent by the client are not matched with the completed order information and the corresponding transaction identifier stored by the target server, sending the second payment bill information to the execution main server, so that the execution main server further judges whether the second payment bill information is matched with the first payment bill information in the next step, and the function of supporting the third-party payment process in the client is tested.
S150, matching the second payment bill information with the first payment bill information to obtain a matching result;
and optionally, when verifying the bill information, only verifying whether the third payment platform encryption verification codes in the first payment verification information and the second payment verification information are the same to obtain a matching result.
For example, when the second payment bill information is completely consistent with the first payment bill information, the obtained matching result may be "matching successfully", "completely consistent", and the like, in this case, the function of the payment process for the third party in the client is normal;
when the second payment bill information is not completely consistent with the first payment bill information, the obtained matching result may be "matching is unsuccessful", "is not completely consistent", "payment response is overtime", "payment bill information cannot be verified", and the like.
S160, obtaining payment verification information matched with the matching result from the pre-stored payment verification information;
and after the matching result of the first payment bill information and the second payment bill information is obtained, the payment verification information matched with the matching result is searched in the pre-stored payment verification information.
For example, when the matching result of the first payment ticket information and the second payment ticket information is "matching success", "identical", or the like, the payment verification information that is found by the execution principal server and matches the matching result may be "verification success".
When the matching result of the first payment ticket information and the second payment ticket information is "response timeout", the payment verification information found by the execution principal server may be "response timeout".
It can be understood that, when testing the function of the client for supporting the third-party payment process, a large number of repeated tests are required to ensure the accuracy of the test, that is, during the test of the function of the client for supporting the third-party payment process, a plurality of transactions are involved, and in general, different transactions have different transaction identifications.
In one implementation, the preset payment verification information has a corresponding relationship not only with the matching result, but also with the transaction identifier. That is, for different transactions, due to different transaction identifications, when the matching result of the first payment receipt information and the second payment receipt information is the same, the payment verification information preset by the execution principal server may be the same or different. Wherein the payment verification information may include: code and meaning that code represents.
For example, in the process of testing the function of the client for supporting the third party payment process, there are two transactions, which are transaction a and transaction B, respectively, where the transaction identifier of transaction a is: 001; the transaction identification for transaction B is: 002. when the target transaction is transaction A, matching the first payment bill information with the second payment bill information to obtain a matching result of 'successful matching'; at this time, the payment verification information matched with the matching result searched by the execution main body server is: "code 200, which means that the verification was successful"; when the target transaction is transaction B, matching the first payment bill information with the second payment bill information to obtain a matching result which is 'matching successfully'; at this time, the payment verification information matched with the matching result found by the execution subject server is also "the code is 200, and the code indicates that the verification is successful".
For another example, in the process of testing the function of the client for supporting the third-party payment process, there are two transactions, which are transaction a and transaction B, respectively, where the transaction identifier of transaction a is: 001; the transaction identification for transaction B is: 002. when the target transaction is transaction A, matching the first payment bill information with the second payment bill information to obtain a matching result of 'successful matching'; at this time, the payment verification information which is searched by the execution main body server and is matched with the matching result is 'the code is 200, and the meaning of the code is verification success', wherein the payment verification information 1 indicates 'verification success'; when the target transaction is transaction B, matching the first payment bill information with the second payment bill information to obtain a matching result which is 'matching successfully'; at this time, the payment verification information matched with the matching result found by the execution subject server is "the code is 300, and the meaning indicated by the code is also verification success".
And S170, sending the searched payment verification information to the target server.
After the execution main server finds the payment verification information, the found payment verification information is sent to the target server, and the payment verification information received by the target server is the payment verification information pre-stored by the execution main server, so that developers can easily judge the normal or existing problems of the functions of the payment process for the third party in the client according to the payment verification information. When the function for supporting the third-party payment process in the client has a problem, the client is debugged according to the problem.
In one embodiment, the execution main server may send the found payment verification information to the target server through a preset payment callback interface of the target server.
Compared with the prior art, after receiving a payment request of a target transaction sent by a client, the executive main body server simulates a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; after receiving first bill information sent by the execution main body server, the client stores the first payment bill information as second payment bill information, and after the target server successfully verifies the first payment bill information, the client sends the second payment bill information to the execution main body server; after receiving the second payment bill information, the execution main body server matches the second payment bill information with the first payment bill information to obtain a matching result; then obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server.
Therefore, by the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that developers can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
In order to describe the technical solution of the embodiment of the present invention more clearly, an information obtaining method provided by the embodiment of the present invention is introduced below with reference to a specific embodiment.
The first embodiment is as follows: and the function of the payment process of the third party in the client is normal. In this embodiment, the third party payment is taken as an example of apple payment. The testing process is mainly divided into the following steps:
firstly, a client generates order information;
secondly, after the client generates order information, the user selects apple to pay, at the moment, the client sends a request to the target server, the target server returns payment address information to the client after receiving the request, the address pointed by the payment address information is an execution main body payment server, the client sends the order information and a corresponding transaction identifier to the execution main body payment server, and the client sends a payment request to the execution main body payment server;
thirdly, after the execution main body server receives the payment request, an apple payment platform is simulated, and the payment bill information is generated by self splicing and serves as first payment bill information;
fourthly, the execution main body server sends the first payment bill information to the client;
after receiving the first payment bill information sent by the execution main body server, the client stores the first payment bill information as second payment bill information and sends the second payment bill information to the target server, wherein the target server is as follows: a server providing a service for the client;
sixthly, the target server sends the second payment bill information to the execution main body server;
after receiving the second payment bill information, the execution main body server matches the first payment bill information with the second payment bill information to obtain a matching result which is 'matching success';
eighthly, the execution main body server sends the preset information of successful payment verification to the target server through a payment callback interface preset by the target server;
and ninthly, after the target server receives the information that the payment verification is successful, the developer can judge that the function of the payment process of the third party in the client is normal.
Example two: and the client is used for paying the abnormal function of the third party payment process. In this embodiment, the third party payment is still taken as the apple payment. The testing process is mainly divided into the following steps:
firstly, a client generates order information;
secondly, after the client generates order information, the user selects apple to pay, at the moment, the client sends a request to the target server, the target server returns payment address information to the client after receiving the request, the address pointed by the payment address information is an execution main body payment server, the client sends the order information and a corresponding transaction identifier to the execution main body payment server, and the client sends a payment request to the execution main body payment server;
thirdly, after the execution main body server receives the payment request, an apple payment platform is simulated, and the payment bill information is generated by self splicing and serves as first payment bill information;
fourthly, the execution main body server sends the first payment bill information to the client through a payment callback interface preset by the client;
after receiving the payment bill information sent by the execution main body server, the client stores the first payment bill information as second payment bill information and sends the second payment bill information to the target server, wherein the target server is as follows: a server providing a service for the client;
sixthly, the target server sends the second payment bill information to the execution main body server;
and seventhly, after the execution main body server receives the second payment bill information, matching the first payment bill information with the second payment bill information to obtain a matching result which is 'unsuccessful matching'.
And eighthly, the execution main body server sends the preset information of payment verification abnormity to the target server through a payment callback interface preset by the target server.
Because there may be various reasons for causing the dysfunction of the payment process for the payment third party in the client, there may be various information of the payment verification abnormity obtained. Wherein, the information of payment verification exception may include: the error code and the meaning indicated by the error code, for example, the information of the payment verification exception may be the following payment verification information:
1. the error code is: 21000, the error code means: the apple store cannot read the JSON object provided by the client;
2. the error code is: 21002, the error code means: the data format contained in the payment bill information sent by the target server to the execution main body server is wrong or lost;
3. the error code is: 21003, the error code means: the payment bill information sent by the target server to the execution main body server cannot be verified;
4. the error code is: 21004, the error code means: the password of the payment bill information sent by the target server to the execution main body server is tampered;
5. the error code is: 21005, the error code means: the execution main body server cannot verify whether the payment bill information sent to the execution main body server is normal or not currently;
6. the error code is: 21006, the error code means: the payment bill information sent by the target server to the execution subject server is valid payment bill information, but the content subscribed by the payment bill information is expired;
7. the error code is: 21007, the error code means: the payment bill information sent by the target server to the execution main body server comes from the test environment, and the execution main body server sends the payment bill information to the production environment so as to further verify the payment bill information;
8. the error code is: 21006, the error code means: the payment bill information sent by the target server to the execution main body server comes from the production environment, and the execution main body server sends the payment bill information to the test environment so as to further verify the payment bill information;
9. the error code is: 21010, the error code means: the payment bill information sent by the target client to the execution main body server is invalid payment bill information;
10. the error code is: 21100-: the target server sends the payment bill information internal data error to the execution main body server;
11. the error code is: 21200, the error codes all have the following meanings: the execution principal server responds to the timeout. For example, it is assumed that the execution principal server preset response time is 200 seconds, but in practical applications, the time consumed for the execution principal server to match the first payment ticket information with the second payment ticket information is 210 seconds (more than 200 seconds), and therefore, the information of the payment verification exception returned by the execution principal server for the target server is "execution principal server response timeout".
And ninthly, after the target server receives the information of the payment verification abnormity, developers can judge the function abnormity of the payment process of the third party in the client, and judge the problems of the function of the payment process of the third party in the client according to the received information of the payment verification abnormity.
In a second aspect, an embodiment of the present invention further provides an information obtaining apparatus, which is applied to a server, and as shown in fig. 2, the apparatus includes:
a payment request receiving module 210, configured to receive a payment request of a target transaction sent by a customer service end;
the first payment bill information generating module 220 is configured to simulate a third party payment platform to generate payment bill information of the target transaction as first payment bill information;
a first payment bill information sending module 230, configured to send the first payment bill information to the client;
a second payment ticket information receiving module 240, configured to receive second payment ticket information of the target transaction sent by the target server;
a payment bill information matching module 250, configured to match the second payment bill information with the first payment bill information to obtain a matching result;
a payment verification information obtaining module 260, configured to obtain payment verification information matched with the matching result from pre-stored payment verification information;
and a payment verification information sending module 270, configured to send the found payment verification information to the client.
Optionally, the payment verification information sending module 270 is specifically configured to:
and sending the searched payment verification information to the target server through a preset payment callback interface of the target server.
Optionally, the second payment ticket information receiving module 240 is specifically configured to:
and receiving payment bill information of the target transaction, which is sent by the target server through a preset payment callback interface of the target server.
Optionally, the payment request is: and triggering a request for requesting payment for the target transaction, which is generated after the client generates the order information, by executing the test script.
Optionally, the second payment ticket information receiving module 240 is specifically configured to:
and receiving payment bill information of the target transaction sent after the target server verifies that the order information and the corresponding transaction identification of the target transaction are not matched with the completed order information and the corresponding transaction identification pre-stored by the target server.
Compared with the prior art, after receiving a payment request of a target transaction sent by a client, the executive main body server simulates a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; after receiving first bill information sent by the execution main body server, the client stores the first payment bill information as second payment bill information, and after the target server successfully verifies the first payment bill information, the client sends the second payment bill information to the execution main body server; after receiving the second payment bill information, the execution main body server matches the second payment bill information with the first payment bill information to obtain a matching result; then obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server.
Therefore, by the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that developers can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
In a third aspect, an embodiment of the present invention further provides a server, as shown in fig. 3, including a processor 301, a communication interface 302, a memory 303, and a communication bus 304, where the processor 301, the communication interface 302, and the memory 303 complete mutual communication through the communication bus 304,
a memory 303 for storing a computer program;
the processor 301 is configured to implement any of the information acquisition methods described in the first aspect when executing the program stored in the memory 303.
The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the server and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
Compared with the prior art, after receiving a payment request of a target transaction sent by a client, the executive main body server simulates a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; after receiving first bill information sent by an executive main body server, a client stores the first bill information as second payment bill information and sends the second payment bill information to a target server, and the target server sends the second payment bill information to the executive main body server; after receiving the second payment bill information, the execution main body server matches the second payment bill information with the first payment bill information to obtain a matching result; then obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server.
Therefore, by the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that developers can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements any one of the information acquisition methods described in the first aspect.
Compared with the prior art, after receiving a payment request of a target transaction sent by a client, the executive main body server simulates a third party payment platform to generate payment bill information of the target transaction as first payment bill information; sending the first payment bill information to the client; after receiving the first bill information sent by the server, the client stores the first bill information as second payment bill information and sends the second payment bill information to the target server, and the target server sends the second payment bill information to the executive main body server; after receiving the second payment bill information, the execution main body server matches the second payment bill information with the first payment bill information to obtain a matching result; then obtaining payment verification information matched with the matching result from the pre-stored payment verification information; and sending the searched payment verification information to the target server.
Therefore, by the technical scheme provided by the embodiment of the invention, the payment verification information received by the target server is the payment verification information pre-stored by the execution main body server, so that developers can easily judge the normal or existing problems of the functions of the payment process of the third party in the client according to the payment verification information; unlike the prior art, when a developer tests a function of the client for supporting the third-party payment process, the types of the payment verification information received by the target server are many, so that the developer is difficult to locate the function of the client for supporting the third-party payment process according to the payment verification information. Therefore, the technical scheme provided by the embodiment of the invention is convenient for developers to test the function of supporting the third-party payment process in the client.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially, for the device and server embodiments, since they are basically similar to the method embodiments, the description is simple, and for the relevant points, refer to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. An information acquisition method applied to a server is characterized by comprising the following steps:
receiving a payment request of a target transaction sent by a client;
simulating a third party payment platform to generate payment bill information of the target transaction as first payment bill information;
sending the first payment bill information to the client;
receiving payment bill information of the target transaction sent by a target server as second payment bill information, wherein the target server is as follows: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
matching the second payment bill information with the first payment bill information to obtain a matching result;
obtaining payment verification information matched with the matching result from pre-stored payment verification information;
and sending the searched payment verification information to the target server through a preset payment callback interface of the target server.
2. The method of claim 1, wherein the receiving payment instrument information of the target transaction sent by the target server comprises:
and receiving payment bill information of the target transaction sent by the target server through a self-preset payment callback interface.
3. The method according to claim 1 or 2, wherein the payment request is: and triggering a request for requesting payment for the target transaction, which is generated after the client generates the order information, by executing the test script.
4. The method of claim 1 or 2, wherein the receiving payment instrument information of the target transaction sent by the target server comprises:
and receiving payment bill information of the target transaction sent after the target server verifies that the order information and the corresponding transaction identification of the target transaction are not matched with the completed order information and the corresponding transaction identification pre-stored by the target server.
5. An information obtaining apparatus applied to a server, the apparatus comprising:
the payment request receiving module is used for receiving a payment request of a target transaction sent by a client;
the first payment bill information generation module is used for simulating a third-party payment platform to generate the payment bill information of the target transaction as first payment bill information;
the first payment bill information sending module is used for sending the first payment bill information to the client;
the second payment bill information receiving module is configured to receive payment bill information of the target transaction sent by a target server as second payment bill information, where the target server is: the server provides service for the client, and the payment bill information of the target transaction in the target server is the payment bill information of the target transaction sent to the target server by the client;
the payment bill information matching module is used for matching the second payment bill information with the first payment bill information to obtain a matching result;
the payment verification information acquisition module is used for acquiring payment verification information matched with the matching result from the pre-stored payment verification information;
and the payment verification information sending module is used for sending the searched payment verification information to the target server through a preset payment callback interface of the target server.
6. The apparatus according to claim 5, wherein the second payment instrument information receiving module is specifically configured to:
and receiving payment bill information of the target transaction, which is sent by the target server through a preset payment callback interface of the target server.
7. The apparatus of claim 5 or 6, wherein the payment request is: and triggering a request for requesting payment for the target transaction, which is generated after the client generates the order information, by executing the test script.
8. The apparatus according to claim 5 or 6, wherein the second payment instrument information receiving module is specifically configured to:
and receiving payment bill information of the target transaction sent after the target server verifies that the order information and the corresponding transaction identification of the target transaction are not matched with the completed order information and the corresponding transaction identification pre-stored by the target server.
9. A server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 4.
CN201711487554.9A 2017-12-29 2017-12-29 Information acquisition method and device and server Active CN108197914B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711487554.9A CN108197914B (en) 2017-12-29 2017-12-29 Information acquisition method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711487554.9A CN108197914B (en) 2017-12-29 2017-12-29 Information acquisition method and device and server

Publications (2)

Publication Number Publication Date
CN108197914A CN108197914A (en) 2018-06-22
CN108197914B true CN108197914B (en) 2021-12-17

Family

ID=62587194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711487554.9A Active CN108197914B (en) 2017-12-29 2017-12-29 Information acquisition method and device and server

Country Status (1)

Country Link
CN (1) CN108197914B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111091346A (en) * 2019-11-20 2020-05-01 四川商通实业有限公司 Employee welfare general consumption payment method and system
CN111242595B (en) * 2019-12-31 2024-02-23 航天信息股份有限公司企业服务分公司 Method and device for exchanging information between ERP platform and payment platform
CN111444105B (en) * 2020-04-08 2024-02-23 网易(杭州)网络有限公司 Method, system and device for simulating payment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103855806A (en) * 2013-12-19 2014-06-11 国家电网公司 Simulation terminal testing method based on third-party platform
CN106296144A (en) * 2016-07-29 2017-01-04 努比亚技术有限公司 Payment processes server, client and payment processing method
CN106550033A (en) * 2016-10-27 2017-03-29 普元信息技术股份有限公司 Based on the system and method that cloud computing system realizes simulation the whole network ability open platform
CN106557421A (en) * 2016-10-10 2017-04-05 深圳市证通电子股份有限公司 POS applied program testing methods and device
CN106649076A (en) * 2015-11-02 2017-05-10 天脉聚源(北京)科技有限公司 Application testing method and system
CN106851708A (en) * 2015-12-04 2017-06-13 大唐移动通信设备有限公司 The multi-user test method and test system of a kind of LTE base station
CN107423957A (en) * 2016-12-30 2017-12-01 语联网(武汉)信息技术有限公司 A kind of service operation system of flexibly payment and settlement
CN107480064A (en) * 2017-08-11 2017-12-15 珠海金山网络游戏科技有限公司 A kind of the virtual of e-voucher center system supplements test system and method with money
CN107730223A (en) * 2017-10-27 2018-02-23 聚诚(深圳)网络科技有限公司 It is a kind of to polymerize the system and method paid

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9240888B2 (en) * 2003-03-05 2016-01-19 Bally Gaming, Inc. Authentication system for gaming machines

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103855806A (en) * 2013-12-19 2014-06-11 国家电网公司 Simulation terminal testing method based on third-party platform
CN106649076A (en) * 2015-11-02 2017-05-10 天脉聚源(北京)科技有限公司 Application testing method and system
CN106851708A (en) * 2015-12-04 2017-06-13 大唐移动通信设备有限公司 The multi-user test method and test system of a kind of LTE base station
CN106296144A (en) * 2016-07-29 2017-01-04 努比亚技术有限公司 Payment processes server, client and payment processing method
CN106557421A (en) * 2016-10-10 2017-04-05 深圳市证通电子股份有限公司 POS applied program testing methods and device
CN106550033A (en) * 2016-10-27 2017-03-29 普元信息技术股份有限公司 Based on the system and method that cloud computing system realizes simulation the whole network ability open platform
CN107423957A (en) * 2016-12-30 2017-12-01 语联网(武汉)信息技术有限公司 A kind of service operation system of flexibly payment and settlement
CN107480064A (en) * 2017-08-11 2017-12-15 珠海金山网络游戏科技有限公司 A kind of the virtual of e-voucher center system supplements test system and method with money
CN107730223A (en) * 2017-10-27 2018-02-23 聚诚(深圳)网络科技有限公司 It is a kind of to polymerize the system and method paid

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
互联网第三方支付模拟与监控平台设计与实现;李昊;《万方数据》;20151203;第4页、4-5章 *

Also Published As

Publication number Publication date
CN108197914A (en) 2018-06-22

Similar Documents

Publication Publication Date Title
CN107908485B (en) Interface parameter transmission method, device, equipment and computer readable storage medium
CN108197914B (en) Information acquisition method and device and server
CN105101122A (en) Verification code inputting method and device
CN111177003A (en) Test method, device, system, electronic equipment and storage medium
CN108874654B (en) Idempotent validity test method, device and equipment and readable medium
CN110320378B (en) Method, apparatus, device and computer readable storage medium for applying for a quality control test
CN111858296A (en) Interface test method, device, equipment and storage medium
WO2023284505A1 (en) Method and apparatus for code-scanning payment
CN111415146A (en) Resource data processing method, device and equipment
CN114218911A (en) Method and device for clearing certification and development, storage medium and electronic equipment
CN113778878A (en) Interface testing method and device, electronic equipment and storage medium
CN113821433A (en) Method, device, equipment, medium and product for testing cloud mobile phone application program
CN110175915B (en) Service execution result obtaining method and system based on block chain
CN110752933A (en) Verification code input method and device, electronic equipment and storage medium
CN108229127B (en) System and method for generating authentication data in advance to distinguish clients
US20220414652A1 (en) Prioritizing Holds When Selecting Transactions for Transaction-Based Knowledge-Based Authentication
CN111324537A (en) Test script-based test method and device and computer equipment
CN114254991A (en) Target object reporting method, device and equipment
CN111597101B (en) SDK access state detection method, computer equipment and computer readable storage medium
CN113988844A (en) Service subscription method, device and system
CN114971632A (en) Social platform binding system, method and device, electronic equipment and storage medium
CN112990902A (en) Service processing method, device, computer equipment and storage medium
CN111833047A (en) Payment code generation method and device based on mobile payment and computer equipment
CN111967929A (en) Order polling method and device, electronic equipment and storage medium
CN112184213A (en) Code scanning payment method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant