CN111444105B - Method, system and device for simulating payment - Google Patents

Method, system and device for simulating payment Download PDF

Info

Publication number
CN111444105B
CN111444105B CN202010270731.3A CN202010270731A CN111444105B CN 111444105 B CN111444105 B CN 111444105B CN 202010270731 A CN202010270731 A CN 202010270731A CN 111444105 B CN111444105 B CN 111444105B
Authority
CN
China
Prior art keywords
payment
information
simulated
website
link
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
CN202010270731.3A
Other languages
Chinese (zh)
Other versions
CN111444105A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010270731.3A priority Critical patent/CN111444105B/en
Publication of CN111444105A publication Critical patent/CN111444105A/en
Application granted granted Critical
Publication of CN111444105B publication Critical patent/CN111444105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/792Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for payment purposes, e.g. monthly subscriptions
    • 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

Landscapes

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

Abstract

The embodiment of the invention provides a method, a system and a device for simulating payment, which comprise the following steps: receiving a payment request sent by a software client; generating success information or failure information according to the payment request; the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or sending the failure information to the software client. The function of the charging system and the payment channel in the software payment flow is realized by adopting the simulated payment website, and the simulated payment is conveniently carried out by the testers through interaction with the software client and the software server.

Description

Method, system and device for simulating payment
Technical Field
The invention relates to the technical field of software payment, in particular to a method for simulating payment, a system for simulating payment and a device for simulating payment.
Background
Payment functions are the most important means of income in the software industry, especially in the game software industry, and many software functions are dependent on payment for making activities or commodity purchases, such as game software payment activities as illustrated in FIG. 1, and different rewards are given to players through how much the player is charged, and when the player is charged more, the rewards are more abundant.
At present, the basic payment flow of the software payment is shown in fig. 2, and specifically is as follows:
(1) The user selects commodities to purchase through the software client;
(2) The client requests the charging system to send user information to the charging system via HTTPS (Hyper Text Transfer Protocol over SecureSocket Layer, hypertext transfer security protocol), and because of the versatility of HTTPS requests, almost all charging systems communicate using HTTPS protocols, the HTTPS requests will contain: a. goods that the user wishes to purchase; b. the current account information GUID of the user; c. the server where the user is located;
(3) The charging system creates an order form to a payment channel according to the commodity selected by the user, if the order form is a WeChat payment, a payment request is initiated to a WeChat background;
(4) The payment channel informs the charging system of the order information, and the order is successfully created;
(5) The charging system returns order information to the software client;
(6) The user finishes payment according to the order;
(7) The software client informs the payment channel of the order payment information;
(8) The payment channel returns the result to the charging system;
(9) The charging system carries out the following processing according to the successful payment according to the payment result returned by the payment channel: a. if the payment fails, the software client is directly informed; b. if the payment is successful, the server of the user is informed, the server of the user increases the commodity purchased by the user in the server, and the client of the user is informed through the server of the user that the payment is successful and the commodity purchased is successfully purchased.
The current software payment test schemes mainly include the following three types:
(1) Using normal payment means, namely adopting real currency for payment;
(2) The sandbox payment environment provided by the channel is used, namely, the payment channel provides an account, and the account can be paid at will;
(3) Through the instruction of a software manager, the test which can be completed by the payer can be directly completed, namely, the payment is carried out by bypassing the payment dummies.
According to the three payment test schemes described above, each has some drawbacks,
(1) The disadvantages of using normal payment means are mainly: a. the test cost is high, the test process can be repeated, and meanwhile, a large amount of money can be verified by paying some functions; b. the normal payment has slow response, and long waiting time is needed if a large amount is paid;
(2) The sand box payment environment provided by the channel is mainly used, and the defects are as follows: a. there is a partial channel without sandbox payment environment; b. the sandbox environment is troublesome to configure, the sandbox mode is required to be independently started, an account white list is added, and the universality is poor; c. the sand box environment is dangerous, and part of the sand box account numbers can be used in the formal environment;
(3) The software manager instructions have the following main disadvantages: a. the universality is poor, and a software developer is required to develop according to the current requirements; b. the method has one-sided performance, and the software manager instructions directly call the function completion interface, so that the normal payment flow is not taken, most flows are not completed, and a certain risk exists.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention are directed to providing a method of simulating payment, a system of simulating payment and a corresponding apparatus of simulating payment that overcome or at least partially solve the foregoing problems.
In order to solve the above problems, an embodiment of the present invention discloses a method for simulating payment, including:
receiving a payment request sent by a software client;
generating success information or failure information according to the payment request;
the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or sending the failure information to the software client.
Optionally, the payment request carries a payment mode, and the generating success information or failure information according to the payment request includes:
judging whether the payment is successful or not according to the payment mode in the payment request;
if the payment is judged to be successful according to the payment mode, success information is generated; and if the payment is judged to be unsuccessful according to the payment mode, generating failure information.
Optionally, the payment mode includes any one of the following:
successful payment;
failure to create an order;
successful payment but generating purchase information of a plurality of identical orders;
successful payment but delayed sending of purchase information to the software server;
successful payment, but sending purchase information to the wrong software server;
the payment was successful, but the purchased goods were unregistered.
Optionally, the payment request further carries a server identifier; before the step of sending the success information to the target software server, the method further comprises:
and determining a target software server according to the server identification and the payment mode in the payment request.
Optionally, before the step of receiving the payment request sent by the software client, the method further includes:
receiving address information sent by the software server;
adding the address information to a preset registry;
wherein the address information includes: IP address, port number, and access mode.
Optionally, the sending the success information to the target software server includes:
acquiring address information of a target software server from the preset registry;
and sending the success information to the target software server according to the address information.
The embodiment of the invention also discloses a method for simulating payment, which comprises the following steps:
acquiring a payment link of a simulated payment website;
replacing the original payment link with a payment link of the simulated payment website;
generating a payment request;
and sending the payment request to the simulated payment website by adopting the payment link of the simulated payment website.
Optionally, the generating a payment request includes:
determining a payment mode and purchasing goods;
acquiring a server identifier of a software server where the software client is located;
and generating a payment request according to the payment mode, the purchased goods and the server identification.
The embodiment of the invention also discloses a method for simulating payment, which comprises the following steps:
acquiring a payment link of a simulated payment website;
registering the payment link of the simulated payment website as an interface for receiving payment information;
receiving success information sent by the simulated payment website by adopting the interface for receiving payment information;
and processing the success information to obtain notification information, and sending the notification information to a software client.
Optionally, the method further comprises:
acquiring address information;
transmitting the address information to the simulated payment website; the simulated payment website is used for sending success information to the software server by adopting the address information.
The embodiment of the invention also discloses a system for simulating payment, wherein a simulated payment website, a software client and a software server are deployed in the system for simulating payment,
the software client is used for acquiring a payment link of a simulated payment website, replacing an original payment link with the payment link of the simulated payment website, generating a payment request, and transmitting the payment request to the simulated payment website by adopting the payment link of the simulated payment website;
the simulated payment website is used for receiving a payment request sent by the software client; generating success information or failure information according to the payment request; the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or, sending the failure information to the software client;
the software server is used for acquiring the payment link of the simulated payment website, registering the payment link of the simulated payment website as an interface for receiving payment information, receiving success information sent by the simulated payment website by adopting the interface for receiving payment information, processing the success information to obtain notification information, and sending the notification information to the software client.
The embodiment of the invention also discloses a device for simulating payment, which comprises:
the request receiving module is used for receiving a payment request sent by the software client;
the information generation module is used for generating success information or failure information according to the payment request;
the first information sending module is used for sending the success information to a target software server, processing the success information by the target software server to obtain notification information, and sending the notification information to the software client; or alternatively, the first and second heat exchangers may be,
and the second information sending module is used for sending the failure information to the software client.
The embodiment of the invention also discloses a device for simulating payment, which comprises:
the payment link acquisition module is used for acquiring a payment link of the simulated payment website;
a payment link replacement module for replacing the original payment link with the payment link of the simulated payment website;
a payment request generation module for generating a payment request;
and the payment request sending module is used for sending the payment request to the simulated payment website by adopting the payment link of the simulated payment website.
The embodiment of the invention also discloses a device for simulating payment, which comprises:
The payment link acquisition module is used for acquiring a payment link of the simulated payment website;
a payment link registration module for registering the payment link of the simulated payment website as an interface for receiving payment information;
the success information receiving module is used for receiving the success information sent by the simulated payment website by adopting the interface for receiving the payment information;
and the notification information sending module is used for processing the success information to obtain notification information and sending the notification information to the software client.
The embodiment of the invention also discloses an electronic device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the steps of one or more methods according to embodiments of the present invention.
Embodiments of the present invention also disclose a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the steps of one or more methods according to embodiments of the present invention.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the function of the charging system and the payment channel in the software payment flow is realized by adopting the simulated payment website, and the simulated payment is conveniently carried out by the testers through interaction with the software client and the software server.
On the one hand, the software payment test process does not need to use real currency for payment, namely, the test cost is not required, and a charging system in a normal payment flow is simulated, but because complicated security verification, database storage and communication with a payment channel in the charging system are not required, the whole response is faster, and meanwhile, the whole network environment, a client where a user is and the service end are basically located, are in a local area network, and the whole network access response is also faster.
On the other hand, the simulated payment website can be directly used, only the software client where the user is located is required to be added with a replacement code, the original visiting formal payment link is replaced by the payment link provided by the simulated payment website, and the interface of the server and the charging system is registered to the simulated payment website, so that the software payment is conveniently tested, the simulated payment website does not need to additionally provide an account number, meanwhile, the security of the formal service is not influenced through the registered control, and the universality and the security are good.
In addition, the simulated payment website does not need a software developer to develop independent test instructions aiming at each different test task, so that all payment-related test requirements are met; the system only replaces the function processed by the charging system, the charging system is a service provided by a third party, the system has no relation with software, and meanwhile, the simulated payment website simulates the problems encountered by all charging systems, so that the comprehensiveness of the test is achieved.
Drawings
FIG. 1 is a schematic diagram of a prior art payment for game software;
FIG. 2 is a basic payment flow diagram of a software payment of the prior art;
FIG. 3 is a flow chart of steps of a method embodiment one of the present invention for simulating payment;
FIG. 4 is a schematic diagram of a payment flow of an analog payment system of the present invention;
FIG. 5 is a flow chart of steps of a second embodiment of a method of simulating payment in accordance with the present invention;
FIG. 6 is a flow chart of the steps of a third embodiment of a method of simulating payment of the present invention;
FIG. 7 is a block diagram of an embodiment of a system for simulating payment of the present invention;
FIG. 8 is a block diagram of an embodiment of an apparatus for simulating payment in accordance with the present invention;
FIG. 9 is a block diagram of a second embodiment of an apparatus for simulating payment in accordance with the present invention;
fig. 10 is a block diagram of a third embodiment of an apparatus for simulating payment according to the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 3, a flowchart illustrating steps of a first embodiment of a method for simulating payment according to the present invention is shown, and the method is applied to a simulated payment website, and may specifically include the following steps:
Step 301, receiving a payment request sent by a software client;
as can be seen from the basic payment flow chart of the software payment shown in fig. 2, for the software tester, it is mainly focused on whether the payment is successful or not, whether the payment informs the software server, whether the software server completes a series of functions after the charging system informs the software server that the payment is successful, but the functions involved in the payment process (i.e. the charging system and the payment channel) are not directly related to the tester who tests the payment function of the software client. Therefore, a simulated payment website can be deployed, the function of a charging system and a payment channel in a software payment process can be realized by using the simulated payment website, interaction is carried out with a software client and a software server, and a tester can conveniently carry out simulated payment.
In the embodiment of the invention, the simulated payment website can be adopted to receive the payment request sent by the software client. Wherein the payment request may be a request for purchasing an item. The payment request may carry information such as an identifier of the commodity to be purchased, a unique identifier GUID (GloballyUnique Identifier) of the current account number of the software client, an identifier of the software server where the software client is located, a callback interface of the software client, and a payment mode.
When the user needs to purchase goods, the user can operate on a graphical user interface provided by the software client, select the goods to be purchased, pay the information such as the mode, and the like, a submit control can be included on the graphical user interface, and after the user triggers the submit control, a pay request can be generated and sent to the simulated payment website. Specifically, the original payment link of the software client may be replaced with the payment link of the simulated payment website, so that the software client may send the payment request to the simulated payment website through the payment link of the simulated payment website.
Step 302, generating success information or failure information according to the payment request;
in the payment process realized by the charging system and the payment channel, the situation of successful payment and the situation of failure payment are also present, when the payment is successful, the charging system notifies the software server, and when the payment is failed, the charging system notifies the software client.
In the embodiment of the invention, in order to better simulate the payment function realized by the charging system and the payment channel, the simulated payment website can generate success information or failure information according to the payment request after receiving the payment request so as to test the successful payment process and the failed payment process.
Step 303, sending the success information to a target software server, processing the success information by the target software server to obtain notification information, and sending the notification information to the software client; or alternatively, the first and second heat exchangers may be,
in an embodiment of the invention, the simulated payment website may send success information to the target software server. The target software server may be a server where the software client is located to test the ability of the software server to process normal orders. In some scenarios, the target software server may not be the server where the software client is located, and since the software server receives an abnormal order (an order of the software client not managed by the present server), the target software server may be set to be the server where the software client is not located, so as to test whether the software server is able to process the abnormal order.
Specifically, the interface of the target software server for receiving the payment information can be registered to the simulated payment website, so that the simulated payment website can send the success information to the target software server through the registered interface. After receiving the success information, the target software server can process the success information to obtain notification information, and send the notification information to the software client.
As an example, the success information may be: the purchase of 1000 coupons (virtual currency in the software game) is successfully paid, the software server may process the success information, add 1000 coupons in the software client's corresponding user's account, and generate a notification message to the software client to cause the software client to update the coupons in the account.
And step 304, sending the failure information to the software client.
In the embodiment of the invention, if the payment fails, the failure information is directly sent to the software client without informing the software server.
As an example, the failure information may be: the order payment fails. The simulated payment website may send failure information (failure of payment of the order) to the software client, which may initiate a payment request again to the simulated payment website after receiving the failure information, or cancel the order, etc.
The function of the charging system and the payment channel in the software payment flow is realized by adopting the simulated payment website, and the simulated payment is conveniently carried out by the testers through interaction with the software client and the software server.
In a preferred embodiment of the present invention, the payment request carries a payment mode, and the step 302 may include the following sub-steps:
Judging whether the payment is successful or not according to the payment mode in the payment request; if the payment is judged to be successful according to the payment mode, success information is generated; and if the payment is judged to be unsuccessful according to the payment mode, generating failure information.
The payment mode may be used to indicate a payment status of the present order.
In the embodiment of the invention, the simulated payment website can judge whether the payment is successful or not according to the payment mode in the payment request. If the payment is judged to be successful according to the payment mode, success information is generated, and if the payment is judged to be unsuccessful according to the payment mode, failure information is generated.
As an example, the payment mode may be: failure to create an order may determine that the payment was unsuccessful based on the payment mode. The payment mode may also be: and if the payment is successful, judging that the payment is successful according to the payment mode.
In a preferred embodiment of the present invention, the payment mode may include any one of the following:
successful payment; failure to create an order; successful payment but generating purchase information of a plurality of identical orders; successful payment but delayed sending of purchase information to the software server; successful payment, but sending purchase information to the wrong software server; the payment was successful, but the purchased goods were unregistered.
Wherein, the payment is successful: the software server may be directly notified of the purchase of the good to test the ability of the software server to process the normal order.
Failure to create an order: the results may be returned directly to the software client to test the ability of the software client to handle the abnormal order.
Successful payment, but generates purchase information for multiple identical orders: a scenario in which a system failure occurs at the time of software payment, and purchase information of a plurality of identical orders is generated may be simulated to test whether the software server can properly process duplicate orders.
Successful payment, but delayed sending of purchase information to the software server: a scenario may be simulated in which a network failure occurs during payment of the software, delaying the transmission of purchase information to the software server, to test whether the software server is able to properly process the order if the order is sent to the software server with a lag.
Successful payment, but sends purchase information to the wrong software server: a scenario may be simulated in which the required purchased goods are sent to the wrong software server to test whether the software server is able to handle an abnormal order. The wrong software server may refer to a server that is not the software client, for example, the server that is the software client is the software server a, but sends purchase information to the software server B.
Successful payment, but the purchased goods are not registered: a scenario in which purchased goods are not registered in the software server may be simulated to test whether the software server is able to properly process orders for illegal goods.
It should be noted that, when implementing the embodiment of the present invention, the payment mode may be set to other modes besides the above according to actual needs, which is not limited by the embodiment of the present invention.
In a preferred embodiment of the invention, the payment request also carries a server identification; prior to said step 303, the following steps may be included:
and determining a target software server according to the server identification and the payment mode in the payment request.
The server identification can be a unique identification of the software server, and the simulated payment website can uniquely determine a corresponding software server through the server identification. For example, the server identification may be 10001.
In the embodiment of the invention, the simulated payment website can extract the server identification and the payment mode in the payment request, and determine the target software server according to the server identification and the payment mode.
As an example, the correspondence of the server identification and the software server is shown in the following table 1:
Sequence number Server identification Software server
1 10001 A
2 10002 B
3 10003 C
TABLE 1
For example, assume that the payment mode is: if the payment is successful, the server identifier is 10001, and it can be determined that the software server a is the target software server through the above table 1. For another example, assume that the payment mode is: if the payment is successful, but the purchase information is sent to the wrong software server, where the server identifier is 10001, the software server B or C may be determined as the target software server through table 1, where when multiple software servers meet the requirements, the target software server may be determined through a random algorithm, and the target software server may be determined through other algorithms, where the embodiment of the present invention is not limited to this.
In a preferred embodiment of the present invention, before the step 301, the method may further include the steps of:
receiving address information sent by the software server; adding the address information to a preset registry; wherein the address information includes: IP address, port number, and access mode.
In the embodiment of the invention, the simulated payment website can receive address information sent by the software server and add the address information to a preset registry.
The preset registry may be a preset registry, which is used for storing address information corresponding to the software server. As an example, the preset registry may be as shown in table 2 below:
Sequence number Software server Address information
1 A https://192.168.11.11:8800/receive_payment
... ... ...
TABLE 2
In the address information of table 2, 192.168.11.11 is an IP address, 8800 is a port number, and receiver_party is an access method. By adding the address information of the software server in the preset registry, when the successful information of purchasing goods needs to be sent to the software server, the corresponding address information is acquired from the preset registry, and therefore the successful information is sent.
In a preferred embodiment of the present invention, the step 303 may include the following sub-steps:
acquiring address information of a target software server from the preset registry; and sending the success information to the target software server according to the address information.
When the success information needs to be sent to the target software server, the simulated payment website can acquire the address information of the target software server from the preset registry, and send the success information to the target software server according to the address information.
Fig. 4 shows a schematic diagram of a payment flow of an analog payment system of the present invention. In fig. 4, the payment simulation system includes a user, a software client, a payment simulation website and a software server, and the payment process in the payment simulation system is as follows:
1. The software client replaces the original payment link with a payment link provided by the simulated payment website.
2. The software server registers an interface of the software server for receiving payment information with the simulated payment website.
3. And notifying the IP, the port and the access method of the interface where the software server is located to the simulated payment website.
4. And the user selects commodities to be purchased to initiate payment to the simulated payment website through the software client which replaces the link, and selects a payment mode.
5. And when the payment is successful, the software client informs the simulated payment website of the user related information and the payment success option information.
6. The simulated payment website notifies the software server of payment success information.
7. The software server processes the payment related functions and informs the software client.
8. And when the payment fails, the software client informs the simulated payment website of the user related information and the payment failure option information.
9. The simulated payment website informs the software client of the payment failure information.
In the embodiment of the invention, the function of the charging system and the payment channel in the software payment flow is realized by adopting the simulated payment website, and the simulated payment is conveniently carried out by the testers through interaction with the software client and the software server.
On the one hand, the software payment test process does not need to use real currency for payment, namely, the test cost is not required, and a charging system in a normal payment flow is simulated, but because complicated security verification, database storage and communication with a payment channel in the charging system are not required, the whole response is faster, and meanwhile, the whole network environment, a client where a user is and the service end are basically located, are in a local area network, and the whole network access response is also faster.
On the other hand, the simulated payment website can be directly used, only the software client where the user is located is required to be added with a replacement code, the original visiting formal payment link is replaced by the payment link provided by the simulated payment website, and the interface of the server and the charging system is registered to the simulated payment website, so that the software payment is conveniently tested, the simulated payment website does not need to additionally provide an account number, meanwhile, the security of the formal service is not influenced through the registered control, and the universality and the security are good.
In addition, the simulated payment website does not need a software developer to develop independent test instructions aiming at each different test task, so that all payment-related test requirements are met; the system only replaces the function processed by the charging system, the charging system is a service provided by a third party, the system has no relation with software, and meanwhile, the simulated payment website simulates the problems encountered by all charging systems, so that the comprehensiveness of the test is achieved.
Referring to fig. 5, a flowchart of steps of a second embodiment of a method for simulating payment according to the present invention is shown, and the method is applied to a software client, and may specifically include the following steps:
step 501, obtaining a payment link of a simulated payment website;
the payment link of the simulated payment website may refer to a hyperlink for linking to the simulated payment website.
Step 502, replacing the original payment link with the payment link of the simulated payment website;
the original payment link may be a previously saved payment link in the software client that may be used to link to the billing system.
In the embodiment of the invention, the software client can acquire the payment link of the simulated payment website and replace the original payment link with the payment link of the simulated payment website. Thus, when making payment in the software client, the payment request that needs to be sent to the billing system can be sent to the simulated payment website through the payment link of the simulated payment website.
Step 503, generating a payment request;
in an embodiment of the invention, the software client may generate a payment request.
Specifically, the software client may run in the mobile terminal, and render a graphical user interface in a display screen of the mobile terminal, where the mobile terminal may have a device for collecting data of a user operation, and provide a data collection interface, through which the software client may obtain the data of the user operation, and further generate a payment request according to the data of the user operation. The user operation may be an operation performed by a user on a graphical user interface provided by the software client, including a click operation, a selection operation, and the like.
As an example, the software client may determine, through data operated by the user, that the user needs to purchase the commodity a, and that the payment mode is successful in payment, further determine information such as current account information GUID, a software server where the software client is located, a callback interface of the software client, and the like, and generate a payment request according to the information.
And step 504, sending the payment request to the simulated payment website by adopting a payment link of the simulated payment website.
In the embodiment of the invention, the software client can send the payment request to the simulated payment website by adopting the payment link of the simulated payment website so as to test whether the function of the software payment is normal.
In a preferred embodiment of the present invention, the generating a payment request includes:
determining a payment mode and purchasing goods; acquiring a server identifier of a software server where the software client is located; and generating a payment request according to the payment mode, the purchased goods and the server identification.
In the embodiment of the invention, the software client can determine the payment mode and purchase goods, acquire the server identification of the software server where the software client is located, and generate the payment request according to the payment mode, the purchase goods and the server identification.
Referring to fig. 6, a flowchart of the steps of a third embodiment of a method for simulating payment according to the present invention is shown, and the method is applied to a software server, and may specifically include the following steps:
step 601, obtaining a payment link of a simulated payment website;
the payment link of the simulated payment website may refer to a hyperlink for linking to the simulated payment website.
Step 602, registering the payment link of the simulated payment website as an interface for receiving payment information;
in an embodiment of the present invention, the software server may register the payment link of the simulated payment website as an interface for receiving payment information.
After registering the interface receiving the payment information, the software server may maintain a registry. As an example, the registry of software servers may be represented as shown in table 3 below:
TABLE 3 Table 3
Step 603, receiving success information sent by the simulated payment website by adopting the interface for receiving payment information;
in the embodiment of the invention, the software server can adopt an interface for receiving payment information to receive success information sent by the simulated payment website.
Step 604, the success information is processed to obtain notification information, and the notification information is sent to the software client.
In the embodiment of the invention, the software server can process the success information, obtain the notification message and send the notification message to the software client.
As an example, the success information may be: the purchase of 1000 coupons (virtual currency in the software game) is successfully paid, the software server may process the success information, add 1000 coupons in the software client's corresponding user's account, and generate a notification message to the software client to cause the software client to update the coupons in the account.
In a preferred embodiment of the invention, the method may further comprise the steps of:
acquiring address information; transmitting the address information to the simulated payment website; the simulated payment website is used for sending success information to the software server by adopting the address information.
The address information may be address information of a software server. The software server may provide a means of address information detection and an interface to obtain the address information.
In the embodiment of the invention, the software server can acquire the address information and send the address information to the simulated payment website. The simulated payment website, upon receiving the address information, may employ the address information to send success information to the software server.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 7, there is shown a block diagram of an embodiment of a payment-modeling system of the present invention in which a payment-modeling website 701, a software client 702, and a software server 703 are deployed, wherein,
the software client 702 is configured to obtain a payment link of a simulated payment website, replace an original payment link with a payment link of the simulated payment website, generate a payment request, and send the payment request to the simulated payment website by using the payment link of the simulated payment website;
the simulated payment website 701 is configured to receive a payment request sent by the software client; generating success information or failure information according to the payment request; the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or, sending the failure information to the software client;
The software server 703 is configured to obtain a payment link of the simulated payment website, register the payment link of the simulated payment website as an interface for receiving payment information, receive success information sent by the simulated payment website using the interface for receiving payment information, process the success information to obtain notification information, and send the notification information to a software client.
Referring to fig. 8, there is shown a block diagram of an embodiment of an apparatus for simulating payment according to the present invention, which is applied to a simulated payment website, and may specifically include the following modules:
a request receiving module 801, configured to receive a payment request sent by a software client;
an information generating module 802, configured to generate success information or failure information according to the payment request;
a first information sending module 803, configured to send the success information to a target software server, process the success information by the target software server to obtain notification information, and send the notification information to the software client; or alternatively, the first and second heat exchangers may be,
and the second information sending module 804 is configured to send the failure information to the software client.
In a preferred embodiment of the present invention, the payment request carries a payment mode, and the information generating module 802 includes:
The judging sub-module is used for judging whether the payment is successful or not according to the payment mode in the payment request;
the information generation sub-module is used for generating success information if the payment is judged to be successful according to the payment mode; and if the payment is judged to be unsuccessful according to the payment mode, generating failure information.
In a preferred embodiment of the invention, the payment mode comprises any one of the following:
successful payment;
failure to create an order;
successful payment but generating purchase information of a plurality of identical orders;
successful payment but delayed sending of purchase information to the software server;
successful payment, but sending purchase information to the wrong software server;
the payment was successful, but the purchased goods were unregistered.
In a preferred embodiment of the invention, the payment request also carries a server identification; the apparatus may further comprise the following modules:
and the server determining module is used for determining a target software server according to the server identification and the payment mode in the payment request.
In a preferred embodiment of the invention, the apparatus may further comprise the following modules:
the address information receiving module is used for receiving the address information sent by the software server;
The registry adding module is used for adding the address information to a preset registry;
wherein the address information includes: IP address, port number, and access mode.
In a preferred embodiment of the present invention, the first information sending module 803 may include the following sub-modules:
the address information acquisition sub-module is used for acquiring the address information of the target software server from the preset registry;
and the success information sending sub-module is used for sending the success information to the target software server according to the address information.
Referring to fig. 9, there is shown a block diagram of an embodiment of an apparatus for simulating payment of the present invention, which is applied to a software client, and may specifically include the following modules:
a payment link acquiring module 901, configured to acquire a payment link of a simulated payment website;
a payment link replacement module 902, configured to replace an original payment link with a payment link of the simulated payment website;
a payment request generation module 903 for generating a payment request;
and the payment request sending module 904 is configured to send the payment request to the simulated payment website by using a payment link of the simulated payment website.
In a preferred embodiment of the present invention, the payment request generation module 903 may include the following sub-modules:
the mode determining submodule is used for determining a payment mode and purchasing goods;
the server identifier acquisition sub-module is used for acquiring the server identifier of the software server where the software client is located;
and the payment request generation sub-module is used for generating a payment request according to the payment mode, the purchased goods and the server identification.
Referring to fig. 10, there is shown a block diagram of an embodiment of an apparatus for simulating payment according to the present invention, applied to a software server, may include the following modules:
a payment link acquiring module 1001, configured to acquire a payment link of a simulated payment website;
a payment link registration module 1002, configured to register a payment link of the simulated payment website as an interface for receiving payment information;
a success information receiving module 1003, configured to receive success information sent by the simulated payment website by using the interface for receiving payment information;
and the notification information sending module 1004 is configured to process the success information to obtain notification information, and send the notification information to the software client.
In a preferred embodiment of the invention, the apparatus may further comprise the following modules:
The address information acquisition module is used for acquiring address information;
the address information sending module is used for sending the address information to the simulated payment website; the simulated payment website is used for sending success information to the software server by adopting the address information.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the invention also provides electronic equipment, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the steps of the methods described by the embodiments of the present invention.
Embodiments of the present invention also provide a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the steps of the methods described in the embodiments of the present invention.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are 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. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above description of a method for simulating payment, a system for simulating payment and a device for simulating payment provided by the invention applies specific examples to illustrate the principles and embodiments of the invention, and the above examples are only used to help understand the method and core ideas of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (16)

