WO2020029971A1 - 支付过程的处理方法、装置、介质及电子设备 - Google Patents

支付过程的处理方法、装置、介质及电子设备 Download PDF

Info

Publication number
WO2020029971A1
WO2020029971A1 PCT/CN2019/099502 CN2019099502W WO2020029971A1 WO 2020029971 A1 WO2020029971 A1 WO 2020029971A1 CN 2019099502 W CN2019099502 W CN 2019099502W WO 2020029971 A1 WO2020029971 A1 WO 2020029971A1
Authority
WO
WIPO (PCT)
Prior art keywords
payment
response message
field
template
mapped
Prior art date
Application number
PCT/CN2019/099502
Other languages
English (en)
French (fr)
Inventor
胡彦丽
Original Assignee
京东数字科技控股有限公司
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 京东数字科技控股有限公司 filed Critical 京东数字科技控股有限公司
Publication of WO2020029971A1 publication Critical patent/WO2020029971A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • 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

Definitions

  • the present disclosure relates to the field of computer technology, and in particular, to a processing method, device, medium, and electronic device for a payment process.
  • the method of aggregating payment and aggregating multiple payment channels is: different payment channels have different docking interfaces, and for the same payment task, different docking interfaces of different payment channels use different program codes. At the same time, for new payment channels, for each payment task, it is necessary to redevelop the program code.
  • the embodiments of the present disclosure provide a processing method for a payment process, a processing device for the payment process, a computer-readable medium, and an electronic device, thereby at least to a certain extent overcoming the development and maintenance of a method for aggregating payments and aggregating multiple payment channels in related technologies A tedious task.
  • a method for processing a payment process including: receiving payment request parameters; invoking a request message template, performing field mapping of the payment request parameters, and generating a payment request message;
  • the payment request message calls a payment channel interface to obtain a payment response message; calls a response message template to perform field mapping of the payment response message, and generates a mapped payment response message to complete the payment process Processing.
  • calling a request message template to perform field mapping of the payment request parameters to generate a payment request message includes: obtaining a field to be mapped in the request message template as a first target field Obtaining a field corresponding to the first target field in the payment request parameter as a second target field; converting an attribute of the second target field into an attribute of the first target field to generate the payment Request message.
  • the request message template is in a first programming language format; before the attribute of the second target field is converted into the attribute of the first target field, the method further includes: The second target field is converted into the first programming language format.
  • invoking a response message template to perform field mapping of the payment response message to generate a mapped payment response message includes: obtaining the fields to be mapped in the response message template as: A third target field; obtaining a field corresponding to the third target field in the payment response message as a fourth target field; converting an attribute of the fourth target field into an attribute of the third target field, To generate the mapped payment response message.
  • the payment request parameter is an object of a second programming language; after converting the attribute of the fourth target field into the attribute of the third target field, the method further includes: parsing the The mapped payment response message obtains an object of the second programming language.
  • the mapped payment response message is in an XML format and the second programming language format is Java Bean; the mapped payment response message is parsed to obtain the second programming
  • the language objects include: an object in which the payment request parameter is a Java Bean, and parsing the mapped payment response message through JAXB to obtain the object in the second programming language.
  • the method before calling a request message template, the method further includes: adding the request message template to a configuration file.
  • calling a request message template, performing field mapping of the payment request parameters, and generating a payment request message includes: calling the configuration file when the payment request parameters are received;
  • the configuration file described above implements field mapping of the payment request parameters through a template engine library, and generates a payment request message.
  • the method before calling a response message template, the method further includes: adding the response message template to a configuration file.
  • calling a response message template to perform field mapping of the payment response message to generate a mapped payment response message includes: when the payment response message is received, invoking the payment response message.
  • the payment request parameters include M types of payment request parameters, and each type of payment request parameter corresponds to a payment channel, where M is a positive integer.
  • a processing device for a payment process including: a receiving module for receiving payment request parameters; and a first mapping module for calling a request message template to perform the payment request. Parameter field mapping to generate a payment request message; a calling module for calling a payment channel interface to obtain a payment response message according to the payment request message; a second mapping module for calling a response message template to perform the The field mapping of the payment response message generates a mapped payment response message to complete the processing of the payment process.
  • a computer-readable medium having stored thereon a computer program that, when executed by a processor, implements processing of a payment process as described in the first aspect of the above embodiments method.
  • an electronic device including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are used by the one When executed by one or more processors, the one or more processors are caused to implement the processing method of the payment process according to the first aspect in the foregoing embodiment.
  • a payment request message for invoking a payment channel interface is generated by invoking a request message template and field mapping of payment request parameters; and obtaining payment according to the payment request message After the response message, the response message template is called, and field mapping is performed on the payment response message to complete the processing of the payment process corresponding to the payment request parameter.
  • the method for processing the payment process provided by the embodiment of the present disclosure avoids the repeated development of the interfaces of different payment channels through the field mapping between the message template and the relevant parameters of the actual payment process, so that the payment processes of different payment channels can be centrally managed And maintenance, while improving the flexibility of aggregate payments.
  • FIG. 1 is a schematic flowchart of a processing method of a payment process according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram showing a processing method of a payment process according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of a method for generating a payment request message through field mapping according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart of a method for generating a payment request message through field mapping according to another embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of a method for field mapping of a payment response message according to an embodiment of the present disclosure
  • FIG. 6 is a schematic flowchart of a method for field mapping of a payment response message according to another embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a processing method of a payment process according to another embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a processing device for a payment process according to an embodiment of the present disclosure.
  • FIG. 9 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure.
  • the codes in the interfaces of different payment channels are different in the message format of the request message / response and the field names in the message. Part of the code is the same.
  • the code is re-developed through the interfaces corresponding to each payment channel.
  • the method of aggregating payments and aggregating multiple payment channels is cumbersome for development and maintenance.
  • FIG. 1 shows a schematic flowchart of a processing method of a payment process according to an embodiment of the present disclosure, at least to a certain extent, overcomes the problem of tedious development and maintenance tasks in the manner of aggregating payments and aggregating multiple payment channels in the related art.
  • the method includes:
  • Step S101 Receive payment request parameters.
  • Step S102 calling a request message template, performing field mapping of the payment request parameters, and generating a payment request message;
  • Step S103 calling a payment channel interface to obtain a payment response message according to the payment request message;
  • step S104 a response message template is called, field mapping of the payment response message is performed, and a mapped payment response message is generated to complete processing of the payment process.
  • a payment request message for invoking a payment channel interface is generated; and a payment response is obtained according to the payment request message.
  • the response message template is called, and field mapping is performed on the payment response message to complete the processing of the payment process corresponding to the payment request parameter.
  • FIG. 2 is a schematic diagram of a method for processing a payment process according to an embodiment of the present disclosure. The specific implementation of each step in FIG. 1 will be described in detail below with reference to FIG. 2:
  • the payment request parameter 21 received in step S101 includes M types of payment request parameters, and each type of payment request parameter 21 corresponds to a payment channel, where M is Positive integer.
  • M is greater than or equal to 2
  • the code of the interface of the different payment channels in M is different from that described above in the message format of the request message / response and the field names in the message. All are the same.
  • a request message template is called in step S102, field mapping of the payment request parameters is performed, and a payment request message is generated.
  • FIG. 3 is a schematic flowchart of a method for generating a payment request message through field mapping according to an embodiment of the present disclosure. Referring to FIG. 3, the method includes:
  • Step S301 Add the request message template to a configuration file.
  • Step S302 When the payment request parameter is received, the configuration file is called.
  • Step S303 Based on the configuration file, implement field mapping of the payment request parameters through a template engine library, and generate a payment request message.
  • each payment channel can call the above-mentioned configuration file 22 to obtain the request message template 221 when executing the program of its own interface.
  • a field mapping 222 of the payment request parameter 21 is implemented through a unified message generating tool (for example, a template engine library), and a payment request message 23 is generated.
  • the request message template 221 is centrally managed by the configuration center, which is convenient for invoking the request message template, and is beneficial to the overall lightweight of the program.
  • the template engine library may be a StringTemplate.
  • FIG. 4 is a schematic flowchart of a method for generating a payment request message through field mapping according to another embodiment of the present disclosure. Referring to FIG. 4, the method includes:
  • Step S401 Acquire a field to be mapped in the request message template as a first target field.
  • Step S402 Obtain a field corresponding to the first target field in the payment request parameter as a second target field.
  • Step S403 Convert the attributes of the second target field into the attributes of the first target field to generate the payment request message.
  • the output is: ⁇ xml> ⁇ payID> $ 123456 $ ⁇ / payId> ⁇ / xml>
  • ⁇ xml> ⁇ payID> $ payId $ ⁇ / payId> ⁇ / xml> is the request message template in step S301, and the attributes of the first target field can be obtained through the "$ payId $" in the request message template.
  • “123456” may be expressed as an attribute obtained from a payment request parameter and a field corresponding to the first target field is a second target field. Converting the attributes of the second target field into the attributes of the first target field to generate the payment request message: ⁇ xml> ⁇ payID> $ 123456 $ ⁇ / payId> ⁇ / xml>.
  • the second target field is converted into the first programming language format. That is, in the method provided in this application, the process of invoking a request message template to perform field mapping of the payment request parameters to generate a payment request message includes not only the conversion of corresponding field attributes, but also the request message parameters.
  • the format of the programming language of the corresponding field is uniformly the format of the programming language of the request message template. In order to facilitate the execution and management of the generated request payment message.
  • step S103 after acquiring a payment request message based on the methods provided in FIG. 3 and / or FIG. 4, in step S103, the underlying payment channel interface is called through the HTTPS / JSF protocol, thereby, The interface of the payment channel returns a response message 24 according to the request message.
  • a response message template is called in step S104, field mapping of the payment response parameters is performed, and a mapped payment request message is generated.
  • FIG. 5 is a schematic flowchart of a method for field mapping of a payment response message according to an embodiment of the present disclosure. Referring to FIG. 5, the method includes:
  • Step S501 Add the request message template to a configuration file.
  • Step S502 When the payment response message is received, the configuration file is called.
  • Step S503 Based on the configuration file, field mapping of the payment response message is implemented through a template engine library, and a mapped payment response message is generated.
  • each payment channel can call the above-mentioned configuration file 22 to obtain the response message template 223 when executing the program of its own interface. Furthermore, based on the configuration file 22, field mapping of the payment response message 24 is realized through a unified message generation tool (such as a template engine library), and a mapped payment response message 25 is generated.
  • the response message template 223 is centrally managed by the configuration center, which is convenient for invoking the response message template 223, and is conducive to the overall lightweight of the program.
  • the template engine library may be a StringTemplate.
  • FIG. 6 is a schematic flowchart of a method for field mapping of a payment response message according to another embodiment of the present disclosure. Referring to FIG. 6, the method includes:
  • Step S601 Acquire a field to be mapped in the response packet template as a third target field.
  • Step S602 Obtain a field corresponding to the third target field in the payment response message as a fourth target field.
  • Step S603 Convert the attributes of the fourth target field into the attributes of the third target field to generate the mapped payment response message.
  • the mapped payment response message is parsed to obtain the object of the second programming language. That is to say, the method provided in this application, in the processing of the payment process, not only includes the conversion of the corresponding field attributes, but also needs to parse the payment response message into a programming language format consistent with the payment request parameters. In order to facilitate the use of the mapped payment response message in the payment process.
  • FIG. 7 shows a flowchart of a processing method of a payment process according to another embodiment of the present disclosure. Referring to FIG. 7, the method includes:
  • Step S701 Receive payment request parameters.
  • Step S702 Acquire a field to be mapped in the request message template as a first target field.
  • Step S703 Obtain a field corresponding to the first target field in the payment request parameter as a second target field.
  • Step S704 The request message template is in an XML format, and the second target field is converted into an XML format.
  • Step S705 Convert the attributes of the second target field into the attributes of the first target field to generate a payment request message in XML format.
  • step S706 the payment channel interface is invoked to obtain a payment response message in XML format according to the payment request message in XML format.
  • Step S707 Acquire a field to be mapped in the response packet template as a third target field.
  • Step S708 Obtain a field corresponding to the third target field in the XML response payment message as a fourth target field.
  • Step S709 Convert the attributes of the fourth target field into the attributes of the third target field to generate the mapped payment response message, and the mapped payment response message is in XML format.
  • Step S710 The payment request parameter is an object of Java Bean, and the mapped payment response message is parsed by JAXB to obtain an object of Java Bean.
  • step S701 is the same as step S101, and details are not described herein again.
  • steps S702 to S705 are a specific implementation manner of step S102. Steps S702 to S705 are also a specific manifestation of the embodiment shown in FIG. 3.
  • step S704 if the request message template is in an XML format, the second target field is converted into an XML format. Furthermore, in step S705, a payment request message in XML format is generated. That is, in the method provided in this application, the process of invoking a request message template to perform field mapping of the payment request parameters to generate a payment request message includes not only the conversion of corresponding field attributes, but also the conversion of the corresponding fields in the request message parameters.
  • the format of the programming language is unified to the format of the programming language that requests the message template. In order to facilitate the execution and management of the generated request payment message.
  • step S706 a payment channel interface is invoked to obtain a payment response message in XML format according to the payment request message in XML format.
  • steps S707 to S710 are a specific implementation manner of step S103. Steps S707 to S710 are also a specific manifestation of the embodiment shown in FIG. 5.
  • the mapped payment response message is also in XML format.
  • the payment request parameter is a Java Bean object
  • the mapped XML payment response message is parsed by JAXB to obtain a Java Bean object. That is to say, the method provided in this application, in the processing of the payment process, not only includes the conversion of the corresponding field attributes, but also needs to parse the payment response message into a programming language format consistent with the payment request parameters. In order to facilitate the use of the mapped payment response message in the payment process.
  • FIG. 8 is a schematic structural diagram of a processing device for a payment process according to an embodiment of the present disclosure.
  • the processing device 800 for the payment process may include a receiving module 801, a first mapping module 802, a calling module 803, and a second mapping module 804.
  • the receiving module 801 may be used to receive payment request parameters; the first mapping module 802 may be used to call a request message template to perform field mapping of the payment request parameters to generate a payment request message; the calling module 803 may be used to The payment request message calls a payment channel interface to obtain a payment response message; the second mapping module 804 may be used to call a response message template to perform field mapping of the payment response message to generate a mapped payment response message To complete the processing of the payment process.
  • the first mapping module 802 may include: an obtaining unit and a conversion unit.
  • the obtaining unit may be configured to obtain a field to be mapped in the request message template as a first target field; the obtaining unit is further configured to obtain a field corresponding to the first target field in the payment request parameter as a first target field. Second target field.
  • the conversion unit may be configured to convert an attribute of the second target field into an attribute of the first target field to generate the payment request message.
  • the request message template may be in a first programming language format.
  • the conversion unit may be further configured to convert the second target field into the first programming language format.
  • the second mapping module 804 may include: an obtaining unit and a conversion unit.
  • the obtaining unit may be configured to obtain a field to be mapped in the response message template as a third target field; the obtaining unit may also be configured to obtain a field corresponding to the third target field in the payment response message Is the fourth target field.
  • the conversion unit may be configured to convert the attributes of the fourth target field into the attributes of the third target field to generate the mapped payment response message.
  • the second mapping module 804 may further include a parsing unit.
  • the payment request parameter is an object of the second programming language
  • the parsing unit may be configured to parse the mapped payment response message to obtain the object of the second programming language.
  • the mapped payment response message may be in an XML format
  • the second programming language format may be a Java Bean.
  • the parsing unit may be specifically configured to parse the mapped payment response message, and obtaining the object in the second programming language may include: the object of which the payment request parameter is a Java bean, and parsing the mapped payment response through JAXB A message to obtain an object of the second programming language.
  • the processing device 800 for a payment process may further include a first adding module.
  • the first adding module may be configured to add the request message template to a configuration file.
  • the first mapping module 802 may include: a calling unit and a mapping unit.
  • the calling unit may be configured to call the configuration file when the payment request parameter is received.
  • the mapping unit may be configured to implement field mapping of the payment request parameters through a template engine library based on the configuration file, and generate a payment request message.
  • the processing device 800 of the payment process may further include a second adding module.
  • the second adding module may be used to add the response message template to a configuration file.
  • the second mapping module 804 may include: a calling unit and a mapping unit.
  • the calling unit may be configured to call the configuration file when the payment response message is received.
  • the mapping unit may be configured to implement field mapping of the payment response message through a template engine library based on the configuration file, and generate a mapped payment response message.
  • the payment request parameter may include M types of payment request parameters, and each type of payment request parameter corresponds to a payment channel, where M is a positive integer.
  • each functional module of the processing device of the payment process of the exemplary embodiment of the present disclosure corresponds to the steps of the exemplary embodiment of the processing method of the payment process described above, for details not disclosed in the device embodiments of the present disclosure, please refer to the above of the present disclosure. Examples of processing methods for the payment process.
  • FIG. 9 illustrates a schematic structural diagram of a computer system 900 suitable for implementing an electronic device according to an embodiment of the present disclosure.
  • the computer system 900 of the electronic device shown in FIG. 9 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present disclosure.
  • the computer system 900 includes a central processing unit (CPU) 901, which can be based on a program stored in a read-only memory (ROM) 902 or a program loaded into a random access memory (RAM) 903 from a storage section 908. Instead, perform various appropriate actions and processes.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for system operation are also stored.
  • the CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904.
  • An input / output (I / O) interface 905 is also connected to the bus 904.
  • the following components are connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc .; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc .; and a speaker; And a communication section 909 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 909 performs communication processing via a network such as the Internet.
  • the driver 910 is also connected to the I / O interface 905 as needed.
  • a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing a method shown in a flowchart.
  • the computer program may be downloaded and installed from a network through the communication section 909, and / or installed from a removable medium 911.
  • this computer program is executed by a central processing unit (CPU) 901
  • CPU central processing unit
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the foregoing.
  • the computer-readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programming read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal that is included in baseband or propagated as part of a carrier wave, and which carries computer-readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more of the logic functions used to implement the specified logic.
  • Executable instructions may also occur in a different order than those marked in the drawings. For example, two successively represented boxes may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with A combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present disclosure may be implemented by software or hardware.
  • the described units may also be provided in a processor.
  • the names of these units do not, in some cases, define the unit itself.
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the foregoing embodiments; or may exist alone without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by one of the electronic devices, the electronic device is caused to implement a processing method of a payment process as described in the foregoing embodiments.
  • the electronic device may implement, as shown in FIG. 1: step S101, receiving payment request parameters; step S101, calling a request message template, performing field mapping of the payment request parameters, and generating a payment request message; Step S103, calling a payment channel interface to obtain a payment response message according to the payment request message; step S104, calling a response message template to perform field mapping of the payment response message to generate a mapped payment response message, To complete the processing of the payment process.
  • the electronic device can implement the steps shown in FIG. 7.
  • modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.
  • the technical solution according to the embodiment of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network It includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
  • a computing device which may be a personal computer, a server, a touch terminal, or a network device, etc.

