Payment service verification method and device for WeChat applet, and medium

By receiving and processing the configuration information of the tester and dynamically modifying the payment amount, the problem of high verification cost in the WeChat mini-program payment business verification method is solved, and low-cost multiple payment scenario verification is achieved, avoiding the impact on real user orders .

CN119088704APending Publication Date: 2024-12-06CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215258.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The payment business verification method of the existing WeChat mini program has the problem of high verification costs, and real payment operations are required, resulting in wasted funds and resources.

Method used

Provide a payment service verification method for WeChat applets. By receiving configuration information input by testers, including application name, encapsulated ordering method, payment amount and digital identity identification framework openid, dynamically modify payment amount, allowing testers to use low The verification of multiple payment scenarios is completed.

Benefits of technology

It realizes that the order payment amount is dynamically modified without affecting the real user's order payment data, reducing the cost of payment verification and improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088704A_ABST
    Figure CN119088704A_ABST
Patent Text Reader

Abstract

The invention provides a payment service verification method and device for a WeChat applet and a medium, and relates to the technical field of networks, the method comprises the steps that configuration information input by a tester is received, and the configuration information comprises an application name, a packaged ordering method, a payment amount and a digital identity recognition framework openid; adding the configuration information according to a new adding instruction of a tester; and when a user corresponding to the openid initiates payment through the packaged ordering method in the target application, the payment amount needing to be paid is the payment amount in the configuration information, so that the user performs payment according to the payment amount in the configuration information. According to the method, the device and the medium, the problem of high verification cost of an existing WeChat applet payment service verification method can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a payment service verification method, device and medium for a WeChat applet. Background Art

[0002] For business systems involving the development of WeChat mini-programs, the payment function of the mini-program is usually an indispensable function. For example, takeaway systems, restaurant ordering systems, online shopping systems, etc., all require the development of a set of payment processes in the mini-program that meet business needs.

[0003] A complete payment interaction flow chart is as follows: Figure 1 As shown, taking the catering ordering system as an example, after the user places an order in the merchant's mini program, he will then place an order and pay. At this time, the mini program will trigger an order payment request to the backend system of the catering system. The backend system of the catering system will then generate a platform order (the order status is unpaid) and initiate an order creation request to the WeChat payment system; after receiving the order creation request, the WeChat payment system will generate prepaid order data, and then return the prepaid order identifier to the backend system of the catering system. Thereafter, the backend system will generate payment information and return it to the mini program (at this time, the payment information will include information such as the amount to be paid by the subsequent user and the payment method), and then the mini program will automatically call up WeChat payment (at this time, the amount to be paid has been determined and cannot be modified), and the user will complete the payment after entering the correct password; after completing the payment, the WeChat payment system will asynchronously notify the backend system of the catering system of the payment result (at this time, if the payment is successful, the backend system should update the order status to paid and start preparing the meal), and return the payment result to the mini program (at this time, the mini program page should display payment success and waiting for the meal). During this process, the processing logic of the mini program (such as processing when receiving the payment result after payment) and the processing logic of the backend system (such as updating the order status when receiving the payment result) must be developed, implemented, tested and verified.

[0004] However, in the industry, to test and verify the processing logic of existing mini-programs and backend systems, it is necessary to perform a complete payment operation (initiate order creation and payment request to the WeChat payment system) to complete the overall order placement and payment process testing and verification. When there are many scenarios and test cases to be verified, the verification cost is relatively high (real payment must be made). Assuming the amount of an order is 50 yuan, then to verify 10 scenarios, 500 yuan must be paid to the WeChat system, resulting in a waste of financial resources. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a payment service verification method, device and medium for a WeChat applet in view of the above-mentioned deficiencies in the prior art, so as to solve the problem of high verification cost in the existing payment service verification method for WeChat applet.

[0006] In a first aspect, the present invention provides a payment service verification method for a WeChat applet, the method comprising:

[0007] Receive configuration information input by the tester, the configuration information includes the application name, the encapsulated order method, the payment amount and the digital identity recognition framework openid, wherein the application name refers to the name of the target application that implements the WeChat applet payment service function, and the encapsulated order method refers to the method in the target application that encapsulates the WeChat applet payment function;