1. A method for simulating payment, applied to a simulated payment website, comprising:
receiving a payment request sent by a software client; the payment request is the payment link of the simulated payment website obtained by the software client, and after the original payment link is replaced by the payment link of the simulated payment website, the payment link of the simulated payment website is adopted to transmit the payment link to the simulated payment website;
generating success information or failure information according to the payment request;
the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or alternatively, the first and second heat exchangers may be,
and sending the failure information to the software client.
2. The method of claim 1, wherein the payment request carries a payment pattern, wherein the generating success information or failure information from the payment request comprises:
judging whether the payment is successful or not according to the payment mode in the payment request;
if the payment is judged to be successful according to the payment mode, success information is generated; and if the payment is judged to be unsuccessful according to the payment mode, generating failure information.
3. The method of claim 2, wherein the payment mode comprises any one of:
successful payment;
failure to create an order;
successful payment but generating purchase information of a plurality of identical orders;
successful payment but delayed sending of purchase information to the software server;
successful payment, but sending purchase information to the wrong software server;
the payment was successful, but the purchased goods were unregistered.
4. A method according to claim 2 or 3, wherein the payment request also carries a server identification; before the step of sending the success information to the target software server, the method further comprises:
and determining a target software server according to the server identification and the payment mode in the payment request.
5. The method of claim 1, further comprising, prior to the step of receiving the payment request sent by the software client:
receiving address information sent by the software server;
adding the address information to a preset registry;
wherein the address information includes: IP address, port number, and access mode.
6. The method of claim 5, wherein said sending the success information to a target software server comprises:
Acquiring address information of a target software server from the preset registry;
and sending the success information to the target software server according to the address information.
7. A method of simulating payment, for application to a software client, comprising:
acquiring a payment link of a simulated payment website;
replacing the original payment link with a payment link of the simulated payment website;
generating a payment request;
transmitting the payment request to the simulated payment website by adopting a payment link of the simulated payment website;
the simulated payment website is used for receiving the payment request sent by the software client, generating success information or failure information according to the payment request, sending the success information to a target software server, processing the success information by the target software server to obtain notification information, and sending the notification information to the software client; or sending the failure information to the software client.
8. The method of claim 7, wherein the generating a payment request comprises:
determining a payment mode and purchasing goods;
acquiring a server identifier of a software server;
And generating a payment request according to the payment mode, the purchased goods and the server identification.
9. A method of simulating payment, applied to a software server, comprising:
acquiring a payment link of a simulated payment website;
registering the payment link of the simulated payment website as an interface for receiving payment information;
receiving success information sent by the simulated payment website by adopting the interface for receiving payment information;
processing the success information to obtain notification information, and sending the notification information to a software client; the success information is generated by the simulated payment website according to the payment request; and the payment request is a payment link of the simulated payment website obtained by the software client, and after the original payment link is replaced by the payment link of the simulated payment website, the payment link of the simulated payment website is adopted to transmit the payment link to the simulated payment website.
10. The method as recited in claim 9, further comprising:
acquiring address information;
transmitting the address information to the simulated payment website; the simulated payment website is used for sending success information to the software server by adopting the address information.
11. A system for simulating payment is characterized in that a simulated payment website, a software client and a software server are deployed in the system for simulating payment, wherein,
the software client is used for acquiring a payment link of a simulated payment website, replacing an original payment link with the payment link of the simulated payment website, generating a payment request, and transmitting the payment request to the simulated payment website by adopting the payment link of the simulated payment website;
the simulated payment website is used for receiving a payment request sent by the software client; generating success information or failure information according to the payment request; the success information is sent to a target software server, the success information is processed by the target software server to obtain notification information, and the notification information is sent to the software client; or, sending the failure information to the software client;
the software server is used for acquiring the payment link of the simulated payment website, registering the payment link of the simulated payment website as an interface for receiving payment information, receiving success information sent by the simulated payment website by adopting the interface for receiving payment information, processing the success information to obtain notification information, and sending the notification information to the software client.
12. An apparatus for simulating payment, for use in a simulated payment website, comprising:
the request receiving module is used for receiving a payment request sent by the software client; the payment request is the payment link of the simulated payment website obtained by the software client, and after the original payment link is replaced by the payment link of the simulated payment website, the payment link of the simulated payment website is adopted to transmit the payment link to the simulated payment website;
the information generation module is used for generating success information or failure information according to the payment request;
the first information sending module is used for sending the success information to a target software server, processing the success information by the target software server to obtain notification information, and sending the notification information to the software client; or alternatively, the first and second heat exchangers may be,
and the second information sending module is used for sending the failure information to the software client.
13. An apparatus for simulating payment, for application to a software client, comprising:
the payment link acquisition module is used for acquiring a payment link of the simulated payment website;
a payment link replacement module for replacing the original payment link with the payment link of the simulated payment website;
A payment request generation module for generating a payment request;
the payment request sending module is used for sending the payment request to the simulated payment website by adopting a payment link of the simulated payment website;
the simulated payment website is used for receiving the payment request sent by the software client, generating success information or failure information according to the payment request, sending the success information to a target software server, processing the success information by the target software server to obtain notification information, and sending the notification information to the software client; or sending the failure information to the software client.
14. An apparatus for simulating payment, applied to a software server, comprising:
the payment link acquisition module is used for acquiring a payment link of the simulated payment website;
a payment link registration module for registering the payment link of the simulated payment website as an interface for receiving payment information;
the success information receiving module is used for receiving the success information sent by the simulated payment website by adopting the interface for receiving the payment information;
the notification information sending module is used for processing the success information to obtain notification information and sending the notification information to the software client; the success information is generated by the simulated payment website according to the payment request; and the payment request is a payment link of the simulated payment website obtained by the software client, and after the original payment link is replaced by the payment link of the simulated payment website, the payment link of the simulated payment website is adopted to transmit the payment link to the simulated payment website.
15. An electronic device, comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform the steps of the method of any of claims 1-10.
16. A computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the steps of the method of any of claims 1-10.
CN202010270731.3A 2020-04-08 2020-04-08 Method, system and device for simulating payment Active CN111444105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010270731.3A CN111444105B (en) 2020-04-08 2020-04-08 Method, system and device for simulating payment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010270731.3A CN111444105B (en) 2020-04-08 2020-04-08 Method, system and device for simulating payment

