[go: up one dir, main page]

CN111401865A - Payment gateway system - Google Patents

Payment gateway system Download PDF

Info

Publication number
CN111401865A
CN111401865A CN202010260309.XA CN202010260309A CN111401865A CN 111401865 A CN111401865 A CN 111401865A CN 202010260309 A CN202010260309 A CN 202010260309A CN 111401865 A CN111401865 A CN 111401865A
Authority
CN
China
Prior art keywords
payment
service
payment gateway
gateway system
rule
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
CN202010260309.XA
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.)
Shanghai Handpal Information Technology Service Co ltd
Original Assignee
Shanghai Handpal Information Technology Service 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 Shanghai Handpal Information Technology Service Co ltd filed Critical Shanghai Handpal Information Technology Service Co ltd
Priority to CN202010260309.XA priority Critical patent/CN111401865A/en
Publication of CN111401865A publication Critical patent/CN111401865A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/02Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP]
    • G06Q20/027Payment architectures, schemes or protocols involving a neutral party, e.g. certification authority, notary or trusted third party [TTP] involving a payment switch or gateway
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/108Remote banking, e.g. home banking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

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

Abstract

The invention relates to a payment gateway system, which is connected with the outside of a payment system and the bank side of the payment system, and comprises a payment gateway module, a payment service module and a secret key service module, wherein the payment gateway module is in communication connection with the payment service module, the payment gateway system also comprises a service registration center, the payment service module keeps a unified core logic part in the payment service in a body, and separates out independent service packages formed by interaction logics of all payment mechanisms, all the independent service packages respectively correspond to all the bank terminals at the bank side of the payment system, and all the independent service packages and the unified core logic part are respectively in communication with the service registration center and establish the relationship between the independent service packages and the unified core logic part through the service registration center. Compared with the prior art, the method has the advantages of flexible system structure, improved access efficiency and the like.

Description

一种支付网关系统A payment gateway system

技术领域technical field

本发明涉及在线支付领域,尤其是涉及一种支付网关系统。The invention relates to the field of online payment, in particular to a payment gateway system.

背景技术Background technique

在现在各种应用中,在线支付的场景已经变得越来越普遍,随着支付结构的越来越多,例如众多的银行、支付宝、微信等等,原来那种一个支付方式一套流程的方法已不适用,需要一种统一的支付网关为各种应用场景提供服务。In various applications, online payment scenarios have become more and more common. With more and more payment structures, such as many banks, Alipay, WeChat, etc., the original one payment method is a set of processes. The method is no longer applicable, and a unified payment gateway is required to serve various application scenarios.

支付网关在一般系统应用中主要用于业务应用与各支付主体的衔接,其基本结构如图1所示,其中支付网关,是整个支付网关系统的对外前端部分,主要用于各类请求的接收及初步验证。密钥服务,用于支付结构、企业自己的密钥、证书的管理,并提供根据机构的不同,提供对应加密、解密、加签、验签等的服务。Bank支持包,由支付机构提供的支付活动中可能或必须使用的工具包。支付服务,是系统的核心,完成系统自身的业务逻辑处理,各类单据的记录等。In general system applications, payment gateways are mainly used for the connection between business applications and various payment entities. Its basic structure is shown in Figure 1. The payment gateway is the external front-end part of the entire payment gateway system, and is mainly used for receiving various requests. and preliminary verification. The key service is used for the management of payment structure, enterprise's own key and certificate, and provides services such as encryption, decryption, signature, and signature verification according to different institutions. Bank Support Package, a toolkit that may or must be used in payment activities provided by payment institutions. The payment service is the core of the system, which completes the business logic processing of the system itself and records various documents.

上述支付网关具有支付流程:The above payment gateway has a payment flow:

1、支付网关系统的外部,如授权的应用(本公司中为话费充值、卡券充值、油卡等业务系统),发起支付或退款等相关请求给到支付网关,该请求应该携带必要的关键信息,如鉴权信息,应用的订单(流水)号,支付(退款)的金额,必须使用的支付机构等等。1. Outside the payment gateway system, for example, authorized applications (in our company, business systems such as phone bill recharge, card and coupon recharge, fuel card, etc.), initiate payment or refund and other related requests to the payment gateway, and the request should carry the necessary Key information, such as authentication information, order (serial) number of the application, amount of payment (refund), payment institution that must be used, etc.

2、支付网关收到请求后,整理数据并交给支付服务处理,支付服务根据应用指定或用户指定的支付方式(比如工行支付、中行支付等),依据相应支付机构(工行、中行等)的交互协议的要求,通过其提供的支持包,或自主的完成协议报文,并与支付结构进行交互。2. After the payment gateway receives the request, it will sort out the data and hand it over to the payment service for processing. Interact with the requirements of the protocol, through the support package it provides, or complete the protocol message autonomously, and interact with the payment structure.

3、对于支付交易,在支付服务与支付结构完成“创建订单”操作后,需要将必要的信息返回给前端,以根据支付机构的实际要求发起客户端或浏览器的支付操作,让用户进行支付动作。3. For payment transactions, after the payment service and payment structure complete the "create order" operation, the necessary information needs to be returned to the front end to initiate client or browser payment operations according to the actual requirements of the payment institution, allowing users to make payments action.

4、用户支付动作完成后,支付机构会将支付结果通知到支付网关,网关收到通知后,将合法的通知信息交由支付服务处理。4. After the user's payment action is completed, the payment institution will notify the payment gateway of the payment result. After the gateway receives the notification, it will hand over the legal notification information to the payment service for processing.

5、支付服务依据与支付机构约定的协议,对支付通知进行解密、验签等处理,确定数据合法后,再通知到该笔订单对应的应用,完成整个支付流程。5. The payment service will decrypt and verify the payment notification according to the agreement with the payment institution. After confirming that the data is legal, it will notify the application corresponding to the order to complete the entire payment process.

另外对于无UI交互的服务请求,如退款、查询等,流程也基本类似。In addition, for service requests without UI interaction, such as refunds, queries, etc., the process is basically similar.

上述的支付网关系统的建立使得各种业务应用只需要与一个“支付机构”进行交互,无需重复开发,而可以将更多的精力专注于拓展自身的业务。抽象的看,这种结构也适用于多种应用与多个第三方有着相同交互的场景,但这种基础结构只适合一些业务规模较小的主体,随着支付机构的越来越多,一些弊端也会逐步出现,具体如下:The establishment of the above-mentioned payment gateway system enables various business applications to interact with only one "payment institution" without repeated development, and can focus more on expanding their own business. From an abstract point of view, this structure is also suitable for scenarios where multiple applications have the same interaction with multiple third parties, but this infrastructure is only suitable for some entities with small business scales. With the increasing number of payment institutions, some Disadvantages will gradually appear, as follows:

1)支付服务体量越来越大,资源消耗越来越多,更新启动越来越慢;1) The volume of payment services is getting larger and larger, the resource consumption is increasing, and the update startup is getting slower and slower;

2)需要包含的支持包越来越多,对于某些编程语言来说,会带来兼容性风险;2) More and more support packages need to be included, which will bring compatibility risks for some programming languages;

3)与支付机构的交互都在一个服务内,在新增、更新服务出现错误时可能都会影响。3) The interaction with the payment institution is all within one service, which may be affected by errors in adding and updating services.

发明内容SUMMARY OF THE INVENTION

本发明的目的就是为了克服上述现有技术存在的缺陷而提供一种支付网关系统。The purpose of the present invention is to provide a payment gateway system in order to overcome the above-mentioned defects of the prior art.

本发明的目的可以通过以下技术方案来实现:The object of the present invention can be realized through the following technical solutions:

一种支付网关系统,该系统与支付系统外部和支付系统银行侧连接,所述的支付网关系统包括支付网关模块、支付服务模块和秘钥服务模块,所述的支付网关模块与支付服务模块通信连接,A payment gateway system, the system is connected with the outside of the payment system and the bank side of the payment system, the payment gateway system includes a payment gateway module, a payment service module and a key service module, and the payment gateway module communicates with the payment service module connect,

所述的支付网关系统还包括服务注册中心,所述的支付服务模块将支付服务中统一核心逻辑部分保留在本体中,分离出与各支付机构的交互逻辑形成的独立服务包,各所述的独立服务包与支付系统银行侧的各银行终端分别对应,各所述的独立服务包和统一核心逻辑部分分别与服务注册中心通信,并通过服务注册中心建立两者的关系。The payment gateway system further includes a service registration center, and the payment service module keeps the unified core logic part of the payment service in the ontology, and separates independent service packages formed by the interaction logic with each payment institution. The independent service package corresponds to each bank terminal on the bank side of the payment system, and the independent service package and the unified core logic part respectively communicate with the service registration center, and establish the relationship between the two through the service registration center.

优选的,所述的独立服务包更新服务时,所述的统一核心逻辑部分和其余独立服务包保持正常运行。Preferably, when the independent service package updates the service, the unified core logic part and other independent service packages keep running normally.

优选的,所述的服务注册中心对于服务扩容的操作具体如下:增加服务实例并注册到服务注册中心后,即可对外提供服务。Preferably, the operation of the service registration center for service expansion is as follows: after adding a service instance and registering with the service registration center, the service can be provided externally.

优选的,所述的服务注册中心对于服务缩减的操作具体如下:在注册服务中心删除服务信息后,即可对相应的服务进行注销。Preferably, the operation of the service registration center for service reduction is as follows: after the registration service center deletes the service information, the corresponding service can be cancelled.

优选的,所述的独立服务包包括定制化交互服务包和通用交互服务包。Preferably, the independent service package includes a customized interactive service package and a general interactive service package.

优选的,对于所述的通用交互服务包,所述的系统还包括依次连接的代码或规则编辑入口、动态代码或规则加载器和规则解释执行器,所述的通用交互服务包与规则解释执行器连接。Preferably, for the general interactive service package, the system further includes a code or rule editing entry, a dynamic code or rule loader, and a rule interpretation executor connected in sequence, the general interactive service package and the rule interpretation and execution device connection.

优选的,所述的通用交互服务包执行时,根据支付机构以及操作类型,通过动态代码执行或者通过规则解释执行器完成流程逻辑处理。Preferably, when the general interactive service package is executed, according to the payment institution and the operation type, the process logic processing is completed through dynamic code execution or through a rule interpretation executor.

优选的,所述的动态代码执行的具体过程如下:Preferably, the specific process of the dynamic code execution is as follows:

(1)通过代码编辑入口编写针对支付机构某一操作的代码,并将其存储,形成支付接口、操作类型、代码内容三者一对一的结构;(1) Write a code for a certain operation of the payment institution through the code editing portal, and store it to form a one-to-one structure of payment interface, operation type, and code content;

(2)实际使用时,通过支付机构、操作类型找到对应的代码,并动态执行,返回相对应的结果。(2) In actual use, find the corresponding code through the payment institution and operation type, execute it dynamically, and return the corresponding result.

优选的,所述的规则解释执行器的实现具体为:所述的规则解释执行器完成对既定规则的解释及运行,完成整个交互过程,并返回结果。Preferably, the implementation of the rule interpretation executor is as follows: the rule interpretation executor completes the interpretation and operation of the established rules, completes the entire interaction process, and returns the result.

优选的,所述的规则解释执行器包括:Preferably, the rule interpretation executor includes:

入参规则解释器:将输入参数处理为支付机构的入参要求;Parameter input rule interpreter: process input parameters as input parameter requirements of payment institutions;

支付机构报文组装器:按照支付机构报文组装规则,组装报文;Payment institution message assembler: assemble messages according to payment institution message assembly rules;