[0008] Add the configuration information according to the tester's new instructions;

[0009] When the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

[0010] Furthermore, the adding of the configuration information according to the new instructions of the tester specifically includes:

[0011] According to the newly added instruction of the tester, determine whether the target application corresponding to the application name in the configuration information has been mounted and monitored;

[0012] In response to the target application being mounted and listened, determining whether there is configuration information including the application name and the packaged ordering method in the pre-stored configuration list data;

[0013] If the configuration information including the application name and the packaged order method does not exist in the configuration list data, the configuration information is added to the configuration list data, and the configuration information is saved in the remote dictionary service Redis cache.

[0014] Further, judging whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester specifically includes:

[0015] Attempt to read the listening identifier representing the target application in the Redis cache;

[0016] If the monitoring identifier can be read, it is determined that the target application has been mounted for monitoring; otherwise, it is determined that the target application has not been mounted for monitoring.

[0017] Furthermore, after judging whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester, the method further includes:

[0018] In response to the target application not being mounted for monitoring, a mounting monitoring operation is performed on the target application through a remote command, and after the mounting monitoring is successful, a monitoring identifier representing the target application is saved in the Redis cache.

[0019] Furthermore, the step of mounting and monitoring the target application includes:

[0020] Monitor all internal methods within the target application;

[0021] When a method is called, determine whether the method and the corresponding application name match the application name and the encapsulated order method in a configuration information in the configured list data; if they match, further determine whether the parameter value at the first specified position in the encapsulated order method is the same as the corresponding value in the openid;

[0022] In response to the parameter value at the first designated position in the encapsulated order placement method being the same as the corresponding value in the openid, the parameter value at the second designated position in the encapsulated order placement method is modified to be the corresponding value in the payment amount.

[0023] Furthermore, after adding the configuration information according to the new instructions of the tester, the method further includes:

[0024] The payment amount and / or openid in the configuration information are modified according to the tester's editing instructions, and the configuration list data is updated.

[0025] Furthermore, after adding the configuration information according to the new instructions of the tester, the method further includes:

[0026] The configuration list data and the configuration information in the Redis cache are deleted according to the tester's deletion instruction.

[0027] In a second aspect, the present invention provides a payment service verification device for a WeChat applet, the device comprising:

[0028] A configuration information receiving module is used to receive configuration information input by a tester, wherein the configuration information includes an application name, an encapsulated order method, a payment amount, and a digital identity recognition framework, openid, wherein the application name refers to the name of a target application that implements the WeChat applet payment service function, and the encapsulated order method refers to a method in the target application that encapsulates the WeChat applet payment function;

[0029] A configuration information adding module, connected to the configuration information receiving module, for adding the configuration information according to the new instructions of the tester;

[0030] The payment service verification module is connected to the configuration information adding module and is used for when the user corresponding to the openid initiates payment through the encapsulated ordering method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

[0031] In a third aspect, the present invention provides a payment service verification device for a WeChat applet, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the payment service verification method for the WeChat applet described in the first aspect above.

[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the payment service verification method of the WeChat applet described in the first aspect above is implemented.

[0033] The payment service verification method, device and medium of WeChat applet provided by the present invention. First, the configuration information input by the tester is received, and the configuration information includes the application name, the encapsulated order method, the payment amount and the digital identity recognition framework openid, wherein the application name refers to the name of the target application that realizes the payment service function of the WeChat applet, and the encapsulated order method refers to the method in which the WeChat applet payment function is encapsulated in the target application; then the configuration information is added according to the new instructions of the tester; finally, when the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information. The present invention can dynamically modify the order payment amount for the specified user (for example, change 50 yuan to 0.01 yuan), and will not affect the order payment data of other real users (other users are still 50 yuan), so as to help the tester complete the verification of multiple payment scenarios at a very low cost. The problem of high verification cost in the existing payment service verification method of WeChat applet is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is the existing payment interaction flow chart;

[0035] Figure 2 This is a flowchart of a payment service verification method of a WeChat applet in Example 1 of the present invention;

[0036] Figure 3 This is a schematic diagram of the interface of the newly added configuration page of Example 1 of the present invention;

[0037] Figure 4 This is a schematic diagram of the interface of the configuration operation page of Example 1 of the present invention;

[0038] Figure 5 This is a schematic diagram of the interface of the configuration editing page of Example 1 of the present invention;

[0039] Figure 6 This is a schematic diagram of the interface of the pop-up prompt page of Example 1 of the present invention;

[0040] Figure 7 This is a schematic diagram of the structure of a payment service verification device of a WeChat applet in accordance with Embodiment 2 of the present invention;

[0041] Figure 8 This is a structural diagram of a payment service verification device for a WeChat applet according to embodiment 3 of the present invention. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0043] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.