Publications (2)

Publication Number Publication Date
CN111444105A CN111444105A (en) 2020-07-24
CN111444105B true CN111444105B (en) 2024-02-23

Family

ID=71651160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010270731.3A Active CN111444105B (en) 2020-04-08 2020-04-08 Method, system and device for simulating payment

Country Status (1)

Country Link
CN (1) CN111444105B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117971683A (en) * 2024-02-05 2024-05-03 北京小懂科技有限公司 Automatic testing method and device for smoking interface, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308556A (en) * 2007-05-15 2008-11-19 阿里巴巴集团控股有限公司 System and method for online charging test
DE102013105848A1 (en) * 2013-02-01 2014-08-07 Electronics And Telecommunications Research Institute Test application service support system has test agent module that executes control for application service to collection of test data which are necessary to allow test management module provides service test and test procedure
CN107797932A (en) * 2017-11-13 2018-03-13 广州唯品会网络技术有限公司 Pay acquisition methods, device and the storage medium of readjustment
CN108197914A (en) * 2017-12-29 2018-06-22 珠海市君天电子科技有限公司 A kind of information acquisition method, device and server
CN108228444A (en) * 2016-12-14 2018-06-29 阿里巴巴集团控股有限公司 A kind of test method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308556A (en) * 2007-05-15 2008-11-19 阿里巴巴集团控股有限公司 System and method for online charging test
DE102013105848A1 (en) * 2013-02-01 2014-08-07 Electronics And Telecommunications Research Institute Test application service support system has test agent module that executes control for application service to collection of test data which are necessary to allow test management module provides service test and test procedure
CN108228444A (en) * 2016-12-14 2018-06-29 阿里巴巴集团控股有限公司 A kind of test method and device
CN107797932A (en) * 2017-11-13 2018-03-13 广州唯品会网络技术有限公司 Pay acquisition methods, device and the storage medium of readjustment
CN108197914A (en) * 2017-12-29 2018-06-22 珠海市君天电子科技有限公司 A kind of information acquisition method, device and server