Abstract

本公开实施例提供了一种支付过程的处理方法、支付过程的处理装置、计算机可读介质及电子设备,该支付过程的处理方法,包括:接收支付请求参数;调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;根据所述支付请求报文,调用支付渠道接口获取支付响应报文;调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。本公开实施例的技术方案通过报文模板和实际支付过程相关参数之间的字段映射,避免了对不同支付渠道的接口的重复开发,使得不同支付渠道的支付过程可集中管理和维护,同时提高了聚合支付的灵活性。 (图1)

Description

支付过程的处理方法、装置、介质及电子设备
本公开要求申请日为2018年08月10日、申请号为CN 201810914348.X、发明创造名称为《支付过程的处理方法、装置、介质及电子设备》的中国发明专利申请的优先权。
技术领域
本公开涉及计算机技术领域,具体而言,涉及一种支付过程的处理方法、装置、介质及电子设备。
背景技术
随着科学技术的发展以及人们对支付便利性需求的增长,互联网支付渠道越来越受到用户的欢迎。然而由于互联网支付渠道种类的增加,为消费者和商户带来一定不便。比如,线下商店要想囊括各种互联网支付渠道的用户,就要提供各个互联网支付渠道对应的二维码移动消费者扫码付款,同时,商店店主的终端里要装上各个互联网支付渠道具的收款软件。因而,为了满足消费者支付体验和商户的收银方便,产生了聚合支付。聚合支付将多种支付渠道方式聚合为一种支付方式。
相关技术中,聚合支付聚合多个支付渠道的方式为:不同的支付渠道设置不同的对接接口,对于相同的支付任务,不同的支付渠道的对接接口使用不同的程序代码。同时,对于新增的支付渠道,对于每一支付任务,需对其进行重新开发程序代码。
然而,相关技术中聚合支付聚合多个支付渠道的方式中开发和维护任务繁冗。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的相关技术的信息。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的相关技术的信息。
发明内容
本公开实施例提供一种支付过程的处理方法、支付过程的处理装置、计算机可读介质及电子设备,进而至少在一定程度上克服相关技术中聚合支付聚合多个支付渠道的方式中开发和维护任务繁冗的问题。
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开实施例的第一方面,提供了一种支付过程的处理方法,包括:接收支付请求参数;调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;根据所述支付请求报文,调用支付渠道接口获取支付响应报文;调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
在本公开的一些实施例中,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文,包括:获取所述请求报文模板中待映射的字段为第一目标字段;在所述支付请求参数中获取与所述第一目标字段对应的字段为第二目标字段;将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成所述支付请求报文。
在本公开的一些实施例中,所述请求报文模板为第一编程语言格式;在将所述第二目标字段的属性转换为所述第一目标字段的属性之前,还包括:将所述第二目标字段转换为所述第一编程语言格式。
在本公开的一些实施例中,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,包括:获取所述响应报文模板中待映射的字段为第三目标字段;在所述支付响应报文中获取与所述第三目标字段对应的字段为第四目标字段;将所述第四目标字段的属性转换为所述第三目标字段的属性,以生成所述映射后的支付响应报文。
在本公开的一些实施例中,所述支付请求参数为第二编程语言的对象;在将所述第四目标字段的属性转换为所述第三目标字段的属性之后,还包括:解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
在本公开的一些实施例中,所述映射后的支付响应报文为XML格式,所述第二编程语言格式为Java Bean;解析所述映射后的支付响应报文,获取所述第二编程语言的对象,包括:所述支付请求参数为Java Bean的对象,通过JAXB解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
在本公开的一些实施例中,在调用请求报文模板之前,还包括:将所述请求报文模板添加至配置文件中。
在本公开的一些实施例中,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文,包括:接收到所述支付请求参数时,调用所述配置文件;基于所述配置文件,通过模板引擎库实现对所述支付请求参数的字段映射,生成支付请求报文。
在本公开的一些实施例中,在调用响应报文模板之前,还包括:将所述响应报文模板添加至配置文件中。
在本公开的一些实施例中,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,包括:接收到所述支付响应报文时,调用所述配置文件;基于所述配置文件,通过模板引擎库实现对所述支付响应报文的字段映射,生成映射后的支付响应报文。
在本公开的一些实施例中,所述支付请求参数包括M种类型的支付请求参数,每一 种类型的支付请求参数对应一种支付渠道,其中,M为的正整数。
根据本公开实施例的第二方面,提供了一种支付过程的处理装置,包括:接收模块,用于接收支付请求参数;第一映射模块,用于调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;调用模块,用于根据所述支付请求报文,调用支付渠道接口获取支付响应报文;第二映射模块,用于调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
根据本公开实施例的第三方面,提供了一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如上述实施例中第一方面所述的支付过程的处理方法。
根据本公开实施例的第四方面,提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如上述实施例中第一方面所述的支付过程的处理方法。
本公开实施例提供的技术方案可以包括以下有益效果:
在本公开的一些实施例所提供的技术方案中,通过调用请求报文模板并对支付请求参数进行字段映射,生成用于调用支付渠道接口的支付请求报文;根据支付请求报文获取到支付响应报文后,调用响应报文模板,进而对支付响应报文进行字段映射,从而完成对于支付请求参数对应的支付过程的处理。本公开实施例提供的支付过程的处理方法,通过报文模板和实际支付过程相关参数之间的字段映射,避免了对不同支付渠道的接口的重复开发,使得不同支付渠道的支付过程可集中管理和维护,同时提高了聚合支付的灵活性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示出了根据本公开的一实施例的支付过程的处理方法的流程示意图;
图2示出了根据本公开的实施例的支付过程的处理方法的框架示意图;
图3示出了根据本公开的一实施例的通过字段映射生成支付请求报文的方法的流程示意图;
图4示出了根据本公开的另一实施例的通过字段映射生成支付请求报文的方法的流程示意图;
图5示出了根据本公开的一实施例的对支付响应报文进行字段映射的方法的流程示意图;
图6示出了根据本公开的另一实施例的对支付响应报文进行字段映射的方法的流程示意图;
图7示出了根据本公开的另一实施例的支付过程的处理方法的流程示意图;
图8示出了根据本公开的实施例的支付过程的处理装置的结构示意图;
图9示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本公开的各方面。
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
聚合支付中,对于相同的支付任务,例如统一下单任务,不同的支付渠道的接口中的代码的不同之处在于请求报文/响应的报文格式以及报文中的字段名字等,而其他部分的代码均为相同的。相关技术中,通过对各个支付渠道对应的接口分别重新开发代码。然而,相关技术中聚合支付聚合多个支付渠道的方式中开发和维护任务繁冗。
图1示出了根据本公开的实施例的支付过程的处理方法的流程示意图,至少在一定程度上克服相关技术中聚合支付聚合多个支付渠道的方式中开发和维护任务繁冗的问题。参考图1,该方法包括:
步骤S101,接收支付请求参数;
步骤S102,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;
步骤S103,根据所述支付请求报文,调用支付渠道接口获取支付响应报文;
步骤S104,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
图1所示实施例所提供的技术方案中,通过调用请求报文模板并对支付请求参数进行字段映射,生成用于调用支付渠道接口的支付请求报文;根据支付请求报文获取到支付响应报文后,调用响应报文模板,进而对支付响应报文进行字段映射,从而完成对于支付请求参数对应的支付过程的处理。本公开实施例提供的支付过程的处理方法,通过报文模板和实际支付过程相关参数之间的字段映射,避免了对不同支付渠道的接口的重复开发,使得不同支付渠道的支付过程可集中管理和维护,同时提高了聚合支付的灵活性。
图2示出了根据本公开的实施例的支付过程的处理方法的框架示意图,以下结合图2对图1中各个步骤的具体实现方式进行详细阐述:
参考图2,在示例性的实施例中,在步骤S101中接收的支付请求参21包括M种类型的支付请求参数,每一种类型的支付请求参数21对应一种支付渠道,其中,M为的正整数。当M大于等于2时,同前所述,M中不同的支付渠道的接口的代码的不同之处在于请求报文/响应的报文格式以及报文中的字段名字等,而其他部分的代码均为相同的。
在示例性的实施例中,在步骤S102中调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文。
其中,图3示出了根据本公开的一实施例的通过字段映射生成支付请求报文的方法的流程示意图,参考图3,该方法包括:
步骤S301,将所述请求报文模板添加至配置文件中。
步骤S302,接收到所述支付请求参数时,调用所述配置文件。
步骤S303,基于所述配置文件,通过模板引擎库实现对所述支付请求参数的字段映射,生成支付请求报文。
继续参考图2,通过将请求报文模板221存储于统一的配置文件22中,则各个支付渠道执行各自接口的程序时,均可以调用上述配置文件22而获取到请求报文模板221。进而,基于所述配置文件,通过统一的报文生成工具(例如模板引擎库),实现对所述支付请求参数21的字段映射222,生成支付请求报文23。请求报文模板221被配置中心集中管理,有利于便利地调用请求报文模板,有利于程序整体轻量化。
示例性的,模板引擎库可以为StringTemplate。
图4示出了根据本公开的另一实施例的通过字段映射生成支付请求报文的方法的流程示意图,参考图4,该方法包括:
步骤S401,获取所述请求报文模板中待映射的字段为第一目标字段。
步骤S402,在所述支付请求参数中获取与所述第一目标字段对应的字段为第二目标字段。
步骤S403,将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成所述支付请求报文。
以下代码实例对图4所示通过字段映射生成支付请求报文的方法的流程进行简单说明:
import org.stringtemplate.V4.ST;
ST hello=new ST(“<xml><payID>$payId$</payId></xml>”);
Hello.add(“payId”,“123456”);
System.Out.Println(hello.Render());
其输出为:<xml><payID>$123456$</payId></xml>
其中,“<xml><payID>$payId$</payId></xml>”为步骤S301中请求报文模板,第一目标字段的属性可以通过上述请求报文模板中的“$payId$”表现,而“123456”可表现为从支付请求参数中获取到的与所述第一目标字段对应的字段为第二目标字段的属性。将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成所述支付请求报文:<xml><payID>$123456$</payId></xml>。
在示例性的实施例中,若请求报文模板为第一编程语言格式,在步骤S403之前,将所述第二目标字段转换为所述第一编程语言格式。也就是说,本申请提供的方法,调用请求报文模板进行所述支付请求参数的字段映射以生成支付请求报文的过程中,不仅包括对应字段属性的转换,还需将请求报文参数中对应字段的编程语言的格式统一为请求报文模板的编程语言的格式。以便于生成的请求支付报文的执行与管理。
继续参考图2,在示例性的实施例中,基于图3和/或图4提供的方法获取到支付请求报文后,在步骤S103中,通过HTTPS/JSF协议调用底层支付渠道接口,从而,所述支付渠道的接口会根据请求报文返回响应报文24。
在示例性的实施例中,在步骤S104中调用响应报文模板,进行所述支付响应参数的字段映射,生成映射后的支付请求报文。
其中,图5示出了根据本公开的一实施例的对支付响应报文进行字段映射的方法的流程示意图,参考图5,该方法包括:
步骤S501,将所述请求报文模板添加至配置文件中。
步骤S502,接收到所述支付响应报文时,调用所述配置文件。
步骤S503,基于所述配置文件,通过模板引擎库实现对所述支付响应报文的字段映射,生成映射后的支付响应报文。
继续参考图2,通过将响应报文模板223存储于统一的配置文件22中,则各个支付渠道执行各自接口的程序时,均可以调用上述配置文件22而获取到响应报文模板223。进而,基于所述配置文件22,通过统一的报文生成工具(例如模板引擎库),实现对所述支付响应报文24的字段映射,生成映射后的支付响应报文25。响应报文模板223被配置中心集中管理,有利于便利地调用响应报文模板223,有利于程序整 体轻量化。
示例性的,模板引擎库可以为StringTemplate。
图6示出了根据本公开的另一实施例的对支付响应报文进行字段映射的方法的流程示意图,参考图6,该方法包括:
步骤S601,获取所述响应报文模板中待映射的字段为第三目标字段。
步骤S602,在所述支付响应报文中获取与所述第三目标字段对应的字段为第四目标字段。
步骤S603,将所述第四目标字段的属性转换为所述第三目标字段的属性,以生成所述映射后的支付响应报文。
图6所示实施例的各个步骤的具体实现过程与图4所示实施例的各个步骤的具体实现方式相似,具体可以参考图4所示实施例,在此不再赘述。
在示例性的实施例中,若所述支付请求参数为第二编程语言的对象,在步骤S603之后,解析所述映射后的支付响应报文,获取所述第二编程语言的对象。也就是说,本申请提供的方法,对所述支付过程的处理中,不仅包括对应字段属性的转换,还需将支付响应报文解析为与支付请求参数一致编程语言格式。以便于支付过程中对映射后的支付响应报文的使用。
图7示出了根据本公开的另一实施例的支付过程的处理方法的流程示意图。参考图7,该方法包括:
步骤S701,接收支付请求参数。
步骤S702,获取所述请求报文模板中待映射的字段为第一目标字段。
步骤S703,在所述支付请求参数中获取与所述第一目标字段对应的字段为第二目标字段。
步骤S704,所述请求报文模板为XML格式,将所述第二目标字段转换为XML格式。
步骤S705,将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成XML格式的支付请求报文。
步骤S706,根据所述XML格式的支付请求报文,调用支付渠道接口获取XML格式的支付响应报文。
步骤S707,获取所述响应报文模板中待映射的字段为第三目标字段。
步骤S708,在所述XML格式的支付响应报文中获取与所述第三目标字段对应的字段为第四目标字段。
步骤S709,将所述第四目标字段的属性转换为所述第三目标字段的属性,以生成所述映射后的支付响应报文,所述映射后的支付响应报文为XML格式。
步骤S710,所述支付请求参数为Java Bean的对象,通过JAXB解析所述映射后的支付响应报文,获取Java Bean的对象。
在示例性的实施例中,步骤S701与步骤S101的具体实现方式相同,在此不再赘述。
在示例性的实施例中,步骤S702-步骤S705是步骤S102的一种具体实现方式。步骤S702-步骤S705还是图3所示实施例的一种具体表现。
具体的,在步骤S704中,请求报文模板为XML格式,则将所述第二目标字段转换为XML格式。进而,在步骤S705中,生成XML格式的支付请求报文。即本申请提供的方法,调用请求报文模板进行所述支付请求参数的字段映射以生成支付请求报文的过程中,不仅包括对应字段属性的转换,还需将请求报文参数中对应字段的编程语言的格式统一为请求报文模板的编程语言的格式。以便于生成的请求支付报文的执行与管理。
在示例性的实施例中,在步骤S706中,根据所述XML格式的支付请求报文,调用支付渠道接口获取XML格式的支付响应报文。
在示例性的实施例中,步骤S707-步骤S710是步骤S103的一种具体实现方式。步骤S707-步骤S710还是图5所示实施例的一种具体表现。
具体的,在步骤S709中,获取到映射后的支付响应报文也是XML格式的。同时,若所述支付请求参数为Java Bean的对象,在步骤S709之后,通过JAXB解析所述映射后的XML的支付响应报文,以获取Java Bean的对象。也就是说,本申请提供的方法,对所述支付过程的处理中,不仅包括对应字段属性的转换,还需将支付响应报文解析为与支付请求参数一致编程语言格式。以便于支付过程中对映射后的支付响应报文的使用。
以下介绍本公开的装置实施例,可以用于执行本公开上述的支付过程的处理方法。
图8示出了根据本公开的实施例的支付过程的处理装置的结构示意图。该支付过程的处理装置800,可以包括:接收模块801、第一映射模块802、调用模块803和第二映射模块804。
其中,接收模块801可以用于接收支付请求参数;第一映射模块802可以用于调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;调用模块803可以用于根据所述支付请求报文,调用支付渠道接口获取支付响应报文;第二映射模块804可以用于调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
在示例性的实施例中,第一映射模块802可以包括:获取单元和转换单元。
其中,获取单元可以用于获取所述请求报文模板中待映射的字段为第一目标字段;获取单元还用于在所述支付请求参数中获取与所述第一目标字段对应的字段为第二目标字段。转换单元可以用于将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成所述支付请求报文。
在示例性的实施例中,所述请求报文模板可以为第一编程语言格式。转换单元还可以用于将所述第二目标字段转换为所述第一编程语言格式。
在示例性的实施例中,第二映射模块804可以包括:获取单元和转换单元。
其中,获取单元可以用于获取所述响应报文模板中待映射的字段为第三目标字段;获取单元还可以用于在所述支付响应报文中获取与所述第三目标字段对应的字段为第四目标字段。转换单元可以用于将所述第四目标字段的属性转换为所述第三目标字段的属性,以生成所述映射后的支付响应报文。
在示例性的实施例中,第二映射模块804还可以包括解析单元。所述支付请求参数为第二编程语言的对象,解析单元可以用于解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
在示例性的实施例中,所述映射后的支付响应报文可以为XML格式,所述第二编程语言格式可以为Java Bean。解析单元具体可以用于解析所述映射后的支付响应报文,获取所述第二编程语言的对象可以包括:所述支付请求参数为Java Bean的对象,通过JAXB解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
在示例性的实施例中,支付过程的处理装置800,还可以包括:第一添加模块。第一添加模块可以用于将所述请求报文模板添加至配置文件中。
在示例性的实施例中,第一映射模块802可以包括:调用单元和映射单元。
其中,调用单元可以用于接收到所述支付请求参数时,调用所述配置文件。映射单元可以用于基于所述配置文件,通过模板引擎库实现对所述支付请求参数的字段映射,生成支付请求报文。
在示例性的实施例中,支付过程的处理装置800还可以包括第二添加模块。第二添加模块可以用于将所述响应报文模板添加至配置文件中。
在示例性的实施例中,第二映射模块804可以包括:调用单元和映射单元。
其中,调用单元可以用于接收到所述支付响应报文时,调用所述配置文件。映射单元可以用于基于所述配置文件,通过模板引擎库实现对所述支付响应报文的字段映射,生成映射后的支付响应报文。
在示例性的实施例中,所述支付请求参数可以包括M种类型的支付请求参数,每一种类型的支付请求参数对应一种支付渠道,其中,M为的正整数。
由于本公开的示例实施例的支付过程的处理装置的各个功能模块与上述支付过程的处理方法的示例实施例的步骤对应,因此对于本公开装置实施例中未披露的细节,请参照本公开上述的支付过程的处理方法的实施例。
下面参考图9,其示出了适于用来实现本公开实施例的电子设备的计算机系统900的结构示意图。图9示出的电子设备的计算机系统900仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,计算机系统900包括中央处理单元(CPU)901,其可以根据存储 在只读存储器(ROM)902中的程序或者从储存部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有系统操作所需的各种程序和数据。CPU 901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的储存部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入储存部分908。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被中央处理单元(CPU)901执行时,执行本申请的系统中限定的上述功能。
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框 可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现如上述实施例中所述的支付过程的处理方法。
例如,所述的电子设备可以实现如图1中所示的:步骤S101,接收支付请求参数;步骤S101,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;步骤S103,根据所述支付请求报文,调用支付渠道接口获取支付响应报文;步骤S104,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
又如,所述的电子设备可以实现如图7所示的各个步骤。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本公开实施方式的方法。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中 的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (14)

  1. 一种支付过程的处理方法,包括:
    接收支付请求参数;
    调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;
    根据所述支付请求报文,调用支付渠道接口获取支付响应报文;
    调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
  2. 根据权利要求1所述的方法,其中,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文,包括:
    获取所述请求报文模板中待映射的字段为第一目标字段;
    在所述支付请求参数中获取与所述第一目标字段对应的字段为第二目标字段;
    将所述第二目标字段的属性转换为所述第一目标字段的属性,以生成所述支付请求报文。
  3. 根据权利要求2所述的方法,其中,所述请求报文模板为第一编程语言格式;
    在将所述第二目标字段的属性转换为所述第一目标字段的属性之前,还包括:
    将所述第二目标字段转换为所述第一编程语言格式。
  4. 根据权利要求2所述的方法,其中,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,包括:
    获取所述响应报文模板中待映射的字段为第三目标字段;
    在所述支付响应报文中获取与所述第三目标字段对应的字段为第四目标字段;
    将所述第四目标字段的属性转换为所述第三目标字段的属性,以生成所述映射后的支付响应报文。
  5. 根据权利要求4所述的方法,其中,所述支付请求参数为第二编程语言的对象;
    在将所述第四目标字段的属性转换为所述第三目标字段的属性之后,还包括:
    解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
  6. 根据权利要求5所述的方法,其中,所述映射后的支付响应报文为XML格式,所述第二编程语言格式为Java Bean;
    解析所述映射后的支付响应报文,获取所述第二编程语言的对象,包括:
    所述支付请求参数为Java Bean的对象,通过JAXB解析所述映射后的支付响应报文,获取所述第二编程语言的对象。
  7. 根据权利要求1至6任一项所述的方法,其中,在调用请求报文模板之前,还包括:
    将所述请求报文模板添加至配置文件中。
  8. 根据权利要求7所述的方法,其中,调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文,包括:
    接收到所述支付请求参数时,调用所述配置文件;
    基于所述配置文件,通过模板引擎库实现对所述支付请求参数的字段映射,生成支付请求 报文。
  9. 根据权利要求1至6任一项所述的方法,其中,在调用响应报文模板之前,还包括:将所述响应报文模板添加至配置文件中。
  10. 根据权利要求9所述的方法,其中,调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,包括:
    接收到所述支付响应报文时,调用所述配置文件;
    基于所述配置文件,通过模板引擎库实现对所述支付响应报文的字段映射,生成映射后的支付响应报文。
  11. 根据权利要求1至6任一项所述的方法,其中,所述支付请求参数包括M种类型的支付请求参数,每一种类型的支付请求参数对应一种支付渠道,其中,M为的正整数。
  12. 一种支付过程的处理装置,包括:
    接收模块,用于接收支付请求参数;
    第一映射模块,用于调用请求报文模板,进行所述支付请求参数的字段映射,生成支付请求报文;
    调用模块,用于根据所述支付请求报文,调用支付渠道接口获取支付响应报文;
    第二映射模块,用于调用响应报文模板,进行所述支付响应报文的字段映射,生成映射后的支付响应报文,以完成对所述支付过程的处理。
  13. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1至11中任一项所述的支付过程的处理方法。
  14. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至11中任一项所述的支付过程的处理方法。