[0044] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.

[0045] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.

[0046] It can be understood that the terms "first", "second", etc. in the embodiments of the present invention are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.

[0047] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.

[0048] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.

[0049] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.

[0050] Embodiment 1:

[0051] This embodiment provides a payment service verification method for a WeChat applet, such as Figure 2 As shown, the method includes:

[0052] Step S101: Receive configuration information input by the tester, the configuration information including application name, encapsulated order method, payment amount and openid (digital identity framework), wherein the application name refers to the name of the target application that implements the WeChat mini program payment business function, and the encapsulated order method refers to the method in which the WeChat mini program payment function is encapsulated in the target application.

[0053] In this embodiment, the tester can Figure 3 Fill in the configuration information that needs to be added in the configuration page shown, including application name, packaged order method, payment amount, and openid. The description of each part is as follows:

[0054] (1) Application name: refers to the name of the target application that implements the WeChat Mini Program payment service function, that is, the name of the target application to which the encapsulated order method belongs.

[0055] (2) Encapsulated order method: refers to the method that encapsulates the payment function of the WeChat Mini Program. This method will inevitably initiate a request to the WeChat payment system (initiate a request to create an order to the WeChat payment system). This request will inform the WeChat payment system of the amount to be paid for the current order. The full path name of the method must be filled in, such as com.kcard.kcardcharge.common.util.weChatPayUtil#pay, which represents the pay method under the weChatPayUtil class under the package com.kcard.kcardcharge.common.util.

[0056] (3) Payment amount: refers to the payment amount that needs to be informed to the WeChat payment system when creating an order. It should be noted that:

[0057] a) The payment amount notified to the WeChat payment system when creating an order will determine the payment amount after the subsequent user initiates the payment on the Mini Program side;

[0058] b) For the application system, the current order should have been saved before calling the encapsulated order method. Even if the payment amount is modified later, the actual amount of the order is still saved correctly in the application system and has not been modified.

[0059] c) After the user subsequently initiates the payment and actually pays, the WeChat payment system will call back a callback interface on the application system to inform the application system that the order has been paid (successful or failed). At this time, the application system will update the status of the order (paid or canceled).

[0060] (4) Openid: refers to the openid of the user currently logged in to the WeChat mini program during verification. In the WeChat mini program, the openid is used to uniquely represent the user currently logged in to the WeChat mini program.

[0061] Step S102: adding the configuration information according to the new instructions of the tester.

[0062] In this embodiment, when the user clicks Figure 3 When the new button is clicked, the tester's new instructions are received.

[0063] Optionally, the adding of the configuration information according to the new instruction of the tester specifically includes:

[0064] According to the newly added instruction of the tester, determine whether the target application corresponding to the application name in the configuration information has been mounted and monitored;

[0065] In response to the target application being mounted and listened, determining whether there is configuration information including the application name and the packaged ordering method in the pre-stored configuration list data;

[0066] If the configuration information including the application name and the packaged order method does not exist in the configuration list data, the configuration information is added to the configuration list data, and the configuration information is saved in a Redis (remote dictionary service) cache.

[0067] In this embodiment, an attempt is made to read the monitoring identifier representing the target application in the Redis cache; if the monitoring identifier can be read, it is determined that the target application has been mounted for monitoring, otherwise, it is determined that the target application has not been mounted for monitoring. When the target application has been mounted for monitoring, it is determined whether the currently newly configured application name + encapsulated order method already exists in the configuration list data. If it does exist, a pop-up box prompts "This method has been configured and cannot be added repeatedly"; if it does not exist, the newly added configuration is successful, and the configuration information is saved to the configuration list data and the Redis cache.