远程交互器:根据传输方式定义,与支付结构进行交互;Remote Interactor: Interacts with the payment structure according to the transport method definition;

响应报文解释器:根据返回参数规则解析支付机构响应报文,并组装返回参数。Response message interpreter: Parses the response message of the payment institution according to the return parameter rules, and assembles the return parameters.

与现有技术相比,本发明具有以下优点:Compared with the prior art, the present invention has the following advantages:

1)系统结构灵活,可以基础系统结构,与改进结构、动态代码方式,三种结构可以共存,并且在改进时支付机构的交互服务都已独立化或动态化,每个服务间也是独立互不影响的。1) The system structure is flexible, it can coexist with the basic system structure, the improved structure and the dynamic code method, and the interactive services of the payment institutions have been independent or dynamic during the improvement, and each service is also independent from each other. affected.

2)可以根据公司的实际情况逐步推进,公司已有的系统结构不进行变化,引入服务注册中心,新接入的支付机构按照新的方式处理,核心支付服务判断处理(例如在支付机构配置信息中加入是采用何种处理方式的参数),可以不需要耗费太多的资源处理那些业务量比较少的机构。2) It can be gradually advanced according to the actual situation of the company. The existing system structure of the company will not be changed. The service registration center will be introduced. The parameter of the processing method is added in the middle, so that those institutions with less business volume can be processed without consuming too many resources.

3)动态处理逻辑的加入是将与支付机构交互过程中相对不变的流程抽象出来,将变化的部分动态化,可编辑化;加大了工作的灵活度,提高了接入的效率。3) The addition of dynamic processing logic is to abstract the relatively unchanged process in the interaction with the payment institution, and make the changed part dynamic and editable; it increases the flexibility of work and improves the efficiency of access.

附图说明Description of drawings

图1为现有支付系统的结构框图;Fig. 1 is the structural block diagram of the existing payment system;

图2为本发明支付系统的结构框图;Fig. 2 is the structural block diagram of the payment system of the present invention;

图3为本发明服务的扩容与缩减的示意图;Fig. 3 is the schematic diagram of the expansion and reduction of the service of the present invention;

图4为本发明另一种实现方式的结构框图;4 is a structural block diagram of another implementation manner of the present invention;

其中1为支付系统外部,2为支付网关系统,3为支付系统银行侧,201为支付网关模块,202为支付服务模块,203为秘钥服务模块,204为服务注册中心,205为独立服务包,206为代码或规则编辑入口,207为动态代码或规则加载器,208为规则解释执行器,2081为入参规则解释器,2082为支付机构报文组装器,2083为远程交互器,2084为响应报文解释器。1 is the external payment system, 2 is the payment gateway system, 3 is the bank side of the payment system, 201 is the payment gateway module, 202 is the payment service module, 203 is the key service module, 204 is the service registration center, and 205 is the independent service package , 206 is the code or rule editing entry, 207 is the dynamic code or rule loader, 208 is the rule interpretation executor, 2081 is the input rule interpreter, 2082 is the payment institution message assembler, 2083 is the remote interactor, and 2084 is the Response message interpreter.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.

如图2所示,一种支付网关系统2,该系统与支付系统外部1和支付系统银行侧3连接,所述的支付网关系统2包括支付网关模块201、支付服务模块202、秘钥服务模块203和服务注册中心204,所述的支付网关模块201与支付服务模块202通信连接,As shown in FIG. 2, a payment gateway system 2 is connected with the outside of the payment system 1 and the bank side 3 of the payment system. The payment gateway system 2 includes a payment gateway module 201, a payment service module 202, and a key service module 203 and the service registration center 204, the payment gateway module 201 is connected in communication with the payment service module 202,