PCT/CN2019/099502 2018-08-10 2019-08-06 支付过程的处理方法、装置、介质及电子设备 WO2020029971A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810914348.XA CN109947994B (zh) 2018-08-10 2018-08-10 支付过程的处理方法、装置、介质及电子设备
CN201810914348.X 2018-08-10

Publications (1)

Publication Number Publication Date
WO2020029971A1 true WO2020029971A1 (zh) 2020-02-13

Family

ID=67005784

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/099502 WO2020029971A1 (zh) 2018-08-10 2019-08-06 支付过程的处理方法、装置、介质及电子设备

Country Status (2)

Country Link
CN (1) CN109947994B (zh)
WO (1) WO2020029971A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695328A (zh) * 2020-06-16 2020-09-22 深圳前海微众银行股份有限公司 模拟测试报文生成方法、装置、设备及存储介质
CN112037002A (zh) * 2020-09-03 2020-12-04 中国银行股份有限公司 一种基于分布式支付系统的去碎片化报文处理方法及系统
CN112419004A (zh) * 2020-12-07 2021-02-26 恩亿科(北京)数据科技有限公司 全渠道订单可配置接入的方法、系统、设备及存储介质
CN114070886A (zh) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 报文转换方法、装置、设备及介质
CN115103034A (zh) * 2022-06-27 2022-09-23 京东科技信息技术有限公司 一种报文协议转换的方法和装置

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947994B (zh) * 2018-08-10 2022-12-27 京东科技控股股份有限公司 支付过程的处理方法、装置、介质及电子设备
WO2021003607A1 (zh) * 2019-07-05 2021-01-14 深圳海付移通科技有限公司 一种聚合支付方法以及相关设备
CN111091358B (zh) * 2019-12-16 2024-04-16 中国建设银行股份有限公司 多支付渠道的统一处理方法及系统
CN111324612A (zh) * 2020-02-28 2020-06-23 北京三快在线科技有限公司 订单信息的存储方法、系统、装置、设备及存储介质
CN111324780A (zh) * 2020-02-28 2020-06-23 北京三快在线科技有限公司 产品数据的存储方法、发送方法、装置及存储介质
CN111369252A (zh) * 2020-03-10 2020-07-03 北京意锐新创科技有限公司 适用于支付设备的查账方法和装置
CN115964028B (zh) * 2021-10-12 2023-11-03 讯联数据(无锡)有限公司 第三方支付接口的快速接入方法及系统
CN114500690B (zh) * 2022-02-15 2023-08-18 平安科技(深圳)有限公司 接口数据处理方法、装置、电子设备及存储介质
CN114900549A (zh) * 2022-05-06 2022-08-12 建信金融科技有限责任公司 一种报文发送方法、装置、电子设备及存储介质
CN115242872B (zh) * 2022-06-24 2024-02-02 平安银行股份有限公司 数据处理方法、装置、计算机设备及可读存储介质
CN117435174B (zh) * 2023-12-11 2024-04-09 江西曼荼罗软件有限公司 一种支付扩展方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105741093A (zh) * 2016-01-25 2016-07-06 网易(杭州)网络有限公司 移动应用的支付方法、装置与系统
WO2016115329A1 (en) * 2015-01-16 2016-07-21 Van De Wetering Stephen James Methods and systems for a personal data sharing app
CN107153961A (zh) * 2017-05-18 2017-09-12 努比亚技术有限公司 一种支付方法、支付服务器、交易服务器及可读存储介质
CN108022087A (zh) * 2017-11-22 2018-05-11 深圳市牛鼎丰科技有限公司 支付数据处理方法、装置、存储介质和计算机设备
CN109947994A (zh) * 2018-08-10 2019-06-28 北京京东金融科技控股有限公司 支付过程的处理方法、装置、介质及电子设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100211499A1 (en) * 2009-02-13 2010-08-19 Bank Of America Corporation Systems, methods and computer program products for optimizing routing of financial payments
CN106296142B (zh) * 2015-06-12 2020-05-22 深圳云游四海信息科技有限公司 一种多支付渠道选择的方法及系统
CN105427101A (zh) * 2015-11-19 2016-03-23 成都连银信息技术有限公司 支持多种支付通道的统一支付接入网关
CN105741088A (zh) * 2016-01-27 2016-07-06 广州唯品会信息科技有限公司 路由匹配支付方法及装置
CN105654279A (zh) * 2016-01-27 2016-06-08 广州唯品会信息科技有限公司 支付平台管理方法和装置
CN108183958A (zh) * 2017-12-29 2018-06-19 银联商务股份有限公司 报文传输方法、装置及支付系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016115329A1 (en) * 2015-01-16 2016-07-21 Van De Wetering Stephen James Methods and systems for a personal data sharing app
CN105741093A (zh) * 2016-01-25 2016-07-06 网易(杭州)网络有限公司 移动应用的支付方法、装置与系统
CN107153961A (zh) * 2017-05-18 2017-09-12 努比亚技术有限公司 一种支付方法、支付服务器、交易服务器及可读存储介质
CN108022087A (zh) * 2017-11-22 2018-05-11 深圳市牛鼎丰科技有限公司 支付数据处理方法、装置、存储介质和计算机设备
CN109947994A (zh) * 2018-08-10 2019-06-28 北京京东金融科技控股有限公司 支付过程的处理方法、装置、介质及电子设备

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695328A (zh) * 2020-06-16 2020-09-22 深圳前海微众银行股份有限公司 模拟测试报文生成方法、装置、设备及存储介质
CN111695328B (zh) * 2020-06-16 2023-01-24 深圳前海微众银行股份有限公司 模拟测试报文生成方法、装置、设备及存储介质
CN112037002A (zh) * 2020-09-03 2020-12-04 中国银行股份有限公司 一种基于分布式支付系统的去碎片化报文处理方法及系统
CN112037002B (zh) * 2020-09-03 2024-04-23 中国银行股份有限公司 一种基于分布式支付系统的去碎片化报文处理方法及系统
CN112419004A (zh) * 2020-12-07 2021-02-26 恩亿科(北京)数据科技有限公司 全渠道订单可配置接入的方法、系统、设备及存储介质
CN112419004B (zh) * 2020-12-07 2024-02-02 恩亿科(北京)数据科技有限公司 全渠道订单可配置接入的方法、系统、设备及存储介质
CN114070886A (zh) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 报文转换方法、装置、设备及介质
CN115103034A (zh) * 2022-06-27 2022-09-23 京东科技信息技术有限公司 一种报文协议转换的方法和装置