[0068] Optionally, after judging whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester, the method further includes:

[0069] In response to the target application not being mounted for monitoring, a mounting monitoring operation is performed on the target application through a remote command, and after the mounting monitoring is successful, a monitoring identifier representing the target application is saved in the Redis cache.

[0070] In this embodiment, if the target application has not been mounted and monitored, a remote command is executed to mount and monitor the target application that is currently newly configured, and after the monitoring is successfully mounted, the monitoring identifier representing the target application is saved in Redis (such as setmonitor:kcard-charge 1). The command is . / sandbox.sh-p 1-d'service-monitor / startMonit', where 1 is the process of the application under test, which is obtained by executing the command ps-ef|grep-i kcard-charge|awk'{print$2}' (kcard-charge is the name of the application under test); sandbox.sh is the mount and monitor command of the jvm-sandbox installed in advance on the server where the application under test is located.

[0071] Optionally, the step of mounting and monitoring the target application includes:

[0072] Monitor all internal methods within the target application;

[0073] When a method is called, determine whether the method and the corresponding application name match the application name and the encapsulated order method in a configuration information in the configured list data; if they match, further determine whether the parameter value at the first specified position in the encapsulated order method is the same as the corresponding value in the openid;

[0074] In response to the parameter value at the first designated position in the encapsulated order placement method being the same as the corresponding value in the openid, the parameter value at the second designated position in the encapsulated order placement method is modified to be the corresponding value in the payment amount.

[0075] In this embodiment, the openid includes the first specified position and the value corresponding to the first specified position in the corresponding packaged order method (user identification value), for example, 3:0Q23ew75T9B941CK7cXyR6G1F53e, and the payment amount includes the second specified position and the value corresponding to the second specified position in the packaged order method (the payment amount to be paid), for example, 2:0.01.

[0076] In this embodiment, the step of mounting the target application to monitor specifically includes:

[0077] (a) Monitor all internal methods in the target application. When a method is called, the logic of (b) is triggered before the method is executed.

[0078] (b) Determine whether the method and the application name belong to a "packaged order method + application name" in the configuration list data. If yes, execute (c); if not, no intervention is required;

[0079] (c) Determine whether the value of the parameter at the specified position in each parameter of the method is the same as the value of the configured openid. The specified position here is given during configuration (such as 3:0Q23ew75T9B941CK7cXyR6G1F53e, the 3 before the colon : indicates the position of the third parameter). If they are the same, execute (d); if they are different, no intervention is required. It should be noted that in the WeChat applet, the openid is used to uniquely represent the user currently logged in to the WeChat applet. When requesting the WeChat payment system to create an order interface, the openid must also be used as one of the parameters to indicate which user to create a payment order for. Therefore, in the order placement method encapsulated by the target application, the openid is also a required parameter.

[0080] (d) Replace the value of the parameter at the specified position in each parameter of this method with the value of the configured payment amount. The specified position here is also given during configuration (e.g., in 2:0.01, the 2 before the colon : indicates the position of the second parameter). At this point, the payment amount notified to the WeChat payment system can be changed to a smaller amount (e.g., 0.01), so that the amount used by the subsequent user to pay is the modified amount.

[0081] Step S103: When the user corresponding to the openid initiates payment through the packaged order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

[0082] In this embodiment, when the user corresponding to each row of configuration in the configuration list data initiates a payment, the payment amount is the configured amount. This allows testers to conduct tests at a lower cost when verifying various payment business scenarios (successful payment or failed payment scenarios) without affecting the order payment data of other real users, thereby improving the user's payment experience.

[0083] Optionally, after adding the configuration information according to the new instruction of the tester, the method further includes:

[0084] The payment amount and / or openid in the configuration information are modified according to the tester's editing instructions, and the configuration list data is updated.

[0085] In this embodiment, the tester can edit the configuration information in the configuration list data, among which only the payment amount and openid are allowed to be edited. After the modification is confirmed, the new payment amount and openid will overwrite the old values ​​(and also overwrite the corresponding data in Redis).