所述的支付服务模块将支付服务中统一核心逻辑部分保留在本体中,分离出与各支付机构的交互逻辑(创建订单、退款等等)形成的独立服务包205,各所述的独立服务包205与支付系统银行侧3的各银行终端分别对应,各所述的独立服务包205和统一核心逻辑部分分别与服务注册中心204通信,并通过服务注册中心204建立两者的关系。The payment service module keeps the unified core logic part of the payment service in the ontology, and separates the independent service package 205 formed by the interaction logic (creation of orders, refunds, etc.) with each payment institution. The package 205 corresponds to each bank terminal on the bank side 3 of the payment system respectively. The independent service package 205 and the unified core logic part respectively communicate with the service registration center 204 and establish the relationship between the two through the service registration center 204 .

如图3所示,将变动性最多的交互部分分离出更小的服务后,与每个支付机构的交互逻辑都独立为一个单独的服务,如果涉及到支持包也只影响自身,更新服务时,支付服务核心与其他支付机构完全不被影响,很好解决了基础机构中的弊端。同时,服务一般涉及两种,一个是服务提供着,一个是服务的消费者,服务的提供者将自己的信息,如什么服务,在哪(网络地址)提供给到服务注册中心,服务的消费者从服务注册中心找到需要的服务及地址后,访问使用。因此服务扩容时只需要增加实例并注册到中心既可对外提供服务,反之将服务的信息在中心删除后,消费者无法找到,也就不提供服务了,因此服务注册中心这种机制引入后,使得对服务的扩容与缩减变动更加容易,可以根据实际需要动态调整资源来适应业务的变化。As shown in Figure 3, after separating the most variable interaction part into smaller services, the interaction logic with each payment institution is independent as a separate service. If the support package is involved, it only affects itself. When the service is updated , the payment service core and other payment institutions are not affected at all, which solves the shortcomings of the basic institutions. At the same time, services generally involve two types, one is the service provider, and the other is the service consumer. The service provider provides its own information, such as what service and where (network address) to the service registration center, and the service consumption After finding the required service and address from the service registration center, the user can access and use it. Therefore, when the service is expanded, it is only necessary to add instances and register to the center to provide services to the outside world. On the contrary, after the service information is deleted in the center, consumers cannot find it, and the service will not be provided. Therefore, after the introduction of the service registration center mechanism, It makes it easier to expand and reduce changes in services, and dynamically adjust resources to adapt to business changes according to actual needs.

对于大部分支付机构来说,与其交互的过程中除了交互报文内容、结构不同外,交互方式没有本质的区别,也不需要特殊的支持包,本申请通过加入动态代码或者动态规则的支持,来更一步提高效率。For most payment institutions, in the process of interacting with them, except for the content and structure of the interactive message, there is no essential difference in the interaction method, and no special support package is required. This application supports by adding dynamic codes or dynamic rules, to further improve efficiency.

如图4所示,所述的独立服务包205包括定制化交互服务包2051和通用交互服务包2052。As shown in FIG. 4 , the independent service package 205 includes a customized interactive service package 2051 and a general interactive service package 2052 .

对于所述的通用交互服务包,所述的系统还包括依次连接的代码或规则编辑入口206、动态代码或规则加载器207和规则解释执行器208,所述的通用交互服务包2052与规则解释执行器208连接。For the general interactive service package, the system further includes a code or rule editing entry 206, a dynamic code or rule loader 207, and a rule interpretation executor 208, which are connected in sequence. The general interactive service package 2052 is connected with the rule interpretation Actuator 208 is connected.

具体实现过程如下:The specific implementation process is as follows:

1、建立一个通用的银行交互服务、动态代码(规则)加载器,代码(规则)编辑入口;1. Establish a general bank interactive service, dynamic code (rule) loader, and code (rule) editing entry;

2、通用银行交互服务的服务接口定义应是统一固定的,分别为创建订单、撤销(退款)、查询支付交易、查询退款交易等;2. The service interface definition of the general bank interactive service should be unified and fixed, including creating an order, canceling (refunding), querying payment transactions, querying refund transactions, etc.;

3、通用银行交互服务执行时根据支付机构以及操作类型,通过动态代码执行或者通过规则解释执行器完成流程逻辑处理;3. According to the payment institution and the type of operation, the general bank interactive service is executed through dynamic code execution or through the rule interpretation executor to complete the process logic processing;

