CN112232794A - Payment method and device, storage medium and electronic equipment - Google Patents

Payment method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112232794A
CN112232794A CN202010956192.9A CN202010956192A CN112232794A CN 112232794 A CN112232794 A CN 112232794A CN 202010956192 A CN202010956192 A CN 202010956192A CN 112232794 A CN112232794 A CN 112232794A
Authority
CN
China
Prior art keywords
payment
environment
page
parameters
interface
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
CN202010956192.9A
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.)
Weimin Insurance Agency Co Ltd
Original Assignee
Weimin Insurance Agency 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 Weimin Insurance Agency Co Ltd filed Critical Weimin Insurance Agency Co Ltd
Priority to CN202010956192.9A priority Critical patent/CN112232794A/en
Publication of CN112232794A publication Critical patent/CN112232794A/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses a payment method and device, a storage medium and electronic equipment, and belongs to the field of computers. Wherein, the method comprises the following steps: obtaining payment request information of a payment page, wherein the payment request information comprises payment parameters and payment environment parameters; identifying a payment environment of the payment page according to the payment environment parameter, wherein the payment environment is used for representing a page browsing type of the payment page; and calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface. The technical problem of the code redundancy of the payment script in the related technology is solved, one set of payment script can finish payment operation in a plurality of different payment environments, the access cost is reduced for the business accessing the payment requirement, the development efficiency is improved, and a plurality of environment payment problems are shielded.

Description