Also Published As

Publication number Publication date
CN109947994B (zh) 2022-12-27
CN109947994A (zh) 2019-06-28

Similar Documents

Publication Publication Date Title
WO2020029971A1 (zh) 支付过程的处理方法、装置、介质及电子设备
US10862979B2 (en) Techniques for supporting remote micro-services as native functions in spreadsheet applications
CN110489440B (zh) 数据查询方法和装置
CN112685154A (zh) 任务流引擎的数据处理方法、任务流引擎、设备和介质
WO2020207174A1 (zh) 用于生成量化神经网络的方法和装置
CN109769141A (zh) 一种视频生成方法、装置、电子设备及存储介质
US11954133B2 (en) Method and apparatus for managing and controlling resource, device and storage medium
JP2009527849A (ja) Edi交換のスケーラブルな変換および構成
CN114528044B (zh) 一种接口调用方法、装置、设备及介质
JP7197620B2 (ja) Dagインタラクションに基づくストリーミングコンピューティング方法及び装置
CN111127181B (zh) 一种凭证记账方法和装置
JP2021170335A (ja) アプリケーション構築方法、装置、電子設備、記憶媒体、及びプログラム
CN114675820A (zh) 服务编排数据的处理方法、装置、电子设备和存储介质
CN112732468B (zh) 数据处理方法、数据交互系统及计算设备
CN111522617B (zh) 一种维护系统的方法、装置和电子设备
CN109697034A (zh) 一种数据写入方法、装置、电子设备及存储介质
CN116932168A (zh) 异构核调度方法及装置、存储介质、电子设备
US11228537B2 (en) Resource processing method and system, storage medium and electronic device
CN111241137A (zh) 数据处理方法、装置、电子设备及存储介质
US10360701B2 (en) Integrated visualization
CN115145652A (zh) 一种数据处理任务的创建方法、装置、设备及介质
CN111414161B (zh) 一种生成idl文件的方法、装置、介质和电子设备
WO2021042715A1 (zh) 用于开发智能合约的系统、方法和装置
CN112596729A (zh) 目标应用界面生成方法及装置、可读介质和电子设备
CN112825107B (zh) 一种生成图表的方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19846347

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19846347

Country of ref document: EP

Kind code of ref document: A1