3.1、动态代码方式,可采用类似于Groovy的编程语言(Groovy是用于Java虚拟机的一种敏捷的动态语言)来实现。3.1. The dynamic code method can be implemented by using a programming language similar to Groovy (Groovy is an agile dynamic language used for the Java virtual machine).

(1)通过代码编辑入口编写针对支付机构某一操作的代码,并将其存入数据库、文件等持久化设备(位置),并形成支付接口、操作类型、代码内容三者一对一的结构(如A银行创建订单的代码);(1) Write a code for a certain operation of the payment institution through the code editing portal, and store it in a persistent device (location) such as a database and file, and form a one-to-one structure of payment interface, operation type, and code content (such as the code for Bank A to create an order);

(2)实际使用时,通过支付机构、操作类型找到对应的代码,并动态执行,返回相对应的结果;(2) In actual use, find the corresponding code through the payment institution and operation type, execute it dynamically, and return the corresponding result;

(3)Groovy的编写使用方法,可以参考http://www.groovy-lang.org/。(3) For the method of writing and using Groovy, please refer to http://www.groovy-lang.org/.

3.2、规则解释方式实现(以创建订单为例)3.2. Implementation of rule interpretation (taking order creation as an example)

(1)创建订单的基本流程一般为,接收输入参数,如支付系统流水号,支付金额,支付机构(代号、编号)等,然后根据支付机构协议组装支付参数,将组装好的参数进行加密(加签)处理,再发送到机构端,机构端返回流水号等用户支付需要的参数,服务接口组装返回;(1) The basic process of creating an order is generally to receive input parameters, such as the payment system serial number, payment amount, payment institution (code, number), etc., and then assemble the payment parameters according to the payment institution agreement, and encrypt the assembled parameters ( signed) processing, and then sent to the institution side, the institution side returns the serial number and other parameters required by the user for payment, and the service interface is assembled and returned;

(2)根据流程定义,规则部分必须包含;(2) According to the process definition, the rules part must contain;

①配置参数定义,如商户号,创建订单请求地址等;①Configuration parameter definition, such as merchant number, create order request address, etc.;

②输入参数,配置参数与支付机构参数的对照关系,以及参数的处理规则,例如参数默认值、金额处理逻辑(处理成分或元)等;②Input parameters, the comparison relationship between configuration parameters and payment institution parameters, and the processing rules of parameters, such as parameter default values, amount processing logic (processing components or elements), etc.;

③支付机构报文的组装规则,一般为request方式、json格式、xml格式;③The assembly rules of the payment institution's message are generally in the request method, json format, and xml format;

④参与加密(加签)内容定义;④Participate in the definition of encrypted (signed) content;

⑤传输方式定义(socket,http,https单向,https双向);⑤Transmission mode definition (socket, http, https one-way, https two-way);

⑥返回参数格式及字段对照关系定义(与输入参数整好相反,此处反向映射为支付系统的返回结果);⑥Definition of return parameter format and field comparison relationship (contrary to the input parameters, the reverse mapping here is the return result of the payment system);

(3)规则解释执行器,完成对既定规则的解释及运行,完成整个交互过程,并返回结果。(3) The rule interpretation executor completes the interpretation and operation of the established rules, completes the entire interaction process, and returns the result.

规则解释执行器也可以分成多个,具体为:Rule interpretation executors can also be divided into multiple, specifically:

入参规则解释器2081:将输入参数处理为支付机构的入参要求;Parameter entry rule interpreter 2081: Process the input parameter as an entry requirement of the payment institution;

支付机构报文组装器2082:按照支付机构报文组装规则,组装报文(需要调用密钥服务进行加密加签);Payment institution message assembler 2082: Assemble the message according to the payment institution message assembly rule (need to call the key service for encryption and signature);