Payment method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a payment method and apparatus, a storage medium, and an electronic device.
Background
In the related art, online payment is a payment form using the internet as a payment medium, and common online payment means include WeChat payment, Paibao, and the like.
In the related art, one payment tool can access to multiple channels, such as payment channels of WeChat payment and WeChat program connection, WeChat public number payment, external h5 webpage and the like, in order for a business party to support payment requests from multiple channels, payment codes of multiple channels need to be individually connected to business codes, so that the parameters are multiple, and the flow is long. The service interface including the payment function needs to add code scripts of a plurality of channels, a service party interfaces a WeChat payment scheme of a specific channel according to the environment to which the service party belongs, different scenes are respectively interfaced, and finally the WeChat payment technical scheme is called, so that code redundancy is caused, and related problems of incomplete processing of different environments are easily caused.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the application provides a payment method and device, a storage medium and an electronic device.
According to an aspect of an embodiment of the present application, there is provided a payment method including: obtaining payment request information of a payment page, wherein the payment request information comprises payment parameters and payment environment parameters; identifying a payment environment of the payment page according to the payment environment parameter, wherein the payment environment is used for representing a page browsing type of the payment page; and calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface.
According to another aspect of the embodiments of the present application, there is also provided a payment apparatus, including: the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring payment request information of a payment page, and the payment request information comprises payment parameters and payment environment parameters; the identification module is used for identifying the payment environment of the payment page according to the payment environment parameters, wherein the payment environment is used for representing the page browsing type of the payment page; and the calling module is used for calling a payment interface matched with the payment environment and finishing payment operation based on the payment parameters by using the payment interface.
Further, the identification module includes: the reading unit is used for reading a User Agent (UA) character string of the browser from the payment environment parameter; a determining unit, configured to determine that a payment environment of the payment page is an internal H5 environment if the UA character string includes a specified field; and if the UA character string does not contain the designated field, determining that the payment environment of the payment page is an external H5 environment.
Further, the determination unit includes: the reading subunit is used for reading the environment variable characters of the browser from the payment environment parameters; the judging subunit is used for judging whether the environment variable character is a designated character; a determining subunit, configured to determine, if the environment variable character is a designated character, that a payment environment of the payment page is a first internal H5 environment; and if the environment variable character is not the designated character, determining that the payment environment of the payment page is a second internal H5 environment.
Further, the calling module comprises: the payment system comprises a first calling unit, a second calling unit and a payment processing unit, wherein the first calling unit is used for calling a first payment interface of a payment program through a JSSDK toolkit if the payment environment is a public number H5 page inside the program, and the JSSDK toolkit is a webpage development toolkit which is provided for a webpage developer and is based on the webpage in the payment program; and the first sending unit is used for sending the payment parameters to a payment server through the first payment interface so as to finish payment operation.
Further, the calling module comprises: the skip unit is used for skipping from the payment page to a subprogram payment page if the payment environment is a subprogram H5 page of a payment program; the second calling unit is used for calling a second payment interface of the subprogram payment page; and the second sending unit is used for sending the payment parameters to a payment server through the second payment interface so as to complete payment operation.
Further, the calling module comprises: a notification unit, configured to notify a payment receiving side of the payment page to issue a payment order to a payment program if the payment environment is an H5 page of a third-party program, so that the payment program generates a jump link of a payment middle page corresponding to the payment order; the access unit is used for accessing the jump link and jumping from the payment page to a payment middle page of the program; and the third sending unit is used for finishing payment operation through a third payment interface of the payment middle page.
Further, the apparatus further comprises: the generating module is used for responding to feedback information used for indicating payment completion after the calling module completes payment operation based on the payment parameters by using the payment interface and generating a payment result page according to a preset instruction; and the skipping module is used for skipping from the current page to the payment result page.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The computer instructions are read by a processor of the computer device from the computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the method provided in the payment method described above.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
in the embodiment of the application, the payment interface matched with the payment environment is called according to the payment environment parameters of the payment page, the payment operation of a plurality of payment environments can be adapted based on one set of payment script, the defect that a plurality of payment scripts are deployed in service codes is avoided, the technical problem of code redundancy of the payment scripts in the related technology is solved, the payment operation can be completed in a plurality of different payment environments by one set of payment script, the access cost is reduced for accessing the service with payment requirements, the development efficiency is improved, and a lot of environment payment problems are shielded.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow diagram of a payment method according to an embodiment of the present invention;
FIG. 2 is a payment schematic of an embodiment of the present invention;
FIG. 3 is a flow diagram of a payment policy of an embodiment of the present invention;
fig. 4 is a block diagram of a payment apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments, and the illustrative embodiments and descriptions thereof of the present application are used for explaining the present application and do not constitute a limitation to the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the present embodiment, a payment method is provided, and fig. 1 is a flowchart of a payment method according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, obtaining payment request information of a payment page, wherein the payment request information comprises payment parameters and payment environment parameters;
the payment page of the embodiment is a transfer page after the payment operation is started, and is used for requesting the payment server to settle accounts.
Step S104, identifying a payment environment of the payment page according to the payment environment parameters, wherein the payment environment is used for representing the page browsing type of the payment page;
the payment environment parameter of the embodiment carries identification information used for representing the payment environment, the payment environment where the current payment page is located can be identified by detecting the identification information, the payment environment corresponds to the page browsing type of the browser, and payment interfaces called by different types of browsers in the payment process are different.
And step S106, calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface.
In the application scenario of this embodiment, the payment program is used as an online payment tool, in order to adapt to multiple payment environments, each payment environment corresponds to one payment interface, and by calling the payment interface corresponding to the payment environment, the payment program can be connected to the payment server from the current payment page and communicate with the server to complete payment operation.
Through the steps, the payment request information of the payment page is obtained, the payment environment of the payment page is identified according to the payment environment parameters, the payment interface matched with the payment environment is called finally, the payment interface is used for completing payment operation based on the payment parameters, the payment interface matched with the payment environment is called according to the payment environment parameters of the payment page, the payment operation of a plurality of payment environments can be adapted based on one set of payment script, the defect that a plurality of payment scripts are deployed in service codes is overcome, the technical problem of code redundancy of the payment scripts in the related technology is solved, the payment operation can be completed in a plurality of different payment environments by one set of payment script, the access cost is reduced for accessing the service of payment demands, the development efficiency is improved, and a plurality of environment payment problems are shielded.
In one embodiment of this embodiment, the payment environment is identified by an identification field in the payment environment parameter, which is agreed in advance. Different payment instruments (such as a payment instrument, WeChat payment and the like) have different corresponding identification fields. Identifying the payment environment of the payment page according to the payment environment parameters includes:
s11, reading UA (User Agent) character strings of the browser from the payment environment parameters;
the UA character string is a special network protocol used by application programs such as a client browser and the like, HTTP requests are accessed in the browser every time, and the accessed terminal can identify the page browsing type used by a user through the UA character string.
S12, judging whether the UA character string contains a designated field;
explaining by taking a payment tool as an example of WeChat payment, in one example, the specified field is a micro message field, and whether the UA character string contains a field of 'micro message' is judged by traversing and detecting all fields in the UA character string or detecting the UA character string at a specified position;
s13, if the UA character string contains the designated field, determining that the payment environment of the payment page is an internal H5 environment; and if the UA character string does not contain the specified field, determining that the payment environment of the payment page is an external H5 environment.
In this embodiment, the external H5 environment is a browser environment without integrated payment tools, such as an H5 environment of a browser (i.e., a third-party browser) other than a WeChat, and H5, i.e., HTML5, of this embodiment is a language description manner for constructing Web content in a browser or an application program, and of course, may be applied to other language environments besides H5.
In some implementation scenarios, the payment program of the payment instrument (e.g. wechat payment, pay pal payment, etc.) includes multiple internal payment interfaces for triggering in internal programs of the payment program (e.g. wechat public number, applet, etc. in wechat, life number in pay pal, etc.), and the payment program may be applied in multiple internal H5 environments, where each internal H5 environment corresponds to one payment interface, and in this case, it may further determine which internal H5 environment is.
In one implementation of this embodiment, determining that the payment context of the payment page is an internal H5 context includes: reading an environment variable character of the browser from the payment environment parameter; judging whether the environment variable character is a designated character or not; if the environment variable characters are designated characters, determining that the payment environment of the payment page is a first internal H5 environment; if the environment variable character is not the designated character, determining the payment environment of the payment page to be the second internal H5 environment.
Taking the payment program as an example of the wechat payment, when the environment variable character of the browser is read from the payment environment parameter, the window __ wxjs.environment character is read from the payment environment parameter, and the value is further determined, if the window __ wxjs.environment is 'miniprogam', the window is the H5 environment of the wechat program, otherwise, the window is the H5 environment of the wechat public number, wherein the miniprogam character is a pre-agreed character, of course, the H5 environment of the wechat public number may be agreed with other characters, and similarly, other internal H5 environments may be agreed with other characters, such as the internal H5 environment of the wechat small program.
The payment environment of this embodiment includes inside payment environment and outside payment environment, in the payment environment of difference, triggers different payment interfaces, and then carries out different payment processes through payment interface, explains the payment process among three kinds of payment environments in detail below:
in one example, invoking a payment interface that matches the payment environment and using the payment interface to complete a payment operation based on payment parameters includes: if the payment environment is a public number H5 page in the program, calling a first payment interface of the payment program through a JSSDK toolkit, wherein the JSSDK toolkit is a webpage development toolkit which is provided for a webpage developer and is based on the payment program; and sending the payment parameters to the payment server through the first payment interface so as to complete the payment operation.
By using the WeChat JSSDK, a webpage developer can efficiently use the capabilities of mobile phone systems such as photographing, picture selection, voice, position and the like by means of the WeChat, and can directly use the specific capabilities of the WeChat such as WeChat sharing, scanning, card voucher, payment and the like, so that higher-quality webpage experience is provided for the WeChat user, and the JSSK is called as payment capability in the embodiment.
Optionally, the payment parameters include a timestamp, a nonce, a package, a signype, and a paysign, which are respectively a payment signature timestamp, a payment signature random string, a prep _ id returned by the unified payment interface, a signature mode, and payment signature content. And the payment parameters are used for checking the legality of the payment operation, and if the payment operation is legal, account information such as a payment account, a collection account, payment amount, time and the like is sent to the payment server so that the payment server completes account transfer.
In another example, invoking a payment interface that matches the payment environment and completing a payment operation based on payment parameters using the payment interface includes: if the payment environment is a subprogram H5 page of the payment program, jumping from the payment page to a subprogram payment page; calling a second payment interface of the subprogram payment page; and sending the payment parameters to the payment server through the second payment interface so as to complete the payment operation.
In this example, the sub-program is a program embedded in the payment program, and can be separately started and run in the payment program, such as a WeChat applet, and the like, and the payment parameters are the same as those of the public number H5 page, including timemap, noncestr, package, signtype, paysign. The payment parameters are sent to the payment server firstly, the validity of the current payment operation is checked, if the current payment operation is legal, account information such as a payment account, a collection account, payment amount and time is sent to the payment server, and therefore the payment server can complete account transfer.
In yet another example, invoking a payment interface that matches the payment environment and completing a payment operation based on payment parameters using the payment interface includes: if the payment environment is the H5 page of the third-party program, informing a payee of the payment page to issue a payment order to the payment program so that the payment program generates a jump link of a payment intermediate page corresponding to the payment order; accessing a jump link, and jumping from a payment page to a payment intermediate page of the program; and completing the payment operation through a third payment interface of the payment middle page.
Optionally, the jump link is a URL (Uniform Resource Locator) link. When the payment environment is the H5 page of the third-party program, the program (such as the WeChat app) where the payment tool is located needs to be invoked through the link, and the payment intermediate page of the program is skipped, and account information such as a payment account, a collection account, a payment amount, time and the like is sent to the payment server through the third payment interface of the payment intermediate page, so that the payment server completes the transfer.
Optionally, after the payment operation is completed based on the payment parameters by using the payment interface, the method further includes: responding to feedback information used for indicating payment completion, and generating a payment result page according to a preset instruction; and jumping to a payment result page from the current page. By designating a payment completion result page in advance, the next service can be continuously processed in the payment result page by automatically skipping after the user finishes manual payment, for example, the service jumps back to the display page of the original commodity after the payment is finished, jumps to the display page of the logistics information, and the like. It is also possible to jump to another payment results page if the payment fails.
Fig. 2 is a payment schematic diagram of an embodiment of the present invention, and fig. 3 is a flowchart of a payment policy of an embodiment of the present invention, where a service party interfaces a specific wechat payment scheme according to an environment to which the service party belongs, and different payment environments interface are respectively interfaced, and finally invokes a payment interface of a wechat. The process comprises the following steps: accessing a payment page, acquiring order parameters (payment parameters and payment environment parameters) on the payment page, judging whether the payment page is an external H5 environment or not according to a User-Agent character string of a browser ua (User-Agent) jumped to the payment page, distinguishing whether the applet embedded H5 or the public number H5 type according to a window __ wxjs. environment if the applet internal H5 environment is the window, if the window __ wxjs. environment is the applet embedded H5 environment, otherwise, the public number H5 environment, if the window is the public number H5, continuously calling a wx.chooseWXP interface provided by the WeChat jssdk to complete payment, if the applet H5 is the embedded type, jumping to the applet page, calling the payment page, and generating a payment page () according to a common post page payment service report, and generating a post payment page 5, if the payment page is the post payment page. And accessing the link, calling the WeChat app, jumping to a WeChat payment intermediate page, finishing payment and then jumping back to a payment result page.
In the whole process, only order parameters need to be transmitted, different payment scene difference processing modes do not need to be concerned, only a payment completion result page needs to be appointed in advance, and the next service can be processed by automatically skipping after the payment of a user is completed. The payment intermediate page finally calls a WeChat native payment strategy, and the WeChat native payment strategy is integrated and automatically identified in multiple payment modes, so that the safety is the same as that of the WeChat payment of each scene in independent butt joint. And after the payment is finished, automatically jumping to a payment finishing page specified by the initiation page.
By using the technical scheme of the embodiment, a business party only needs to care about the unique parameter of the order id, can finish payment operation in a plurality of different payment environments, reduces the access cost for accessing the business with payment requirements, improves the development efficiency, and shields a plurality of environment payment problems.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a payment apparatus is further provided for implementing the foregoing embodiment and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a payment apparatus according to an embodiment of the present invention, as shown in fig. 3, the apparatus including: an acquisition module 40, a recognition module 42, a calling module 44, wherein,
the obtaining module 40 is configured to obtain payment request information of a payment page, where the payment request information includes payment parameters and payment environment parameters;
the identifying module 42 is configured to identify a payment environment of the payment page according to the payment environment parameter, where the payment environment is used to characterize a page browsing type of the payment page;
and the calling module 44 is used for calling a payment interface matched with the payment environment and completing payment operation based on the payment parameters by using the payment interface.
Optionally, the identification module includes: the reading unit is used for reading a User Agent (UA) character string of the browser from the payment environment parameter; a determining unit, configured to determine that a payment environment of the payment page is an internal H5 environment if the UA character string includes a specified field; and if the UA character string does not contain the designated field, determining that the payment environment of the payment page is an external H5 environment.
Optionally, the determining unit includes: the reading subunit is used for reading the environment variable characters of the browser from the payment environment parameters; the judging subunit is used for judging whether the environment variable character is a designated character; a determining subunit, configured to determine, if the environment variable character is a designated character, that a payment environment of the payment page is a first internal H5 environment; and if the environment variable character is not the designated character, determining that the payment environment of the payment page is a second internal H5 environment.
Optionally, the invoking module includes: the payment system comprises a first calling unit, a second calling unit and a payment processing unit, wherein the first calling unit is used for calling a first payment interface of a payment program through a JSSDK toolkit if the payment environment is a public number H5 page inside the program, and the JSSDK toolkit is a webpage development toolkit which is provided for a webpage developer and is based on the webpage in the payment program; and the first sending unit is used for sending the payment parameters to a payment server through the first payment interface so as to finish payment operation.
Optionally, the invoking module includes: the skip unit is used for skipping from the payment page to a subprogram payment page if the payment environment is a subprogram H5 page of a payment program; the second calling unit is used for calling a second payment interface of the subprogram payment page; and the second sending unit is used for sending the payment parameters to a payment server through the second payment interface so as to complete payment operation.
Optionally, the invoking module includes: a notification unit, configured to notify a payee of the payment page to issue a payment order to the payment program if the payment environment is an H5 page of a third-party program, so that the payment program generates a jump link of a payment middle page corresponding to the payment order; the access unit is used for accessing the jump link and jumping from the payment page to a payment middle page of the program; and the third sending unit is used for finishing payment operation through a third payment interface of the payment middle page.
Optionally, the apparatus further comprises: the generating module is used for responding to feedback information used for indicating payment completion after the calling module completes payment operation based on the payment parameters by using the payment interface and generating a payment result page according to a preset instruction; and the skipping module is used for skipping from the current page to the payment result page.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Fig. 5 is a structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device includes a processor 51, a communication interface 52, a memory 53, and a communication bus 54, where the processor 51, the communication interface 52, and the memory 53 complete mutual communication through the communication bus 54;
a memory 53 for storing a computer program;
the processor 51 is configured to implement the following steps when executing the program stored in the memory 53:
obtaining payment request information of a payment page, wherein the payment request information comprises payment parameters and payment environment parameters; identifying a payment environment of the payment page according to the payment environment parameter, wherein the payment environment is used for representing a page browsing type of the payment page; and calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface.
Further, identifying the payment environment of the payment page according to the payment environment parameter includes: reading a User Agent (UA) character string of a browser from the payment environment parameter; if the UA character string contains a designated field, determining that the payment environment of the payment page is an internal H5 environment; and if the UA character string does not contain the designated field, determining that the payment environment of the payment page is an external H5 environment.
Further, determining that the payment environment of the payment page is an internal H5 environment comprises: reading environment variable characters of a browser from the payment environment parameters; judging whether the environment variable character is a designated character or not; if the environment variable characters are designated characters, determining that the payment environment of the payment page is a first internal H5 environment; and if the environment variable character is not the designated character, determining that the payment environment of the payment page is a second internal H5 environment.
Further, calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface, wherein the payment operation comprises the following steps: if the payment environment is a public number H5 page inside a program, calling a first payment interface of the payment program through a JSSDK toolkit, wherein the JSSDK toolkit is provided for a webpage developer and is based on a webpage development toolkit in the payment program; and sending the payment parameters to a payment server through the first payment interface so as to complete payment operation.
Further, calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface, wherein the payment operation comprises the following steps: if the payment environment is a subprogram H5 page of the payment program, jumping from the payment page to a subprogram payment page; calling a second payment interface of the subprogram payment page; and sending the payment parameters to a payment server through the second payment interface so as to complete payment operation.
Further, calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface, wherein the payment operation comprises the following steps: if the payment environment is the H5 page of the third-party program, informing a payee of the payment page to issue a payment order to the payment program so that the payment program generates a jump link of a payment middle page corresponding to the payment order; accessing the jump link, and jumping from the payment page to a payment intermediate page of the program; and completing the payment operation through a third payment interface of the payment middle page.
Further, after completing a payment operation based on the payment parameters using the payment interface, the method further comprises: responding to feedback information used for indicating payment completion, and generating a payment result page according to a preset instruction; and jumping to the payment result page from the current page.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In yet another embodiment provided by the present application, there is also provided a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the payment method as described in any of the above embodiments.
In a further embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the payment method as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A payment method, comprising:
obtaining payment request information of a payment page, wherein the payment request information comprises payment parameters and payment environment parameters;
identifying a payment environment of the payment page according to the payment environment parameter, wherein the payment environment is used for representing a page browsing type of the payment page;
and calling a payment interface matched with the payment environment, and completing payment operation based on the payment parameters by using the payment interface.
2. The method of claim 1, wherein identifying the payment context of the payment page according to the payment context parameters comprises:
reading a user agent character string of a browser from the payment environment parameters;
if the user agent character string contains the designated field, determining that the payment environment of the payment page is an internal H5 environment; and if the user agent character string does not contain the designated field, determining that the payment environment of the payment page is an external H5 environment.
3. The method of claim 2, wherein determining that the payment context of the payment page is an internal H5 context comprises:
reading environment variable characters of a browser from the payment environment parameters;
if the environment variable characters are designated characters, determining that the payment environment of the payment page is a first internal H5 environment; and if the environment variable character is not the designated character, determining that the payment environment of the payment page is a second internal H5 environment.
4. The method of claim 1, wherein invoking a payment interface that matches the payment environment and using the payment interface to complete a payment operation based on the payment parameters comprises:
if the payment environment is a public number H5 page inside a program, calling a first payment interface of the payment program through a tool package, wherein the tool package is provided for a webpage developer and is based on a webpage development tool package in the payment program;
and sending the payment parameters to a payment server through the first payment interface so as to complete payment operation.
5. The method of claim 1, wherein invoking a payment interface that matches the payment environment and using the payment interface to complete a payment operation based on the payment parameters comprises:
if the payment environment is a subprogram H5 page of the payment program, jumping from the payment page to a subprogram payment page;
calling a second payment interface of the subprogram payment page;
and sending the payment parameters to a payment server through the second payment interface so as to complete payment operation.
6. The method of claim 1, wherein invoking a payment interface that matches the payment environment and using the payment interface to complete a payment operation based on the payment parameters comprises:
if the payment environment is the H5 page of the third-party program, informing a payee of the payment page to issue a payment order to a payment program so that the payment program generates a jump link of a payment middle page corresponding to the payment order;
accessing the jump link, and jumping from the payment page to a payment intermediate page of the program;
and completing the payment operation through a third payment interface of the payment middle page.
7. The method of claim 1, wherein after completing a payment operation based on the payment parameters using the payment interface, the method further comprises:
responding to feedback information used for indicating payment completion, and generating a payment result page according to a preset instruction;
and jumping to the payment result page from the current page.
8. A payment device, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring payment request information of a payment page, and the payment request information comprises payment parameters and payment environment parameters;
the identification module is used for identifying the payment environment of the payment page according to the payment environment parameters, wherein the payment environment is used for representing the page browsing type of the payment page;
and the calling module is used for calling a payment interface matched with the payment environment and finishing payment operation based on the payment parameters by using the payment interface.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1 to 7 by executing a program stored on a memory.
CN202010956192.9A 2020-09-11 2020-09-11 Payment method and device, storage medium and electronic equipment Pending CN112232794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010956192.9A CN112232794A (en) 2020-09-11 2020-09-11 Payment method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010956192.9A CN112232794A (en) 2020-09-11 2020-09-11 Payment method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112232794A true CN112232794A (en) 2021-01-15

