CN112418835A - Method and related device for testing online bank payment process - Google Patents

Method and related device for testing online bank payment process Download PDF

Info

Publication number
CN112418835A
CN112418835A CN201910774600.6A CN201910774600A CN112418835A CN 112418835 A CN112418835 A CN 112418835A CN 201910774600 A CN201910774600 A CN 201910774600A CN 112418835 A CN112418835 A CN 112418835A
Authority
CN
China
Prior art keywords
payment
information
online
bank
page
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.)
Pending
Application number
CN201910774600.6A
Other languages
Chinese (zh)
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910774600.6A priority Critical patent/CN112418835A/en
Publication of CN112418835A publication Critical patent/CN112418835A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • 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/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/108Remote banking, e.g. home banking
    • 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/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/405Establishing or using transaction specific rules

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method and a related device for testing an online bank payment process, which can test the online bank payment process of a third party payment platform so as to ensure the stability and the safety of the third party payment platform. The method comprises the following steps: acquiring an online bank payment test case corresponding to a preset bank, wherein the online bank payment test case is used for indicating a third party payment platform to simulate online bank payment; acquiring a first jump uniform resource locator and payment information generated after the third party payment platform executes the online bank payment test case, wherein the payment information comprises payment amount; generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information; acquiring an online bank payment page of the preset bank according to the first request; and verifying according to the online bank payment page and the payment information.

Description