远程交互器2083:根据传输方式定义,与支付结构进行交互;Remote Interactor 2083: Interacts with the payment structure according to the transmission method definition;

响应报文解释器2084:根据返回参数规则解析支付机构响应报文,并组装返回参数;Response message interpreter 2084: parses the payment institution response message according to the return parameter rules, and assembles the return parameters;

多个执行器协同工作最终完成创建订单的任务。Multiple executors work together to complete the task of creating an order.

动态处理逻辑的加入是将与支付机构交互过程中相对不变的流程抽象出来,将变化的部分动态化,可编辑化。加大了工作的灵活度,提高了接入的效率。但是对于一些有特殊交互或要求的支付机构适用性不高。因此定制化交互服务,和通用交互服务并存,但互不影响。随着技术发展,应能达到可以动态加载、使用定制支持包,最终实现全动态运行。The addition of dynamic processing logic is to abstract the relatively unchanged process in the interaction with the payment institution, and make the changed part dynamic and editable. Increase the flexibility of work and improve the efficiency of access. However, it is not suitable for some payment institutions with special interactions or requirements. Therefore, customized interactive services and general interactive services coexist, but do not affect each other. With the development of technology, it should be possible to dynamically load and use customized support packages, and finally realize full dynamic operation.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalents within the technical scope disclosed by the present invention. Modifications or substitutions should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (10)

1. A payment gateway system is connected with the outside of a payment system and the bank side of the payment system, the payment gateway system comprises a payment gateway module, a payment service module and a secret key service module, the payment gateway module is connected with the payment service module in a communication way, and the payment gateway system is characterized in that,
the payment gateway system also comprises a service registration center, the payment service module keeps a unified core logic part in the payment service in the body, and separates out independent service packages formed by interactive logics with each payment mechanism, each independent service package corresponds to each bank terminal at the bank side of the payment system, each independent service package and the unified core logic part are respectively communicated with the service registration center, and the relationship between the independent service package and the unified core logic part is established through the service registration center.
2. The payment gateway system of claim 1, wherein the unified core logic and the remaining independent service packages are kept operating normally when the independent service packages update services.
3. The payment gateway system of claim 1, wherein the service registry performs service volume expansion as follows: after the service instance is added and registered in the service registration center, the service can be provided to the outside.
4. The payment gateway system of claim 1, wherein the service registry operates specifically for service reduction as follows: after the service information is deleted in the registered service center, the corresponding service can be logged off.
5. The payment gateway system of claim 1, wherein the independent service packages comprise a customized interactive service package and a generic interactive service package.
6. The payment gateway system of claim 5, wherein for said generic interaction service package, said system further comprises a code or rule editing portal, a dynamic code or rule loader and a rule interpretation executor connected in sequence, said generic interaction service package being connected to said rule interpretation executor.
7. The payment gateway system of claim 6, wherein the generic interaction service package, when executed, performs the process logic processing via dynamic code execution or via a rule interpretation executor according to the payment mechanism and operation type.
8. The payment gateway system of claim 7, wherein the dynamic code executes the following specific procedures:
(1) compiling a code aiming at a certain operation of the payment mechanism through a code editing inlet, and storing the code to form a one-to-one structure of a payment interface, an operation type and a code content;
(2) when the method is actually used, the corresponding codes are found through the payment mechanism and the operation type, and are dynamically executed, and the corresponding results are returned.
9. The payment gateway system of claim 7, wherein the rule interpretation executor is implemented as: the rule explanation executor completes the explanation and operation of the established rule, completes the whole interaction process and returns the result.
10. The payment gateway system of claim 7, wherein the rule interpretation executor comprises:
and a reference rule interpreter: processing the input parameters into the participation requirements of the payment mechanism;
a payment mechanism message assembler: assembling messages according to the message assembling rules of the payment mechanism;
the remote interaction device: interacting with the payment structure according to the transmission mode definition;
a response message interpreter: and analyzing the payment mechanism response message according to the return parameter rule, and assembling the return parameters.
CN202010260309.XA 2020-04-03 2020-04-03 Payment gateway system Pending CN111401865A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010260309.XA CN111401865A (en) 2020-04-03 2020-04-03 Payment gateway system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010260309.XA CN111401865A (en) 2020-04-03 2020-04-03 Payment gateway system