[0086] Optionally, after adding the configuration information according to the new instruction of the tester, the method further includes:

[0087] The configuration list data and the configuration information in the Redis cache are deleted according to the tester's deletion instruction.

[0088] In this embodiment, after the test is completed, the tester can click the delete button to delete the corresponding configuration information. After deletion, the payment amount of the relevant user will be restored to the normal amount.

[0089] It should be noted that the method steps of the present invention are located in Figure 1 In the server of the backend service of the merchant applet, that is, the business system backend, the configuration steps are pre-configured before starting the test, that is, in Figure 1 After configuration, the present invention will actually Figure 1 In step 4 of Figure 1, modify the parameters of the order interface so that the payment amount is changed to the configured amount. As for the subsequent steps in Figure 1, such as calling payment and confirming the payment amount, they will also be modified because they will be the same as the amount when placing the order.

[0090] In a specific embodiment, the payment service verification method of the WeChat applet may include the following steps:

[0091] 1. Testers Figure 3 Fill in the relevant information on the configuration page shown, and click the Add button. The information to be filled in includes the application name, packaged order method, payment amount, and openid. The description of each part is as follows:

[0092] (1) Application name: refers to the name of the target application that implements the WeChat Mini Program payment service function, that is, the name of the target application to which the encapsulated order method belongs.

[0093] (2) Encapsulated order method: refers to the method that encapsulates the payment function of the WeChat Mini Program. This method will inevitably initiate a request to the WeChat payment system (initiate a request to create an order to the WeChat payment system). This request will inform the WeChat payment system of the amount to be paid for the current order. The full path name of the method must be filled in, such as com.kcard.kcardcharge.common.util.weChatPayUtil#pay, which represents the pay method under the weChatPayUtil class under the package com.kcard.kcardcharge.common.util.

[0094] (3) Payment amount: refers to the payment amount that needs to be informed to the WeChat payment system when creating an order. It should be noted that:

[0095] a) The payment amount notified to the WeChat payment system when creating an order will determine the payment amount after the subsequent user initiates the payment on the Mini Program side;

[0096] b) For the application system, the current order should have been saved before calling the encapsulated order method. Even if the payment amount is modified later, the actual amount of the order is still saved correctly in the application system and has not been modified. The reason is: the amount of the order we see is returned by the backend of the business system, while the actual amount of payment is returned by the WeChat server. In the present invention, we only modify the amount of the order interface of the WeChat server, so only the amount returned by the WeChat server is changed, and the amount returned by the business system remains unchanged (only for display).

[0097] c) After the user subsequently initiates the payment and actually pays, the WeChat payment system will call back a callback interface on the application system to inform the application system that the order has been paid (successful or failed). At this time, the application system will update the status of the order (paid or canceled).

[0098] (4) Openid: refers to the openid of the user currently logged in to the WeChat mini program during verification. In the WeChat mini program, the openid is used to uniquely represent the user currently logged in to the WeChat mini program.

[0099] 2. After clicking the Add button, you will jump to Figure 4 The configuration operation page shown shows all newly added configurations. When the user corresponding to each row of configuration initiates a payment, the payment amount is the configured amount. The tester can click the Edit button to modify the content of the configuration row.

[0100] Specifically, when the tester clicks the Add button, the browser will jump to Figure 4 The configuration operation page shown in the figure will trigger a query configuration request to service A. After receiving the request, service A will read the configuration list data saved in Redis and return it to the browser. After rendering, it will be displayed as Figure 4 The configuration list data in the configuration operation page shown. When the tester clicks the edit button, a pop-up Figure 5 In the configuration editing page shown, only the payment amount and openid are allowed to be edited. After editing, click the OK button and service A will overwrite the old values ​​with the new payment amount and openid (overwrite the corresponding data in Redis).

[0101] When the tester clicks the Add button, a new configuration request will be triggered to service A (the service provided by the present invention can be independently deployed in other servers). After receiving the request, service A executes the following logic:

[0102] (1) Determine whether the newly configured target application has been mounted for monitoring. The determination method is to try to read the monitoring identifier representing the target application in the Redis cache (such as get monitor:kcard-charge). If the value can be read, it means that the target application has been mounted for monitoring, and then continue to execute (3); if the value cannot be read, it means that the target application has not been mounted for monitoring, and then continue to execute (2);

[0103] (2) Execute remote commands to mount a monitor for the newly configured target application, and save the monitor flag representing the target application to Redis after the monitor is successfully mounted (such as set monitor:kcard-charge 1). The command is . / sandbox.sh-p 1-d'service-monitor / startMonit', where 1 is the process of the application under test, which is obtained by executing the command ps-ef|grep-i kcard-charge|awk'{print$2}' (kcard-charge is the name of the application under test, in Figure 3page); sandbox.sh is the mount monitoring command of the jvm-sandbox installed in advance on the server where the application under test is located; jvm-sandbox is a jvm-based process monitoring tool that can monitor the java process (i.e., application process) in the jvm. Similar tools include trace, arthas, etc. Therefore, if jvm-sandbox is not used, other monitoring tools can also be used to achieve the purpose of the present invention; service-monitor / startMonit is the name of the monitoring logic implementation package provided by the present invention, and the implementation logic is as follows:

[0104] (a) Monitor all internal methods in the target application. When a method is called, the logic of (b) is triggered before the method is executed.

[0105] It should be noted that since there may be more than one method in the target application that affects the order amount, it is more flexible to monitor all internal methods in the target application.

[0106] (b) Determine whether the method and the application name belong to Figure 4 If the packaged order method + application name is found, execute (c); if not, no intervention is required;

[0107] (c) Determine whether the value of the parameter at the specified position in each parameter of the method is the same as the value of the configured openid. The specified position here is given during configuration (such as 3:0Q23ew75T9B941CK7cXyR6G1F53e, the 3 before the colon : indicates the position of the third parameter). If they are the same, execute (d); if they are different, no intervention is required. It should be noted that in the WeChat applet, the openid is used to uniquely represent the user currently logged in to the WeChat applet. When requesting the WeChat payment system to create an order interface, the openid must also be used as one of the parameters to indicate which user to create a payment order for. Therefore, in the order placement method encapsulated by the application, the openid is also a required parameter.

[0108] (d) Replace the value of the parameter at the specified position in each parameter of this method with the value of the configured payment amount. The specified position here is also given during configuration (e.g., in 2:0.01, the 2 before the colon : indicates the position of the second parameter). At this point, the payment amount notified to the WeChat payment system can be changed to a smaller amount (e.g., 0.01), so that the amount used by the subsequent user to pay is the modified amount.

[0109] It should be noted that service A is a service provided by the present invention and can be independently deployed in other servers. The main functions of service A include: responding to the configuration of the tester on the page, processing and saving the data; executing the mount monitoring command of the target application (such as the business system) by means of remote commands; and, after the mount monitoring is successfully executed, the actual monitoring processing logic is executed in the target application (such as the business system background).