Family

ID=74116744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010956192.9A Pending CN112232794A (en) 2020-09-11 2020-09-11 Payment method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112232794A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112965841A (en) * 2021-04-05 2021-06-15 朱小英 H5-based cloud mobile phone payment method and device
CN113032703A (en) * 2021-02-24 2021-06-25 腾讯科技(深圳)有限公司 Resource data processing method and device, computer equipment and storage medium
CN113268685A (en) * 2021-03-26 2021-08-17 深圳九星互动科技有限公司 Skip control method, device, system and medium for webpage aggregate payment
CN114217890A (en) * 2021-11-18 2022-03-22 深圳市优克联新技术有限公司 Interface control method and device, aggregation payment platform and storage medium
CN114756283A (en) * 2022-06-14 2022-07-15 山东鼎信数字科技有限公司 Method for authorizing and paying compatible with multiple software environments

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113032703A (en) * 2021-02-24 2021-06-25 腾讯科技(深圳)有限公司 Resource data processing method and device, computer equipment and storage medium
CN113032703B (en) * 2021-02-24 2024-04-26 腾讯科技(深圳)有限公司 Resource data processing method, device, computer equipment and storage medium
CN113268685A (en) * 2021-03-26 2021-08-17 深圳九星互动科技有限公司 Skip control method, device, system and medium for webpage aggregate payment
CN112965841A (en) * 2021-04-05 2021-06-15 朱小英 H5-based cloud mobile phone payment method and device
CN114217890A (en) * 2021-11-18 2022-03-22 深圳市优克联新技术有限公司 Interface control method and device, aggregation payment platform and storage medium
CN114756283A (en) * 2022-06-14 2022-07-15 山东鼎信数字科技有限公司 Method for authorizing and paying compatible with multiple software environments