Publications (1)

Publication Number Publication Date
CN111401865A true CN111401865A (en) 2020-07-10

Family

ID=71436844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010260309.XA Pending CN111401865A (en) 2020-04-03 2020-04-03 Payment gateway system

Country Status (1)

Country Link
CN (1) CN111401865A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527759A (en) * 2023-05-05 2023-08-01 中国建设银行股份有限公司 Bank-enterprise interconnection method, device, proxy server, medium and product
CN117522396A (en) * 2023-11-22 2024-02-06 北京高汇通商业管理有限公司 Payment channel configuration method, device, equipment and media

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034449A (en) * 2007-04-17 2007-09-12 华中科技大学 Method, system and mobile terminal for implementing electronic payment
CN105427101A (en) * 2015-11-19 2016-03-23 成都连银信息技术有限公司 Unified payment access gateway supporting multiple payment channels
CN105988785A (en) * 2015-02-05 2016-10-05 阿里巴巴集团控股有限公司 RPC (remote procedure call) service development method and device
CN110111092A (en) * 2019-04-02 2019-08-09 上海瀚之友信息技术服务有限公司 A kind of compatible system of payment channel
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 Method and device for invoking microservices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101034449A (en) * 2007-04-17 2007-09-12 华中科技大学 Method, system and mobile terminal for implementing electronic payment
CN105988785A (en) * 2015-02-05 2016-10-05 阿里巴巴集团控股有限公司 RPC (remote procedure call) service development method and device
CN105427101A (en) * 2015-11-19 2016-03-23 成都连银信息技术有限公司 Unified payment access gateway supporting multiple payment channels
CN110111092A (en) * 2019-04-02 2019-08-09 上海瀚之友信息技术服务有限公司 A kind of compatible system of payment channel
CN110457143A (en) * 2019-07-25 2019-11-15 腾讯科技(深圳)有限公司 Method and device for invoking microservices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116527759A (en) * 2023-05-05 2023-08-01 中国建设银行股份有限公司 Bank-enterprise interconnection method, device, proxy server, medium and product
CN117522396A (en) * 2023-11-22 2024-02-06 北京高汇通商业管理有限公司 Payment channel configuration method, device, equipment and media

Similar Documents

Publication Publication Date Title
US12259876B2 (en) System and method for a hybrid contract execution environment
US8543508B2 (en) Gateway abstraction layer
US10546284B2 (en) Mobile wallet as provider of services consumed by service provider applications
US9508073B2 (en) Shareable widget interface to mobile wallet functions
US20140089120A1 (en) Aggregating multiple transaction protocols for transacting between a plurality of distinct payment acquiring devices and a transaction acquirer
CN102067184A (en) Method of accessing applications in a secure mobile environment
CN111401865A (en) Payment gateway system
US11379191B2 (en) Presentation oriented rules-based technical architecture display framework
US10740760B2 (en) Framework for managing online transactions in internet of things (IoT)
CN114331678A (en) Financial loan transaction processing method and device, electronic equipment and storage medium
WO2023091082A1 (en) Methods and systems for transaction processing using a blockchain
US9342541B1 (en) Presentation oriented rules-based technical architecture display framework (PORTRAY)
CN114462986A (en) Payment engine configuration method, device, electronic device and storage medium
US20250094251A1 (en) Systems and methods for providing a middle-tier framework
US20250384440A1 (en) Commercial beneficiary profiles for transactions
AU2015201425B2 (en) Gateway abstraction layer
US12099998B2 (en) Configurable, reactive architecture framework for data stream manipulation at scale
CN121526599A (en) Payment methods, devices, equipment, media and procedures products
CN119887187A (en) Resource processing method based on block chain and related equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200710