[0110] (3) Determine whether the newly configured application name + packaged order method already exists Figure 4 If the configuration list data already exists, a pop-up window will pop up saying "This method has been configured and cannot be added repeatedly" (such as Figure 6 If it does not exist, the new configuration is successfully added, and service A saves the configuration information to Figure 4 Configuration list data (stored in Redis).

[0111] 3. After the test is completed, the tester can click the delete button to delete the corresponding configuration. After deletion, the payment amount of the relevant user will be restored to the normal amount.

[0112] Specifically, when the tester clicks the delete button, service A will delete the data corresponding to the deleted configuration line from Redis. After being deleted, the corresponding application name + encapsulated order method will not be captured by the service-monitor / startMonit monitoring logic, so the payment amount will be restored to the actual amount.

[0113] It should be noted that the payment service verification method of the WeChat applet provided by the present invention can easily meet the testing requirements of different amounts by simply configuring the amount, so that testers can test at a lower cost when verifying various payment service scenarios (successful payment or failed payment scenarios) without affecting the order payment data of other real users, thereby improving the user's payment experience.

[0114] The payment service verification method of the WeChat applet provided by the embodiment of the present invention first receives the configuration information input by the tester, wherein the configuration information includes the application name, the encapsulated order method, the payment amount and the digital identity recognition framework openid, wherein the application name refers to the name of the target application that implements the WeChat applet payment service function, and the encapsulated order method refers to the method in which the WeChat applet payment function is encapsulated in the target application; then the configuration information is added according to the tester's new instructions; finally, when the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information. The present invention can dynamically modify the order payment amount for a specified user (for example, change 50 yuan to 0.01 yuan), and will not affect the order payment data of other real users (other users are still 50 yuan), thereby helping the tester to complete the verification of multiple payment scenarios at a very low cost. The problem of high verification cost in the existing WeChat applet payment service verification method is solved.

[0115] Embodiment 2:

[0116] like Figure 7 As shown, this embodiment provides a payment service verification device for a WeChat applet, which is used to execute the payment service verification method for the WeChat applet, including:

[0117] The configuration information receiving module 11 is used to receive the configuration information input by the tester, wherein the configuration information includes the application name, the encapsulated order method, the payment amount and the digital identity recognition framework openid, wherein the application name refers to the name of the target application that implements the WeChat applet payment service function, and the encapsulated order method refers to the method in which the WeChat applet payment function is encapsulated in the target application;

[0118] A configuration information adding module 12, connected to the configuration information receiving module 11, for adding the configuration information according to the new instructions of the tester;

[0119] The payment service verification module 13 is connected to the configuration information adding module 12, and is used for when the user corresponding to the openid initiates payment through the encapsulated ordering method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

[0120] Optionally, the configuration information adding module 12 specifically includes:

[0121] A mount monitoring judgment unit, used to judge whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester;

[0122] A configuration information determination unit, configured to determine whether there is configuration information including the application name and the encapsulated ordering method in the pre-stored configuration list data in response to the target application being mounted and monitored;

[0123] The configuration information adding unit is used to add the configuration information in the configuration list data if the configuration information including the application name and the encapsulated order method does not exist in the configuration list data, and save the configuration information in the remote dictionary service Redis cache.

[0124] Optionally, the mounting monitoring judgment unit is specifically used to:

[0125] An attempt is made to read the monitoring identifier representing the target application in the Redis cache. If the monitoring identifier can be read, it is determined that the target application has been mounted for monitoring. Otherwise, it is determined that the target application has not been mounted for monitoring.

[0126] Optionally, the device further comprises:

[0127] The mounting monitoring operation module is used to execute the mounting monitoring operation on the target application through a remote command in response to the target application not being mounted and monitored, and save the monitoring identifier representing the target application into the Redis cache after the mounting and monitoring is successful.

[0128] Optionally, the step of mounting and monitoring the target application includes:

[0129] Monitor all internal methods within the target application;

[0130] When a method is called, determine whether the method and the corresponding application name match the application name and the encapsulated order method in a configuration information in the configured list data; if they match, further determine whether the parameter value at the first specified position in the encapsulated order method is the same as the corresponding value in the openid;

[0131] In response to the parameter value at the first designated position in the encapsulated order placement method being the same as the corresponding value in the openid, the parameter value at the second designated position in the encapsulated order placement method is modified to be the corresponding value in the payment amount.

[0132] Optionally, the device further comprises:

[0133] The editing module is used to modify the payment amount and / or openid in the configuration information according to the editing instructions of the tester, and update the configuration list data.

[0134] Optionally, the device further comprises:

[0135] The deletion module is used to delete the configuration list data and the configuration information in the Redis cache according to the deletion instruction of the tester.

[0136] Embodiment 3:

[0137] refer to Figure 8 This embodiment provides a payment service verification device for a WeChat applet, including a memory 21 and a processor 22. The memory 21 stores a computer program, and the processor 22 is configured to run the computer program to execute the payment service verification method for the WeChat applet in Example 1.

[0138] The memory 21 is connected to the processor 22. The memory 21 may be a flash memory, a read-only memory or other memory. The processor 22 may be a central processing unit or a single-chip microcomputer.

[0139] Embodiment 4:

[0140] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the payment service verification method of the WeChat applet in the above-mentioned embodiment 1 is implemented.

[0141] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0142] In summary, the payment service verification method, device and medium of the WeChat applet provided by the embodiment of the present invention first receive the configuration information input by the tester, wherein the configuration information includes the application name, the encapsulated order method, the payment amount and the digital identity recognition framework openid, wherein the application name refers to the name of the target application that implements the WeChat applet payment service function, and the encapsulated order method refers to the method in which the WeChat applet payment function is encapsulated in the target application; then the configuration information is added according to the tester's new instructions; finally, when the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information. The present invention can dynamically modify the order payment amount for a specified user (for example, change 50 yuan to 0.01 yuan), and will not affect the order payment data of other real users (other users are still 50 yuan), thereby helping the tester to complete the verification of multiple payment scenarios at a very low cost. The problem of high verification cost in the existing WeChat applet payment service verification method is solved.