Similar Documents

Publication Publication Date Title
CN112232794A (en) Payment method and device, storage medium and electronic equipment
KR102194052B1 (en) Service execution method and device
CN106873961B (en) Method and device for awakening APP through mobile browser
CN107360261B (en) HTTP request processing method and device and electronic equipment
CN111160845A (en) Service processing method and device
CN112199300B (en) Interface testing method and device, electronic equipment and storage medium
CN107276842B (en) Interface test method and device and electronic equipment
CN113641940B (en) Page jump method, device, system, equipment and storage medium
CN107835228B (en) Instruction processing method and device based on dynamic generalized routing
CN111858376A (en) Request message generation method and interface test method
CN109034603B (en) Business process execution method, device and computer readable storage medium
CN111124544A (en) Interface display method and device, electronic equipment and storage medium
CN109446445B (en) Resource acquisition method and device
CN113923144A (en) Service test system, method, electronic device and storage medium
CN107534860A (en) Wi-Fi hotspot portal authentication method and device
CN108243229B (en) Request processing method and device
CN112115103A (en) File address display method and device, electronic equipment and readable storage medium
CN112749352A (en) Webpage skipping method and device, electronic equipment and readable storage medium
CN115795212A (en) Page display method and device, electronic equipment and storage medium
CN112069430B (en) Quick application preview method and device, electronic equipment and storage medium
CN104679786B (en) Form processing method and device
CN108874390B (en) Data processing method and device, equipment and storage medium
CN110868477A (en) Task scheduling method, device and system
CN112929321B (en) Authentication method, device and terminal equipment
CN114356452B (en) Method and device for acquiring positioning result information, electronic equipment and storage medium

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