Also Published As

Publication number Publication date
CN111444105A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
US10489283B2 (en) Software defect reporting
CN104618226B (en) A kind of information processing method, client and server
CN108470298B (en) Method, device and system for transferring resource numerical value
Wang et al. How to shop for free online--security analysis of cashier-as-a-service based web stores
CN107896244B (en) Version file distribution method, client and server
CN112559361A (en) Flow playback method, device, equipment and computer readable medium
CN103946809B (en) Product servers load activity is produced for testing service device
JP2019500680A (en) Data processing method and apparatus
CN111177003A (en) Test method, device, system, electronic equipment and storage medium
CN105528725B (en) Account product transaction processing method and system and transaction server
CN110569159A (en) Baffle generation method, device, equipment and computer storage medium
US20130183948A1 (en) Application Store System and Development Method Using the Application Store System
CN111444105B (en) Method, system and device for simulating payment
CN109582550A (en) A kind of method, apparatus and server obtaining full dose business scenario failure collection
CN107220169B (en) Method and equipment for simulating server to return customized data
CN105187477A (en) Communication Of Reward Data Between Applications
CN108573383A (en) House-purchase qualification Pre-Evaluation method and apparatus
CN110837470B (en) Bank card network transaction testing method and device
CN108197914B (en) Information acquisition method and device and server
CN111338947A (en) Test method, test device, storage medium and electronic equipment
CN114691473A (en) Test method, test device and electronic equipment
CN106709733A (en) Verification strategy selection method and equipment
US11789834B2 (en) Computer and conduit for system testing
CN111538664A (en) System and method for testing payment marking application
CN112598420B (en) Online regression verification method and 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