[0143] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A payment service verification method for a WeChat applet, characterized in that: The method comprises: Receive configuration information entered by the tester, including the application name, encapsulated order method, payment amount, and digital identity recognition framework OpenID. The application name refers to the name of the target application that implements the WeChat Mini Program payment service function, and the encapsulated order method refers to the method in the target application that encapsulates the WeChat Mini Program payment function; Add the configuration information according to the tester's new instructions; When the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

2. The method according to claim 1, characterized in that The configuration information is added according to the tester's new instructions, specifically including: Determine whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester; In response to the target application being mounted and monitored, determining whether configuration information including the application name and the packaged order method exists in pre-stored configuration list data; If the configuration information including the application name and the packaged order method does not exist in the configuration list data, the configuration information is added to the configuration list data, and the configuration information is saved in the remote dictionary service Redis cache.

3. The method according to claim 2, characterized in that The step of determining whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester specifically includes: Attempt to read the listening identifier representing the target application in the Redis cache; If the monitoring identifier can be read, it is determined that the target application has been mounted for monitoring; otherwise, it is determined that the target application has not been mounted for monitoring.

4. The method according to claim 2, characterized in that After determining whether the target application corresponding to the application name in the configuration information has been mounted and monitored according to the newly added instruction of the tester, the method further includes: In response to the target application not being mounted as a monitor, a mount monitor operation is performed on the target application through a remote command, and after the mount monitor is successfully performed, a monitor identifier representing the target application is saved in the Redis cache.

5. The method according to claim 2, characterized in that The step of mounting and monitoring the target application includes: Monitor all internal methods within the target application; When a method is called, determine whether the method and the corresponding application name match the application name and encapsulated order method in a configuration information in the configured list data. If they match, further determine whether the parameter value in the first specified position in the encapsulated order method is the same as the corresponding value in the openid; In response to the parameter value in the first designated position in the encapsulated order placement method being the same as the corresponding value in the openid, the parameter value in the second designated position in the encapsulated order placement method is modified to the corresponding value in the payment amount.

6. The method according to claim 2, characterized in that After adding the configuration information according to the tester's new instruction, the method further includes: The payment amount and / or openid in the configuration information are modified according to the tester's editing instructions, and the configuration list data is updated.

7. The method according to claim 2, characterized in that After adding the configuration information according to the tester's new instruction, the method further includes: Delete the configuration list data and the configuration information in the Redis cache according to the tester's deletion instruction.

8. A payment service verification device for a WeChat applet, characterized in that: The device comprises: A configuration information receiving module is used to receive configuration information input by the tester, including the application name, the encapsulated order method, the payment amount, and the digital identity recognition framework OpenID. The application name refers to the name of the target application that implements the WeChat Mini Program payment service function, and the encapsulated order method refers to the method in the target application that encapsulates the WeChat Mini Program payment function; A configuration information adding module, connected to the configuration information receiving module, for adding the configuration information according to the new instructions of the tester; The payment service verification module is connected to the configuration information adding module and is used to verify that when the user corresponding to the openid initiates payment through the encapsulated order method in the target application, the payment amount to be paid is the payment amount in the configuration information, so that the user pays according to the payment amount in the configuration information.

9. A payment service verification device for a WeChat applet, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to implement the payment service verification method of the WeChat applet as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the payment service verification method of the WeChat mini program according to any one of claims 1 to 7.