Method and related device for testing online bank payment process
Technical Field
The application relates to the technical field of software testing, in particular to a method and a related device for testing an online bank payment process.
Background
The online bank payment, namely the online bank payment, is an instant account transaction. The online bank payment is one of the most mature online payment functions, is also a preferred mode of online payment for netizens, and is one of the indispensable functions of providing online transaction service for domestic electronic commerce enterprises. The method is characterized in that the bank card needs to open the online bank payment function in advance, and the information of the bank card is input and the payment password is verified on the online bank page of the bank completely during payment, so that the method has the characteristics of stability, easiness in use, safety and reliability. Based on the characteristics, the online banking payment is the primary choice for the netizens to pay.
With the development of online bank payment, some independent financial institutions develop a third-party payment platform, the third-party payment platform is connected with multiple banks in a butt joint mode, online people can log in the third-party payment platform to pay, in the payment process, the online bank page of the bank can be automatically jumped to, after payment is completed, the third-party payment platform is jumped back, and third-party payment is completed. The third party payment platform is connected with a plurality of banks in a butt joint mode, so that the practicability is high, and no matter which bank's online bank payment is used by an online citizen, the third party payment platform only needs to be logged in, and a specific bank website does not need to be found.
However, the third-party payment platform is added, so that the instability of online bank payment is increased, and in order to reduce the influence of the third-party payment platform on the online bank payment, the online bank payment process of the third-party payment platform needs to be tested in advance to ensure the stability and the safety of the third-party payment platform.
Therefore, a method for testing the online bank payment process is needed.
Disclosure of Invention
The embodiment of the application provides a method and a related device for testing an online bank payment process, which can test the online bank payment process of a third-party payment platform so as to ensure the stability and the safety of the third-party payment platform.
In view of this, a first aspect of the embodiments of the present application provides a method for testing an online bank payment process, including:
acquiring an online bank payment test case corresponding to a preset bank, wherein the online bank payment test case is used for indicating a third party payment platform to simulate online bank payment;
acquiring a first jump uniform resource locator and payment information generated after the third party payment platform executes the online bank payment test case, wherein the payment information comprises payment amount;
generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information;
acquiring an online bank payment page of the preset bank according to the first request;
and verifying according to the online bank payment page and the payment information.
In a first implementation manner of the first aspect of the embodiment of the present application, the obtaining, according to the first request, an online banking payment page of the preset bank includes:
accessing the online banking system of the preset bank according to the first request;
crawling a first access page of the online banking system;
and if the first access page does not comprise first jump information, determining the first access page as the online bank payment page, wherein the first jump information comprises a second jump uniform resource locator.
A second aspect of the embodiments of the present application provides a device for testing an online bank payment process, including:
the system comprises a first acquisition unit, a second acquisition unit and a third party payment platform, wherein the first acquisition unit is used for acquiring an online bank payment test case corresponding to a preset bank, and the online bank payment test case is used for indicating the third party payment platform to simulate online bank payment;
the second acquisition unit is used for acquiring a first jump uniform resource locator and payment information generated after the third-party payment platform executes the online bank payment test case, and the payment information comprises payment amount;
the first generating unit is used for generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information;
a third obtaining unit, configured to obtain, according to the first request, an online banking payment page of the preset bank;
and the payment information verification unit is used for verifying according to the online bank payment page and the payment information.
In a first implementation manner of the second aspect of the embodiment of the present application, the third obtaining unit is configured to:
accessing the online banking system of the preset bank according to the first request;
crawling a first access page of the online banking system;
and if the first access page does not comprise first jump information, determining the first access page as the online bank payment page, wherein the first jump information comprises a second jump uniform resource locator.
In a second implementation manner of the second aspect of the embodiment of the present application, the first generating unit is further configured to generate, when the first access page includes the first skip information, a second request meeting a preset request format according to the first skip information;
the third obtaining unit is further configured to:
accessing the online banking system of the preset bank according to the second request;
crawling a second access page of the online banking system;
and if the second access page does not contain second jump information, determining the second access page as the online bank payment page, wherein the second jump information comprises a third jump uniform resource locator.
In a third implementation manner of the second aspect of the embodiment of the present application, the payment information verification unit is configured to:
identifying page information of the online bank payment page at a preset position;
if the page information is consistent with the payment information, the verification is successful;
and if the page information is inconsistent with the payment information, the verification fails.
In a fourth implementation manner of the second aspect of the embodiment of the present application, the apparatus further includes:
the fourth acquisition unit is used for acquiring a first successful payment log which is generated by the third-party payment platform in the actual online bank payment process and corresponds to a preset callback test case identifier;
a fifth obtaining unit, configured to obtain callback information from the first payment success log;
and the callback verification unit is used for sending the callback information to a callback interface so as to verify the callback process.
In a fifth implementation manner of the second aspect of the embodiment of the present application, the fourth obtaining unit is configured to:
determining a current time;
determining a first time according to the current time and a preset period, wherein the first time is earlier than the current time, and the time interval between the first time and the current time is a preset period;
acquiring all second payment success logs generated between the first time and the current time in the actual online bank payment process of the third-party payment platform;
determining the first time as a current time;
and repeating the steps until all the second payment success logs contain the first payment success log.
In a sixth implementation manner of the second aspect of the embodiment of the present application, the apparatus further includes an encryption unit, configured to encrypt the payment information after obtaining a first jump uniform resource locator and payment information that are generated after the third-party payment platform executes the online banking payment test case, before generating a first request that satisfies a preset request format according to the first jump uniform resource locator and the payment information.
A third aspect of an embodiment of the present application provides a terminal device, including: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is configured to execute a program in the memory to perform the method according to any one of the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method according to any one of the first aspect of embodiments of the present application.
According to the technical scheme, the embodiment of the application has the following advantages:
acquiring an online bank payment test case corresponding to a preset bank, wherein the online bank payment test case is used for indicating a third party payment platform to simulate online bank payment; acquiring a first jump uniform resource locator and payment information generated after a third party payment platform executes an online bank payment test case, wherein the payment information comprises payment amount; generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information; acquiring an online bank payment page of a preset bank according to the first request; verifying according to the online bank payment page and the payment information;
through carrying out above-mentioned step, can test third party payment platform's online bank payment flow to guarantee third party payment platform's stability and security, and this test procedure can be regularly gone on, in order to realize the periodic test to online bank payment flow, whole test procedure does not rely on the manual work, and accuracy and efficiency are higher.
Drawings
Fig. 1 is a schematic diagram of an architecture of an online bank payment system in an embodiment of the present application;
fig. 2 is a schematic diagram of an embodiment of a method for testing an online bank payment process according to an embodiment of the present application;
fig. 3 is a schematic diagram of an embodiment of obtaining an online banking payment page in an embodiment of the present application;
fig. 4 is a schematic diagram of an embodiment of verification performed according to an online banking payment page and payment information in the embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment of testing a callback process in an embodiment of the present application;
FIG. 6 is a schematic diagram of an embodiment of obtaining a first payment success log in an embodiment of the present application;
fig. 7 is a schematic diagram illustrating an embodiment of a method for testing an online bank payment process according to an embodiment of the present application;
fig. 8 is a schematic diagram of an embodiment of a terminal device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and a related device for testing an online bank payment process, which can test the online bank payment process of a third-party payment platform so as to ensure the stability and the safety of the third-party payment platform.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that the method for testing the online bank payment process provided by the application can be applied to an online bank payment scenario, and particularly, can be applied to a scenario in which a user performs online bank payment through a third party payment platform.
Due to the existence of the third-party payment platform, the process of online bank payment is less complicated than that of the third-party payment platform, the process of online bank payment is also influenced by the third-party payment platform, the risk of online bank payment is increased, and therefore the third-party payment platform needs to be tested to ensure the stability and the safety of the third-party payment platform.
In order to solve the above problem, an embodiment of the present application provides a method for testing an online banking payment process, where the method may be applied to the online banking payment system shown in fig. 1, please refer to fig. 1, and fig. 1 is a schematic structural diagram of the online banking payment system in the embodiment of the present application. The online bank payment system comprises terminal equipment and a server, wherein the terminal equipment comprises but is not limited to a tablet computer, a notebook computer, a palm computer, a mobile phone and the like, and the terminal equipment is not limited herein. Specifically, the third party payment platform may be run on a terminal device, and the bank's online banking system may be run on a server. The user can log in a third-party payment platform running on the terminal equipment and interact with the online bank system to complete online bank payment.
The method for testing the online bank payment process can be applied to the terminal equipment, and tests a third party payment platform in the terminal equipment so as to ensure the stability and the safety of the third party payment platform.
For ease of understanding, the method for testing the internet banking payment process will be described in detail below.
In an embodiment, before step 101, a pre-configuration is further performed, and the configuration content may include: the online bank payment test case verification method comprises the steps of an address of an online bank payment test case, an identification of the online bank payment test case corresponding to a preset bank and a check mode of the preset bank, wherein the address of the online bank payment test case is used for calling the online bank payment test case, the identification of the online bank payment test case corresponding to the preset bank is used for identifying the online bank payment test case corresponding to the preset bank, the check mode of the preset bank is used for determining payment information needing to be verified, and the payment information corresponding to different check modes is different.
As shown in fig. 2, an embodiment of the method for testing an online bank payment process provided in the embodiment of the present application is illustrated. As shown in the drawings, an embodiment of the present application provides a method for testing an online bank payment process, including:
101, acquiring an online bank payment test case corresponding to a preset bank, wherein the online bank payment test case is used for indicating a third party payment platform to simulate online bank payment.
It should be noted that, different banks have different corresponding online bank payment test cases, so that the bank and the online bank payment test cases can be associated in advance, specifically, a method of adding an identifier can be adopted, the identifier can be a number, a letter or a Chinese character, for example, the short name of the bank can be used as the identifier of the online bank payment test case, and the online bank payment test case corresponding to the bank is queried through the short name of the bank.
In the embodiment of the application, the online bank payment test case is edited in advance, and after the online bank payment test case is obtained, the third party payment platform can execute the online bank payment test case, so that the online bank payment process is simulated. The third-party payment platform is not limited in type in the embodiment of the application.
102, acquiring a first jump uniform resource locator and payment information generated after the third-party payment platform executes the online bank payment test case, wherein the payment information comprises payment amount.
It can be understood that the first jump uniform resource locator is used for jumping to an online bank payment page of a bank, and the online bank payment test case is a process of simulating online bank payment, so that the third-party payment platform cannot really jump to the online bank payment page of the bank after executing the online bank payment test case, but can generate the first jump uniform resource locator and payment information.
The content of the payment information corresponds to the checking mode of the bank, and can comprise an order number of a third-party payment platform in addition to the payment fund, and also can comprise an order number sent to a preset bank by the third-party payment platform; for example, assuming that the third party payment platform completes three online bank payments in a past period of time, correspondingly, the third party payment platform generates three self order numbers, assuming that the three self order numbers are 1, 2 and 3, wherein the second online bank payment is completed with the preset bank for the first time, and therefore, the order number sent to the preset bank by the third party payment platform can be set to be 1. Therefore, the payment information may include the order number 2 of the third party payment platform itself, and may also include the order number 1 sent by the third party payment platform to the preset bank.
And 103, generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information.
It can be understood that, after the third-party payment platform executes the online bank payment test case, the third-party payment platform does not really jump to the online bank payment page of the bank, and therefore the online bank payment page needs to be acquired. According to the embodiment of the application, the online bank payment page is obtained according to the first request. The first request needs a certain format, so the request format can be preset, and then the first request is generated according to the request format. Specifically, the first request further includes a first skip same resource locator and payment information.
When the payment information includes the payment amount, step 103 is to generate a first request meeting a preset request format according to the first jump uniform resource locator and the payment amount;
when the payment information comprises the order number and the payment amount of the third party payment platform, step 103 is to generate a first request meeting a preset request format according to the first jump uniform resource locator, the order number and the payment amount of the third party payment platform;
when the payment information includes the order number and the payment amount sent by the third party payment platform to the preset bank, step 103 is to generate a first request meeting the preset request format according to the first jump uniform resource locator, the order number and the payment amount sent by the third party payment platform to the preset bank.
And 104, acquiring an online bank payment page of a preset bank according to the first request.
When the payment information in the first request comprises the payment amount, the corresponding online bank payment page also comprises the payment amount; when the payment information in the first request comprises the order number and the payment amount of the three-party payment platform, the corresponding online bank payment page also comprises the order number and the payment amount of the three-party payment platform; when the payment information in the first request includes the order number and the payment amount sent to the preset bank by the third-party payment platform, the corresponding online bank payment page also includes the order number and the payment amount sent to the preset bank by the third-party payment platform. There are various ways to obtain the online bank payment page according to the first request, which is not limited herein.
And 105, verifying according to the online bank payment page and the payment information.
It can be understood that, because the payment information corresponds to the preset bank, and the online bank payment page also corresponds to the preset bank, the online bank payment page should have information identical to the payment information; for example, assuming that the payment information includes a payment amount, an equal payment amount should also be included in the payment page; assuming that the payment information also includes the order number of the third party payment platform itself, the same order number should also be included in the payment page.
Therefore, the consistency of the online bank payment page and the payment information is verified, and the online bank payment process is verified.
In addition, it should be noted that, when the third-party payment platform and the preset bank are subjected to online bank payment through the steps, the online bank payment process at the third-party payment platform side is tested, and when the third-party payment platform is possibly connected with two or more banks, the steps are repeated, and detailed description is not specifically given.
In the embodiment of the application, the online bank payment process of the third party payment platform can be tested by executing the steps, so that the stability and the safety of the third party payment platform are ensured, the test process can be carried out regularly, the regular test of the online bank payment process is realized, the whole test process does not depend on manpower, and the accuracy and the efficiency are higher.
In another embodiment of the method for testing an online bank payment process provided in the embodiment of the present application, please refer to fig. 3, where fig. 3 is a schematic view of an embodiment of obtaining an online bank payment page in the embodiment of the present application, and as shown in the figure, obtaining an online bank payment page of a preset bank according to a first request includes:
and 201, accessing the internet bank system of the preset bank according to the first request.
It is understood that the online banking system may be directly accessed by the first request.
And 202, crawling a first access page of the internet bank system.
After the online banking system is accessed, a first access page can be obtained in a crawler crawling mode.
And 203, if the first access page does not comprise the first jump information, determining the first access page as an online bank payment page, wherein the first jump information comprises a second jump uniform resource locator.
It should be noted that the first access page may be an online banking payment page or may not be the online banking payment page, and the method for distinguishing whether the first access page is the online banking payment page in the embodiment of the application is to determine whether the first jump information exists on the first access page, and if the first jump information does not exist, it is determined that the first access page is the online banking payment page. The method for judging whether the first jump information exists on the first access page is to judge whether a second jump uniform resource locator exists on the first access page, when the second jump uniform resource locator exists on the first access page, the first jump information exists on the first access page, and when the second jump uniform resource locator does not exist on the first access page, the first jump information does not exist on the first access page.
In this embodiment of the present application, the second jump uniform resource locator may be the same as the first jump uniform resource locator or may be different from the first jump uniform resource locator, which is not limited in this embodiment of the present application.
Since there is a case where the first access page does not include the first jump information, in this embodiment, the method may further include:
and 204, if the first access page contains the first skip information, generating a second request meeting the preset request format according to the first skip information.
It is understood that the method for generating the second request is the same as the method for generating the first request, and the second request needs to be generated according to the payment information and the second jump uniform resource locator, and reference may be specifically made to the related description of the process for generating the first request in step 103.
And 205, accessing the internet bank system of the preset bank according to the second request.
It should be noted that the process of accessing the online banking system according to the second request is the same as the process of accessing the online banking system according to the first request, and specifically, refer to the description of the process of accessing the online banking system according to the first request in step 201.
And 206, crawling a second access page of the internet bank system.
The process of crawling the second access page of the online banking system is the same as the process of crawling the first access page of the online banking system, and reference may be specifically made to the related description of step 202.
And 207, if the second access page does not contain second jump information, determining the second access page as an online bank payment page, wherein the second jump information comprises a third jump uniform resource locator.
It can be understood that when the second jump information is not included in the second access page, the access page is the internet bank payment page. The method for judging whether the first access page has the second jump information is to judge whether the second access page has the third jump uniform resource locator, if so, the first access page has the second jump information, and if not, the second access page has no second jump information.
In practical application, in the process of jumping to the internet bank payment page, the third-party payment platform generally has at most one intermediate jump, because the second access page in the embodiment of the application is the internet bank payment page generally; and if the third-party payment platform has two or more intermediate jumps in the process of jumping to the online bank payment page, the steps can be repeatedly executed until the online bank payment page is obtained.
In another embodiment of the method for testing an online bank payment process provided in the embodiment of the present application, please refer to fig. 4, where fig. 4 is a schematic view of an embodiment of performing verification according to an online bank payment page and payment information in the embodiment of the present application, and as shown in the figure, performing verification according to the online bank payment page and payment information includes:
301, identifying page information of the online bank payment page at a preset position.
It can be understood that the crawled online bank payment page may include various information, because the embodiment of the present application needs to acquire specifically required page information, and specifically, the embodiment of the present application may identify the required page information by a method of presetting a position.
302, if the page information is consistent with the payment information, the verification is successful.
It can be understood that when the page information is consistent with the payment information, it indicates that the third party payment platform has no problem in the sub-internet bank transaction.
303, if the page information is inconsistent with the payment information, the verification fails.
It can be understood that when the page information is inconsistent with the payment information, it indicates that the sub-internet bank transaction is problematic, and then it is necessary to specifically confirm whether the third-party payment platform is problematic.
The above is the test performed on the previous part of the flow of the online bank payment, and besides, the online bank payment also includes a callback process, so the callback process needs to be tested.
In another embodiment of the method for testing an online banking payment process provided in the embodiment of the present application, please refer to fig. 5, where fig. 5 is a schematic diagram of an embodiment of testing a callback process in the embodiment of the present application, and as shown in the drawing, the method for testing an online banking payment process further includes:
401, obtaining a first successful payment log, which is generated by the third party payment platform in the actual online bank payment process and corresponds to a preset callback test case identifier.
It can be understood that the callback process can only be tested in the actual online bank payment process according to the third-party payment platform, so that the payment log of the third-party payment platform in the actual online bank payment process is obtained in the embodiment of the present application, and since callback test cases corresponding to different preset banks are different, a first successful payment log corresponding to the callback test case needs to be obtained.
And 402, obtaining callback information from the first payment success log.
It is understood that the first payment success log includes callback information, wherein the callback information includes payment information, and may include other required information, which is not limited thereto.
And 403, sending callback information to the callback interface to verify the callback process.
It should be noted that verifying the callback process is a relatively mature technique and therefore will not be described in detail here.
In the embodiment of the application, the callback process can be verified through the steps, so that the integrity and the usability of the whole online bank payment process function of the third-party payment platform side are guaranteed.
In another embodiment of the method for testing an online banking payment process provided in the embodiment of the present application, please refer to fig. 6, where fig. 6 is an exemplary illustration of an embodiment of obtaining a first successful payment log in the embodiment of the present application, and as shown in the figure, obtaining the first successful payment log corresponding to a preset callback test case identifier, where the first successful payment log is generated by a third-party payment platform in an actual online banking payment process, includes:
501, determining the current time.
It should be noted that, at the beginning, the current time may be the time for executing step 501, or the start time for testing the online bank payment process may not be used, which is not limited to this.
502, determining a first time according to a current time and a preset period.
It is understood that a corresponding period may be preset, and the second payment success log within one period is acquired at a time based on the current time, so that the first time is earlier than the current time, and the time interval between the first time and the current time is a preset period.
It is understood that the preset period can be adjusted according to actual needs.
And 503, acquiring all second payment success logs generated between the first time and the current time in the actual online bank payment process of the third-party payment platform.
It can be understood that, after the second payment success log is obtained, whether the first success log exists can be searched from the second payment success log.
The first time is determined 504 to be the current time.
In this embodiment of the application, after the second payment success log is obtained, the first time needs to be determined as the current time, so as to obtain the next second payment success log.
And repeating the steps until all the second payment success logs contain the first payment success log.
It can be understood that, in the embodiment of the present application, the first successful payment log may be included in the first obtained second successful payment log, when the first successful payment log is not included in the first obtained second successful payment log, the second obtaining needs to be performed, and the preset period may be different in each process of obtaining the second successful payment log.
In another embodiment of the method for testing an online banking payment flow provided in the embodiment of the present application, after obtaining a first jump uniform resource locator and payment information generated after a third party payment platform executes an online banking payment test case, before generating a first request satisfying a preset request format according to the first jump uniform resource locator and the payment information, the method for testing an online banking payment flow further includes:
and carrying out encryption processing on the payment information.
It can be understood that, in consideration of confidentiality and security of the online bank payment process, the embodiment of the application performs encryption processing on the payment information in the first request.
As shown in fig. 7, an embodiment of the apparatus for testing an online bank payment process provided in the embodiment of the present application is schematically illustrated. As shown in the figures, the embodiment of the present application provides a device for testing an online bank payment process, including:
the first obtaining unit 601 is configured to obtain an online bank payment test case corresponding to a preset bank, where the online bank payment test case is used for instructing a third party payment platform to simulate online bank payment;
a second obtaining unit 602, configured to obtain a first jump uniform resource locator and payment information that are generated after the third-party payment platform executes the online banking payment test case, where the payment information includes a payment amount;
a first generating unit 603, configured to generate a first request meeting a preset request format according to the first jump uniform resource locator and the payment information;
a third obtaining unit 604, configured to obtain an online banking payment page of a preset bank according to the first request;
and a payment information verification unit 605, configured to perform verification according to the online bank payment page and the payment information.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the third obtaining unit 604 is configured to:
accessing an online banking system of a preset bank according to the first request;
crawling a first access page of the online bank system;
and if the first access page does not comprise the first jump information, determining the first access page as an online bank payment page, wherein the first jump information comprises a second jump uniform resource locator.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the first generating unit 601 is further configured to generate a second request meeting a preset request format according to the first skip information when the first access page includes skip information;
the third obtaining unit 604 is further configured to:
accessing an online banking system of a preset bank according to the second request;
crawling a second access page of the online bank system;
and if the second access page does not contain second jump information, determining the second access page as an online bank payment page, wherein the second jump information comprises a third jump uniform resource locator.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the payment information verification unit 605 is configured to:
identifying page information of the online bank payment page at a preset position;
if the page information is consistent with the payment information, the verification is successful;
and if the page information is inconsistent with the payment information, the verification fails.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the apparatus for testing an online banking payment process further includes:
a fourth obtaining unit 606, configured to obtain a first successful payment log, which is generated by the third-party payment platform in an actual online banking payment process and corresponds to the preset callback test case identifier;
a fifth obtaining unit 607, configured to obtain callback information from the first successful payment log;
the callback verification unit 608 is configured to send callback information to the callback interface to verify the callback process.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the fourth obtaining unit 606 is configured to:
determining a current time;
determining a first time according to the current time and a preset period, wherein the first time is earlier than the current time, and the time interval between the first time and the current time is the preset period;
acquiring all second payment success logs generated between the first time and the current time in the actual online bank payment process of the third-party payment platform;
determining the first time as the current time;
and repeating the steps until all the second payment success logs contain the first payment success log.
In another embodiment of the apparatus for testing an online banking payment process provided in the embodiment of the present application, the apparatus for testing an online banking payment process further includes an encrypting unit 609, configured to encrypt the payment information before generating a first request meeting a preset request format according to a first jump uniform resource locator and the payment information after acquiring the first jump uniform resource locator and the payment information generated after the third-party payment platform executes an online banking payment test case.
Next, an embodiment of the present application further provides a terminal device, as shown in fig. 8, for convenience of description, only a part related to the embodiment of the present invention is shown, and details of the specific technology are not disclosed, please refer to the method part of the embodiment of the present invention. The attribute information display device may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer, and the like, taking the attribute information display device as the mobile phone as an example:
fig. 8 is a block diagram showing a partial structure of a cellular phone related to the attribute information presentation apparatus provided in the embodiment of the present invention. Referring to fig. 8, the handset includes: radio Frequency (RF) circuitry 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuitry 860, wireless fidelity (WiFi) module 870, processor 880, and power supply 890. Those skilled in the art will appreciate that the handset configuration shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following specifically describes each component of the mobile phone with reference to fig. 8:
the RF circuit 810 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for processing downlink information of a base station after receiving the downlink information to the processor 880; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 810 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 810 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 820 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 830 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 830 may include a touch panel 831 and other input devices 88. The touch panel 831, also referred to as a touch screen, can collect touch operations performed by a user on or near the touch panel 831 (e.g., operations performed by the user on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 831 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 880, and can receive and execute commands from the processor 880. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 830 may include other input devices 88 in addition to the touch panel 831. In particular, other input devices 88 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 840 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 840 may include a Display panel 841, and the Display panel 841 may be alternatively configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, touch panel 831 can overlay display panel 841, and when touch panel 831 detects a touch operation thereon or nearby, communicate to processor 880 to determine the type of touch event, and processor 880 can then provide a corresponding visual output on display panel 841 in accordance with the type of touch event. Although in fig. 8, the touch panel 831 and the display panel 841 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 850, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 841 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 841 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 860, speaker 861, microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts collected sound signals into electrical signals, which are received by the audio circuit 860 and converted into audio data, which are then processed by the audio data output processor 880 and transmitted to, for example, another cellular phone via the RF circuit 810, or output to the memory 820 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 870, and provides wireless broadband Internet access for the user. Although fig. 8 shows WiFi module 870, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 880 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby integrally monitoring the mobile phone. Alternatively, processor 880 may include one or more processing units; alternatively, the processor 880 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The phone also includes a power supply 890 (e.g., a battery) for powering the various components, optionally logically connected to the processor 880 via a power management system, so as to manage charging, discharging, and power consumption via the power management system.
Although not shown, the mobile phone may further include a camera module, a bluetooth module, etc., which will not be described herein.
In the embodiment of the present invention, the processor 880 included in the terminal device further has the function of the testing apparatus for the online bank payment process.
The embodiment of the present application further provides a computer-readable storage medium, which includes instructions, when the computer-readable storage medium runs on a computer, the computer is enabled to implement the functions of the testing device of the foregoing online bank payment process.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for testing an online bank payment process is characterized by comprising the following steps:
acquiring an online bank payment test case corresponding to a preset bank, wherein the online bank payment test case is used for indicating a third party payment platform to simulate online bank payment;
acquiring a first jump uniform resource locator and payment information generated after the third party payment platform executes the online bank payment test case, wherein the payment information comprises payment amount;
generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information;
acquiring an online bank payment page of the preset bank according to the first request;
and verifying according to the online bank payment page and the payment information.
2. The method according to claim 1, wherein the obtaining of the online bank payment page of the preset bank according to the first request comprises:
accessing the online banking system of the preset bank according to the first request;
crawling a first access page of the online banking system;
and if the first access page does not comprise first jump information, determining the first access page as the online bank payment page, wherein the first jump information comprises a second jump uniform resource locator.
3. The method of claim 2, further comprising:
if the first access page contains the first skip information, generating a second request meeting a preset request format according to the first skip information;
accessing the online banking system of the preset bank according to the second request;
crawling a second access page of the online banking system;
and if the second access page does not contain second jump information, determining the second access page as the online bank payment page, wherein the second jump information comprises a third jump uniform resource locator.
4. The method of any one of claims 1 to 3, wherein the verifying according to the online banking payment page and the payment information comprises:
identifying page information of the online bank payment page at a preset position;
if the page information is consistent with the payment information, the verification is successful;
and if the page information is inconsistent with the payment information, the verification fails.
5. The method of claim 1, further comprising:
acquiring a first successful payment log which is generated by the third-party payment platform in the actual online bank payment process and corresponds to a preset callback test case identifier;
obtaining callback information from the first payment success log;
and sending the callback information to a callback interface to verify the callback process.
6. The method according to claim 5, wherein the obtaining of the first successful payment log corresponding to the preset callback test case identifier, generated by the third party payment platform in the actual online banking payment process, comprises:
determining a current time;
determining a first time according to the current time and a preset period, wherein the first time is earlier than the current time, and the time interval between the first time and the current time is a preset period;
acquiring all second payment success logs generated between the first time and the current time in the actual online bank payment process of the third-party payment platform;
determining the first time as a current time;
and repeating the steps until all the second payment success logs contain the first payment success log.
7. The method as claimed in claim 1, wherein after obtaining a first jump uniform resource locator and payment information generated after the third party payment platform executes the online banking payment test case, before generating a first request satisfying a preset request format according to the first jump uniform resource locator and the payment information, the method further comprises:
and carrying out encryption processing on the payment information.
8. An apparatus for testing an online bank payment process, comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third party payment platform, wherein the first acquisition unit is used for acquiring an online bank payment test case corresponding to a preset bank, and the online bank payment test case is used for indicating the third party payment platform to simulate online bank payment;
the second acquisition unit is used for acquiring a first jump uniform resource locator and payment information generated after the third-party payment platform executes the online bank payment test case, and the payment information comprises payment amount;
the first generating unit is used for generating a first request meeting a preset request format according to the first jump uniform resource locator and the payment information;
a third obtaining unit, configured to obtain, according to the first request, an online banking payment page of the preset bank;
and the payment information verification unit is used for verifying according to the online bank payment page and the payment information.
9. A server, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is configured to execute a program in the memory to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 7.
CN201910774600.6A 2019-08-21 2019-08-21 Method and related device for testing online bank payment process Pending CN112418835A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910774600.6A CN112418835A (en) 2019-08-21 2019-08-21 Method and related device for testing online bank payment process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910774600.6A CN112418835A (en) 2019-08-21 2019-08-21 Method and related device for testing online bank payment process

Publications (1)

Publication Number Publication Date
CN112418835A true CN112418835A (en) 2021-02-26

Family

ID=74779962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910774600.6A Pending CN112418835A (en) 2019-08-21 2019-08-21 Method and related device for testing online bank payment process

Country Status (1)

Country Link
CN (1) CN112418835A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239300A (en) * 2021-04-21 2021-08-10 北京字跳网络技术有限公司 Data processing method and device 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
CN105786707A (en) * 2016-02-29 2016-07-20 腾讯科技(深圳)有限公司 Method and device for testing program
CN106354628A (en) * 2016-08-12 2017-01-25 北京小米移动软件有限公司 Payment app test method and device thereof
CN107368406A (en) * 2016-05-11 2017-11-21 阿里巴巴集团控股有限公司 The method, apparatus and equipment of test application program
CN108305055A (en) * 2017-10-20 2018-07-20 掌合天下(北京)信息技术有限公司 Pay 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
CN105786707A (en) * 2016-02-29 2016-07-20 腾讯科技(深圳)有限公司 Method and device for testing program
CN107368406A (en) * 2016-05-11 2017-11-21 阿里巴巴集团控股有限公司 The method, apparatus and equipment of test application program
CN106354628A (en) * 2016-08-12 2017-01-25 北京小米移动软件有限公司 Payment app test method and device thereof
CN108305055A (en) * 2017-10-20 2018-07-20 掌合天下(北京)信息技术有限公司 Pay test method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239300A (en) * 2021-04-21 2021-08-10 北京字跳网络技术有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN107480533B (en) Vulnerability repairing method and device and storage medium
CN108345543B (en) Data processing method, device, equipment and storage medium
US20150302215A1 (en) Sensitive operation verification method, terminal device, server, and verification system
CN104852885B (en) Method, device and system for verifying verification code
CN108156508B (en) Barrage information processing method and device, mobile terminal, server and system
WO2018049893A1 (en) Data transmission method and terminal device
CN106341809B (en) A kind of data transmission method and equipment
CN109451130B (en) Mobile terminal testing method and device, mobile terminal and storage medium
CN110378107B (en) Method and related device for detecting installation package
CN105373237A (en) Data input method and terminal
CN108615158B (en) Risk detection method and device, mobile terminal and storage medium
CN104363590A (en) Access point connection method and device
CN115904950A (en) Test case generation method, device, equipment and storage medium
CN110069407B (en) Function test method and device for application program
CN104573437A (en) Information authentication method, device and terminal
CN106708555B (en) A kind of method and apparatus loading plug-in unit
CN111209031A (en) Data acquisition method and device, terminal equipment and storage medium
CN112749074A (en) Test case recommendation method and device
CN107506628B (en) Biometric identification method and related product
CN108462580B (en) Numerical value transferring method and device
CN110430252B (en) Resource data processing method and device, equipment and readable storage medium
CN111177612B (en) Page login authentication method and related device
CN112418835A (en) Method and related device for testing online bank payment process
CN107038414A (en) A kind of fingerprint template synchronous method and equipment
CN106067002B (en) A kind of finger print information processing method and user terminal

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