A data processing method, apparatus, device, and storage medium
By closing the unsuccessful first payment flow during the payment process and obtaining the payment address of the second payment platform, the repeated payment problems caused by network instability or system failure are solved, and the accuracy of the payment process and the user's payment security are achieved.
Patent Information
- Application Number
- CN202010164347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-11
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2040-03-11
AI Technical Summary
When using a third-party payment platform to make product payments, the network is unstable or the system is faulty, the order payment status may be inconsistent with the payment status corresponding to the payment platform, which in turn may lead to repeated payments from users.
By receiving the payment request sent by the terminal, it is determined that the product order is associated with the first payment flow data, and based on the first payment flow data, it determines that the payment status is unsuccessful, and sends the payment closing request to the first payment platform, obtains the payment address of the second payment platform, and sends the address to the terminal so that the terminal can make a second payment.
The first payment platform and the second payment platform are avoided to pay the same product order, ensuring the accuracy of the payment process and the user's payment security.
Smart Images

Figure CN113393233B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data processing, and particularly to a data processing method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of the Internet, online shopping malls are increasingly favored by merchants and buyers due to their many advantages such as convenience and affordability. To meet the needs of users and facilitate user payment, online shopping malls will connect to multiple payment methods, and each payment method needs to be connected to an independent payment platform.
[0003] During the process of using a third-party payment platform for product payment, if there are multiple payment methods and each payment method corresponds to a payment platform, when a user makes a payment using a third-party payment platform from the mall client, only by calling back or actively querying the third-party payment platform can the status of the order be known. When there are situations such as unstable network or system failures, it is easy for the callback to be delayed or fail, resulting in the inconsistency between the order payment status of the mall platform and the payment status corresponding to the third-party payment platform, and further leading to users making duplicate payments. Summary of the Invention
[0004] To solve the problem of duplicate payment, the embodiments of the present application provide a data processing method, apparatus, device and storage medium.
[0005] On the one hand, the embodiments of the present application provide a data processing method, which includes:
[0006] Receiving a payment request for a product order sent by a terminal, where the payment request includes an identifier of a second payment platform;
[0007] Determining that the product order is associated with first payment flow data, and the first payment flow data includes an identifier of a first payment platform;
[0008] If it is determined according to the first payment flow data that the payment status of the product order is not successful, sending a payment closure request to the first payment platform and receiving a payment closed response feedback by the first payment platform;
[0009] Obtaining the payment address of the second payment platform and sending the payment address of the second payment platform to the terminal.
[0010] On the other hand, the embodiments of the present application provide a data processing apparatus, which includes:
[0011] A transceiver unit, configured to receive a payment request for a product order sent by a terminal, where the payment request includes an identifier of a second payment platform;
[0012] A determination unit, configured to determine that the product order is associated with first payment transaction data, where the first payment transaction data includes an identifier of a first payment platform;
[0013] The determination unit is further configured to determine that the payment status of the product order is unsuccessful according to the first payment transaction data;
[0014] The transceiver unit is further configured to send a payment closing request to the first payment platform and receive a payment closed response fed back by the first payment platform;
[0015] A processing unit, configured to obtain a payment address of the second payment platform;
[0016] The transceiver unit is further configured to send the payment address of the second payment platform to the terminal.
[0017] Optionally, the determination unit is further configured to:
[0018] When determining that the payment status of the product order is successful payment, send an order paid response to the terminal.
[0019] Optionally, when there is no associated payment transaction data for the product order, the processing unit is configured to generate second payment transaction data for the product order and associate it with the product order, where the second payment transaction data includes an identifier of the second payment platform;
[0020] The transceiver unit is further configured to send a payment request for the product order to the second payment platform; receive a payment response sent by the second payment platform, where the payment response includes a payment address of the second payment platform.
[0021] Optionally, the determination unit is further configured to determine that the product order is associated with closed second payment transaction data, where the second payment transaction data includes an identifier of the second payment platform;
[0022] The transceiver unit is further configured to send a transaction activation request to the second payment platform, where the transaction activation request includes the second payment transaction data.
[0023] Optionally, the transceiver unit is further configured to receive a product order placing request sent by the terminal;
[0024] The processing unit is further configured to generate and store the product order.
[0025] Optionally, the transceiver unit is further configured to:
[0026] Send a payment query request for the product order to the first payment platform according to the first payment transaction data;
[0027] Receive the payment query response sent by the first payment platform, where the payment query response contains the payment status of the product order.
[0028] Optionally, the payment address of the second payment platform is the payment URL of the second payment platform;
[0029] The transceiver unit is further configured to:
[0030] Receive the payment result of the product order sent by the second payment platform; the payment result is the result of the terminal making a payment using the payment URL of the second payment platform.
[0031] On the other hand, an embodiment of the present application provides a computing device, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the steps of the data processing method provided by the embodiment of the present application.
[0032] On the other hand, an embodiment of the present application provides a storage medium, where the storage medium stores computer instructions, and when the computer instructions are run on a computer, the computer is caused to execute the steps of the data processing method provided by the embodiment of the present application.
[0033] The mall server in the embodiment of the present application is connected to the payment platform and uses the payment platform to make payments for product orders. The payment platform includes a first payment platform and a second payment platform. When a user makes a payment for a product order, the user first selects the first payment platform, then the product order is associated with the first payment flow data, and the first payment flow data contains the identifier of the first payment platform. During the payment process using the first payment platform, if the payment is not successful, the user can also select the second payment platform to make the payment.
[0034] The user sends a payment request for the product order to the mall server through the terminal, and the payment request contains the identifier of the second payment platform. The mall server determines that the product order is associated with the first payment flow data, and if it determines that the payment status of the product order is unsuccessful based on the first payment flow data, it sends a payment closure request to the first payment platform. The first payment platform closes the first payment flow according to the payment closure request and feeds back a payment closed response to the mall server. The mall server obtains and sends the payment address of the second payment platform to the terminal, so that the terminal can send a payment request for the product order to the second payment platform according to the payment address of the second payment platform, and then the second payment platform processes the payment for the product order.
[0035] When the embodiment of the present application uses the second payment platform to pay for a product order, when it is determined that there is an unpaid first payment transaction (corresponding to the first payment platform) for the order, the first payment transaction of the first payment platform needs to be closed before the second payment platform can be used for payment, thereby avoiding duplicate payments for the same product order by the first payment platform and the second payment platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0037] Figure 1 Shows a flowchart of a payment method in the prior art;
[0038] Figure 2 Shows a system architecture diagram of a data processing system provided by an embodiment of the present application;
[0039] Figure 3 Shows a schematic diagram of the interface of a terminal device in an embodiment of the present application;
[0040] Figure 4 Shows a flowchart of a data processing method provided by an embodiment of the present application;
[0041] Figure 5 Shows a flowchart of a data processing method provided by a specific embodiment of the present application;
[0042] Figure 6 Shows a schematic diagram of the structure of a distributed system applied to a blockchain system provided by another specific embodiment of the present application;
[0043] Figure 7 Shows a schematic diagram of a block structure provided by an embodiment of the present application;
[0044] Figure 8 Shows a block diagram of the structure of a data processing device provided by an embodiment of the present application;
[0045] Figure 9 Shows a block diagram of the structure of a server provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions of this application in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, rather than all, of the embodiments of the technical solutions of this application. Based on the embodiments recorded in this application document, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope protected by the technical solutions of this application.
[0047] In the specification, claims, and above-mentioned accompanying drawings of the present invention, the terms "first" and "second" are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices.
[0048] For ease of understanding, the following explains the terms involved in the embodiments of this application:
[0049] Payment platform: Also known as a third-party electronic payment platform, it is a third-party service intermediary that completes the function of third-party guaranteed payment. It mainly provides e-commerce basic support and application support services for enterprises engaged in e-commerce business, and does not directly engage in specific e-commerce activities. The third-party payment platform is independent of banks, websites, and merchants to perform clear functions for payment.
[0050] Mall server: The system server of an e-mall. An e-mall, also known as an online mall, is similar to a store in the real world. It is a virtual store that uses various e-commerce means to complete the process from buying to selling, thereby reducing intermediate links, eliminating transportation costs and price differences of agents, and creating great development space for ordinary consumption and increasing market circulation. An e-mall is a large-scale commodity electronic trading platform built with e-commerce software, and its main function is to accurately and quickly sell products to customers through the e-mall trading platform.
[0051] Payment transaction record: Similar to a bank transaction record, it refers to the transaction records of a payment account. A payment transaction record is a kind of supporting material to prove the payment situation of an individual or a company for products.
[0052] URL (Uniform Resource Locator): On the Internet, each information resource has a unified and unique address on the Internet, and this address is called a URL. It is the unified resource location mark on the Internet, that is, the network address.
[0053] Deeplink: Mobile deep linking (mobiledeep linking, deeplink) uses a URI to link to a specific location within an APP (Application, mobile application), rather than simply launching the APP's home page. Without Deeplink, each APP is independent. The links between content and services disappear, and app searches are fragmented. To a certain extent, each APP creates its own isolated island where links and data cannot be exchanged between apps. Deeplink enables APP developers to link to specific pages within the app. For example, user A sends a link to the introduction of a certain product on APP2 to user B on APP1. If APP1 uses Deeplink technology and user B has also installed APP2, then user B can click on the link and jump to the product page in APP2. The user can directly purchase the product on this page without having to jump to the home page and then search for it.
[0054] In the actual practice process, the current payment solution cannot completely avoid duplicate payments. The general approach is for the mall server to request the query interface of the payment platform through a scheduled script to reconcile the mall server with the payment platform and detect transaction records. When the scheduled script detects that a product order has been paid repeatedly, an alarm prompt is issued.
[0055] When a user selects a certain product in the e-mall and purchases the product through the e-mall's client, and selects the first payment platform for payment. The specific payment process is as Figure 1 shown and includes the following steps:
[0056] Step 101: The terminal sends a product order request to the mall server through the mall client.
[0057] Step 102: The mall server generates a product order based on the product selected by the user and stores the product order.
[0058] Step 103: The mall server sends a payment request to the first payment platform server.
[0059] Step 104: The first payment platform server sends the payment URL of the first payment platform to the mall server.
[0060] Step 105: The mall server sends the payment URL of the first payment platform to the mall client.
[0061] Step 106: The mall client sends a permission and security verification request to the first payment platform server according to the received payment URL.
[0062] Step 107: The first payment platform server conducts authority and security verification.
[0063] Step 108: The first payment platform server sends the verification result to the mall client.
[0064] Step 109: The mall client jumps to the client corresponding to the first payment platform installed on the same terminal through Deeplink technology.
[0065] Step 110: The first payment platform client sends a payment request for the product order to the first payment platform server.
[0066] Step 111: The first payment platform server processes the payment request.
[0067] Step 112: The first payment platform server feeds back the payment result to the first payment platform client and the mall server.
[0068] Step 113: The first payment platform client jumps back to the mall client.
[0069] In the above payment process, the mall server determines whether the payment is completed according to the feedback result of the first payment platform server in Step 112. There may be problems such as delayed or failed feedback from the payment platform due to unstable network, system failure, etc., resulting in inconsistent order status in the mall server and the payment transaction status corresponding to the first payment platform, and further leading to the problem of users making duplicate payments. In another possible specific transaction process, in Step 109, when the mall client jumps to the first payment platform client but does not make a payment, if the user uses another terminal device to select the second payment platform to pay for the same product order, since the product order has not been paid yet, the user can switch the payment method, and then on another terminal device, the mall client jumps to the second payment platform client. At this time, the payment pages of both the first payment platform client and the second payment platform client are valid, and the user can make payments using both terminals, resulting in the problem that a product order is paid more than once and the product order is duplicate-paid.
[0070] Based on the problems arising from the above processing flow, the inventors of this application conceived a data processing method to solve the problem of duplicate payment for orders. Specifically, in the embodiments of this application, the user first selects a first payment platform for payment, and the product order is associated with the first payment transaction data in the mall server. If the user then selects a second payment platform for payment, the mall server will determine whether the payment status of the product order is successful based on the first payment transaction data. When the product order has not been successfully paid, a payment closure request is sent to the first payment platform to cause the first payment platform to close the payment transaction for the product order. In this way, when the user makes a payment using the second payment platform, the payment transaction of the first payment platform has been closed, and there will be no problem of duplicate payment between the first payment platform and the second payment platform.
[0071] The following provides a brief introduction to the architecture of the technical solution of the embodiments of this application. It should be noted that the architecture introduced below is only used to illustrate the embodiments of this application and is not a limitation. In specific implementations, the technical solution provided by the embodiments of this application can be flexibly applied according to actual needs.
[0072] To further illustrate the technical solution provided by the embodiments of this application, the following provides a detailed description in combination with the accompanying drawings and specific implementation manners. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of this application.
[0073] Refer to Figure 2 , which is the system architecture diagram of the data processing method provided by the embodiments of this application. This architecture at least includes a terminal device 201, a mall server 202, a first payment platform server 203, and a second payment platform server 204. The mall client, the first payment platform client, and the second payment platform client are installed in the terminal device 201. The mall server 202 is the server corresponding to the mall client, the first payment platform server 203 is the server corresponding to the first payment platform client, and the second payment platform server 204 is the server corresponding to the second payment platform client.
[0074] The terminal device 201 can be a mobile phone, a personal computer (PC), a tablet computer (PAD), a personal digital assistant (PDA), a laptop computer, or a smart wearable device (such as a smart watch and a smart bracelet), etc. Shopping software and payment software can be installed in the terminal device 201. For example, the shopping software can be a mall platform application, and the mall platform application can include a Deeplink function. The payment software can be a payment platform application, and the payment platform application can include a payment function.
[0075] The user browses and selects a product in the mall client. The mall client displays multiple payment methods to the user, and the user can select one of the multiple payment methods for payment. Each payment method corresponds to a payment software. The mall client sends a payment request to the mall server. The mall platform determines the payment status of the product order according to the product order corresponding to the product. When it is determined that the product order has not been successfully paid, the mall client can call the payment software according to the payment method selected by the user, and the terminal device 201 displays the payment page of the payment software. Alternatively, the shopping software can also be a browser application, which can also include a Deeplink function. The user can make a payment in the payment page jumped by the browser application. Or the shopping software can also be a mini-program application, which includes a Deeplink function. The user can make a payment in the payment page jumped by the mini-program application.
[0076] The mall server 202 can be a background server of an application program or a website corresponding to the application program that includes a product display function and a function of calling other applications within the application. The first payment platform server 203 and the second payment platform server 204 can be background servers of application programs that include payment functions.
[0077] The mall server 202 and / or the first payment platform server 203 and / or the second payment platform server 204 can be an independent device or a server cluster formed by multiple servers. Preferably, the mall server 202 and / or the first payment platform server 203 and / or the second payment platform server 204 can use cloud computing technology for information processing.
[0078] The terminal device 201, the mall server 202, the first payment platform server 203, and the second payment platform server 204 can be communicatively connected through one or more networks. The network can be a wired network or a wireless network. For example, the wireless network can be a mobile cellular network or a Wireless-Fidelity (WIFI) network. Of course, it can also be other possible networks, and the embodiments of the present invention do not limit this.
[0079] An exemplary embodiment provided by the embodiments of the present application is introduced by taking the terminal device as a mobile phone as an example. Figure 3 An exemplary schematic diagram of a possible interface of the terminal device is shown, as Figure 3 shown. Multiple APPs can be installed in the terminal device, such as video, clock, information, secure mailbox, mobile phone, S memo, settings, etc. In the embodiments of the present invention, a mall client and a payment platform client can be pre-installed in the first terminal, such as a mall APP 301, a first payment APP 302, and a second payment APP 303.
[0080] Exemplarily, a user can select a product in the mall APP 301. After the user determines the product to be purchased, an order is placed through the mall APP 301. The mall server generates a product order according to the product selected by the user. The mall APP 301 displays payment options to the user, and the payment options include a first payment method and a second payment method. If the user selects the first payment method, the product display page of the mall APP 301 is switched to the payment page of the first payment APP 302. If the user does not want to pay using the first payment method at this time and selects the second payment method for payment, the mall server determines that the product order is associated with the first payment transaction data of the first payment platform and the payment status of the product order is not successful according to the received payment request, and then sends a payment cancellation request to the first payment platform server. After the first payment platform server closes the first payment transaction of the product order, the mall server sends the payment address of the second payment platform to the mall APP 301. The mall APP 301 jumps to the payment page of the second payment APP 303 according to the payment address of the second payment platform. Thus, since the first payment has been cancelled, the problem of duplicate payment for the product order will not occur.
[0081] Of course, the architecture provided by the embodiments of the present application is not limited to being used for Figure 2The structure shown in the embodiment of the present application is not limited. To further illustrate the technical solution provided by the embodiment of the present application, this is described in detail in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present application provides the method operation steps shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present application.
[0082] See also Figure 4 , is a flow chart of a method for processing an image provided by an embodiment of the present invention. The method can be applied to, for example, Figure 2 In the scenario shown, the flow of the method is described as follows.
[0083] Step 401: The mall server receives a payment request for a product order sent by a terminal, wherein the payment request includes an identifier of a second payment platform.
[0084] Optionally, the product here can be a real object that exists in reality, such as clothes, electrical appliances, toys, etc., or the product can also be a virtual commodity, such as financial investment products such as fund products, membership within a predetermined time period, game props, etc.
[0085] Product orders are order vouchers generated by the mall server based on the products selected by the user. Users need to place orders for the selected products, that is, users browse the mall website to select products and submit orders. The mall server allows members to modify and cancel their orders and other order management related operations within a certain time range, that is, during the period from when the user submits the order to the mall server to when the administrator has not confirmed the order.
[0086] The mall client displays multiple payment options for the user to choose from based on the multiple payment methods bound by the user. In an optional embodiment, when the user pays for the product order, the user selects a second payment method for the product order, and the terminal sends a payment request to the mall server, and the payment request includes an identifier of the second payment platform.
[0087] Step 402: The mall server determines that the product order is associated with the first payment transaction data, and the first payment transaction data includes an identifier of the first payment platform.
[0088] Here, the first payment flow data corresponds to the first payment platform, and the mall server stores the association relationship between the product order and the payment flow data. The association between the product order and the first payment flow data indicates that the user has selected the first payment platform to pay for the product order.
[0089] It should be noted that the first payment platform and the second payment platform are both any payment platforms among the multiple payment platforms bound by the user. The user can use the first payment platform for payment or the second payment platform for payment. The first payment platform and the second payment platform can be two different payment platforms, or the first payment platform and the second payment platform can be the same payment platform.
[0090] Step 403: If the mall server determines that the payment status of the product order is unsuccessful based on the first payment transaction data, it sends a payment closure request to the first payment platform.
[0091] The payment status of the product order includes unpaid, payment successful, and payment failed. Among them, both unpaid and payment failed indicate that the product order has not been successfully paid, that is, the payment status is unsuccessful.
[0092] In an optional embodiment, the mall server determines the payment status of the product order from the first payment platform. Specifically, the mall server sends a payment query request for the product order to the first payment platform according to the first payment transaction data;
[0093] The mall server receives the payment query response sent by the first payment platform, and the payment query response contains the payment status of the product order.
[0094] In the specific implementation process, the mall server can determine the payment status corresponding to the product order by calling the query interface of the payment platform. When the product order in the first payment platform has not been successfully paid, the user can also use the second payment platform for payment. To avoid duplicate payment, the mall server sends a payment closure request to the first payment platform.
[0095] In a preferred embodiment, the first payment platform and the second payment platform are two different payment platforms. For this product order, the user first selects the first payment platform for payment. Therefore, the product order and the first payment transaction data are stored in the mall server and are associated with each other. The mall server associates the product order with the first payment transaction data according to the user's selection of the first payment platform for payment. At this time, the status of the first payment transaction data is unpaid. When the mall server receives the payment result sent by the first payment platform, it can change the payment status corresponding to the first payment transaction data to payment successful or payment failed according to the payment result. After the user selects the first payment platform, the user can also select the second payment platform to pay for the same product order. At this time, after the mall server determines that the product order has been associated with the first payment transaction data, it needs to determine that the payment status of the product order is unsuccessful and send a payment closure request to the first payment platform to avoid duplicate payment between the first payment platform and the second payment platform.
[0096] In another possible embodiment, the first payment platform and the second payment platform may also be the same payment platform. In this case, when the user selects the second payment platform, it means that the user selects the same payment platform twice, that is, the second payment platform is also the first payment platform. When the user selects the first payment platform for the second time, it is necessary to ensure that the first payment on the first payment platform was not successful. The mall server determines that the payment status of the product order is not successful by calling the query interface of the first payment platform, and then the mall server sends a payment closure request to the first payment platform so that the first payment platform closes the first payment transaction record.
[0097] Step 404: The mall server receives the payment closed response feedback by the first payment platform.
[0098] Step 405: The mall server obtains the payment address of the second payment platform.
[0099] Here, the payment address of the second payment platform may be stored in the mall server, and the mall server directly obtains the payment address of the second payment platform from the database. If the payment address of the second payment platform is not stored in the mall server, the mall server may also send a request to the second payment platform to obtain the payment address of the second payment platform and store the payment address of the second payment platform in the database of the mall server.
[0100] Step 406: The mall server sends the payment address of the second payment platform to the terminal.
[0101] In the embodiment of the present application, the mall server is connected to the payment platform, and the payment platform is used to pay for the product order. The payment platform includes a first payment platform and a second payment platform. When the user pays for the product order, the user first selects the first payment platform, and then the product order is associated with the first payment transaction record data, and the first payment transaction record data contains the identifier of the first payment platform. During the payment process using the first payment platform, if the payment is not successful, the user can also select the second payment platform for payment.
[0102] The user sends a payment request for the product order to the mall server through the terminal. The payment request contains the identifier of the second payment platform. The mall server determines that the product order is associated with the first payment transaction record data, and determines that the payment status of the product order is not successful according to the first payment transaction record data, and then sends a payment closure request to the first payment platform. The first payment platform closes the first payment transaction record according to the payment closure request and sends a payment closed response to the mall server. The mall server obtains and sends the payment address of the second payment platform to the terminal, so that the terminal can send a payment request for the product order to the second payment platform according to the payment address of the second payment platform, and then the second payment platform processes the payment for the product order.
[0103] When the embodiment of the present application uses the second payment platform to pay for a product order, when it is determined that there is a first payment transaction (corresponding to the first payment platform) for the order that has not been successfully paid, the first payment transaction of the first payment platform needs to be closed before the second payment platform can be used for payment, thus avoiding duplicate payments for the same product order by the first payment platform and the second payment platform.
[0104] Optionally, in the embodiment of the present application, the two payments initiated by the user for the same product order can be initiated on the same terminal device or on two different terminal devices. For initiating two payments on the same terminal device, both the first payment platform client and the second payment platform client need to be installed on the terminal device. If they are initiated on two different terminal devices respectively, at least the first payment platform client needs to be installed on one terminal device, and at least the second payment platform client needs to be installed on the other terminal device.
[0105] In the specific implementation process, before the user selects a payment method, the mall server needs to generate a product order. Before the mall server receives the payment request for the product order sent by the terminal, it includes:
[0106] The mall server receives the product order request sent by the terminal;
[0107] The mall server generates and stores the product order.
[0108] Specifically, in an optional embodiment, the user can initiate two payment requests on the same terminal. First, the terminal displays various products in the e - mall to the user through the mall client, and the user selects the products to be purchased and performs the order - placing operation. The mall client sends a product order request to the mall server based on the selected products. The mall server generates a product order according to the product identifier included in the product order request and stores it in the database of the mall server.
[0109] After that, the mall client displays all the payment methods supported by the terminal to the user, including the first payment method corresponding to the first payment platform and the second payment method corresponding to the second payment platform. If the user selects the first payment method, the mall server associates the product order with the first payment transaction data. At this time, the payment status of the product order is unsuccessful. The mall server sends the payment address of the first payment platform to the mall client. The mall client can jump to the payment page of the first payment platform client and wait for the user's payment operation.
[0110] If the user does not want to pay with the first payment platform at this time and wants to choose the second payment platform for payment, the user does not need to close the first payment stream of the first payment platform. Instead, the user can return to the mall client and select the second payment method in the payment method of this product order. Then the mall client sends a payment request for the same product order to the mall server, and this payment request contains the identifier of the second payment platform. The product order in the mall server has been associated with the first payment stream data. Therefore, the mall server needs to ensure that the product order has not been paid by the first payment platform. When the payment status of the product order in the mall server is not successful, the mall server sends a payment closure request to the first payment platform to avoid duplicate payments.
[0111] In another alternative embodiment, the user can initiate two payment requests on different terminals. For ease of description, the terminal that issues the first payment request is regarded as the first terminal, and the terminal that issues the second payment request is regarded as the second terminal. At least the first payment platform client is installed in the first terminal, and at least the second payment platform client is installed in the second terminal. The mall client is installed in both terminals.
[0112] First, the first terminal displays various products in the e-mall to the user through the mall client. The user selects the products to be purchased and performs the order placement operation. After the mall server generates the product order, the first terminal displays all the payment methods supported by the first terminal to the user, including the first payment method. If the user selects the first payment method, the mall server associates the product order with the first payment stream data. At this time, the payment status of the product order is not successful. The mall server sends the payment address of the first payment platform to the first terminal. The first terminal displays the payment page of the first payment platform client and waits for the user's payment operation.
[0113] If the user does not complete the payment operation on the first terminal at this time but chooses to pay with the second payment platform, the user opens the mall client on the second terminal, selects the second payment method in the payment method of this product order, and the second terminal then sends a payment request for the same product order to the mall server. This payment request contains the identifier of the second payment platform. The product order in the mall server has been associated with the first payment stream data. Therefore, the mall server needs to ensure that the product order has not been paid by the first payment platform. When the payment status of the product order in the mall server is not successful, the mall server sends a payment closure request to the first payment platform to avoid duplicate payments.
[0114] After the first payment stream is closed, the mall server obtains the payment address of the second payment platform. Optionally, the payment address of the second payment platform is the payment URL of the second payment platform.
[0115] If the user has ever used the payment URL of the second payment platform to pay for products in the e - commerce mall, the payment URL of the second payment platform is stored in the database of the mall server, and the mall server can directly obtain it from the database. If the user has not used the payment URL of the second payment platform to pay for products in the e - commerce mall, the mall server needs to send a request to the second payment platform to obtain the payment URL of the second payment platform. After receiving the response from the second payment platform, the mall server can store the payment URL of the second payment platform and send it to the mall client.
[0116] To facilitate user operation, the mall client can have a Deeplink function, that is, the mall client calls the second payment platform client according to the payment URL and directly displays the payment interface of the second payment platform client without the user having to reopen the second payment platform client.
[0117] The second payment platform client sends a payment request to the second payment platform and receives the payment result feedback by the second payment platform. At the same time, to synchronize the status of the product order in the mall server, the second payment platform also sends the payment result of the product order to the mall server. The mall server receives the payment result of the product order sent by the second payment platform, and this payment result is the result of the terminal using the payment URL of the second payment platform for payment.
[0118] In the embodiment of the present application, after the mall server receives the payment request of the product order sent by the terminal, if it is determined that the payment status of the product order is successful payment, there is no need to execute the subsequent process, and directly send an order - paid response to the terminal. That is, since the product order has been paid, the second payment request of the user is directly rejected to avoid duplicate payment.
[0119] In an optional embodiment, after the mall server receives the payment request of the product order, if it is determined that there is no associated payment transaction data for the product order, that is, it indicates that the first payment method selected by the user corresponds to the second payment platform, the mall server generates the second payment transaction data of the product order and associates it with the product order. The second payment transaction data includes the identifier of the second payment platform.
[0120] The mall server sends a payment request of the product order to the second payment platform; and receives the payment response sent by the second payment platform, and the payment response contains the payment address of the second payment platform.
[0121] Furthermore, the mall server stores the status of the payment flow corresponding to each payment platform for the product order. Also, there is only one payment flow stored for the same payment platform. At the same time, there is also only one payment flow for a product order on one payment platform. This can simplify the payment reconciliation and troubleshooting between the mall server, the payment platform, and the client.
[0122] In this case, in order to distinguish different payment statuses or activation statuses, the payment flow in the mall server needs to store an identifier for the activation status or payment status. Then, after the mall server receives the payment closed response feedback from the first payment platform and before the mall server obtains the payment address of the second payment platform, it further includes:
[0123] The mall server determines that the product order is associated with the second payment flow data that has been closed, and the second payment flow data contains the identifier of the second payment platform;
[0124] The mall server sends a flow activation request to the second payment platform, and the flow activation request contains the second payment flow data.
[0125] In the specific implementation process, the payment flow corresponding to the payment platform can be closed through a payment close request. Then, the payment platform sets the status identifier of the payment flow to closed. At the same time, the status identifier of this payment flow in the mall server is also set to closed. The payment flow in the closed state cannot be used for further payment, but the mall server can send a flow activation request to the payment platform to activate the closed payment flow. After the payment platform receives the flow activation request, it opens the closed payment flow. Since the current payment flow has not been successfully paid, the status of this payment flow is unpaid. At the same time, the status identifier of this payment flow in the mall server is also updated to unpaid.
[0126] In this way, for the same product order, there is only one payment flow corresponding to one payment platform in the mall server, and at most only one payment flow of one payment platform is valid at the same time. At the same time, there is also only one payment flow for a product order on one payment platform, which is conducive to the merchant and the user to reconcile accounts and troubleshoot problems.
[0127] The following uses a specific embodiment to introduce the above process in detail.
[0128] Embodiment 1 provides a specific implementation process. Its system architecture includes a mall client, a mall server, a first payment client, a second payment client, a first payment platform, and a second payment platform. In Embodiment 1, the mall server already stores the product order of user A, and this product order has been associated with the first payment flow data, and the first payment flow corresponds to the first payment platform. The order placement method of this product order refers to Figure 1The process shown is not elaborated here. The method of the first embodiment is as Figure 5 shown and includes:
[0129] Step 501: The mall client displays multiple payment methods to the user. Based on the second payment method selected by the user, the mall client sends a payment interface acquisition request to the mall server. The second payment method corresponds to the second payment platform, and the payment interface acquisition request contains the identifier of the second payment platform.
[0130] Step 502: The mall server queries the mall database to obtain the status of the product order.
[0131] Step 503: Check whether the product order is in the paid status. If so, execute Step 504; otherwise, execute Step 505.
[0132] Step 504: The mall server sends a paid response to the mall client.
[0133] Step 505: The mall server determines whether the product order has been associated with the previous payment transaction. The previous payment transaction corresponds to the first payment platform. If so, execute Step 509; otherwise, execute Step 506.
[0134] Step 506: The mall server generates a second payment serial number, associates the second payment platform, the second payment serial number with the product order, and adds them to the mall database.
[0135] Step 507: The mall server sends a payment request to the second payment platform, determines the payment URL of the second payment platform according to the response sent by the second payment platform, and saves the payment URL of the second payment platform to the mall database.
[0136] Step 508: The mall server sends the payment URL of the second payment platform to the mall client so that the mall client can jump to the payment page of the second payment platform according to the payment URL.
[0137] Step 509: The mall server calls the query interface of the first payment platform according to the first payment transaction to obtain the payment status of the first payment transaction in the first payment platform.
[0138] Step 510: The mall server determines whether the payment status of the first payment transaction is paid. If so, execute Step 511; otherwise, execute Step 512.
[0139] Step 511: The mall server updates the payment status of the first payment transaction in the mall database to paid, and then executes Step 504.
[0140] Step 512: The mall server determines whether the first payment platform and the second payment platform are the same payment platform. If so, step 513 is executed; otherwise, step 514 is executed.
[0141] Step 513: The mall server obtains the payment URL of the first payment platform from the mall database, and then executes step 508.
[0142] Step 514: The mall server sends a payment closure request to the first payment platform. If the sending fails, step 515 is executed; if the execution is successful, step 516 is executed.
[0143] Step 515: The mall server sends a payment closure failure response to the mall client, guiding the user to make a payment using the first payment method or place a new order.
[0144] Step 516: The mall server queries the mall database to determine whether the product order is associated with the second payment transaction with the status of closed. If so, step 517 is executed; otherwise, step 506 is executed.
[0145] Step 517: The mall server sends a transaction activation request to the second payment platform to activate the second payment transaction in the second payment platform.
[0146] Step 518: The mall server queries the mall database to obtain the payment URL of the second payment platform, and then executes step 508.
[0147] It should be noted that the specific background processes such as the order generation process, the payment process of the first payment platform, and the payment process of the second payment platform involved in the above-mentioned Embodiment 1 are not introduced in detail. Those skilled in the art can clearly understand the relevant specific payment processes in the embodiments of the present application, and the embodiments of the present application will not elaborate further. In addition, the payment transaction data, payment requests, payment closure requests, transaction activation requests, etc. in the embodiments of the present application do not constitute a limitation on the overall payment process. Only to clearly describe the data processing process of product payment, the above descriptions can also be replaced with other names.
[0148] The data processing system involved in Embodiment 2 can be a distributed system formed by connecting a client and multiple nodes (any form of computing device connected to the network, such as a server, user terminal) through network communication.
[0149] Taking the distributed system as a blockchain system as an example, see Figure 6 , Figure 6FIG. 0 is an alternative structural diagram of the distributed system 100 provided in the second embodiment of the present invention when applied to a blockchain system. It is formed by multiple nodes (any form of computing device connected to the network, such as a server or a user terminal) and a client. A peer-to-peer (P2P) network is formed among the nodes. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a terminal can join and become a node. A node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0150] Refer to Figure 6 the functions of each node in the blockchain system shown, and the functions involved include:
[0151] 1) Routing, which is a basic function of a node and is used to support communication between nodes.
[0152] In addition to the routing function, a node may also have the following functions:
[0153] 2) Application, which is used to be deployed in the blockchain, implement specific services according to actual business requirements, record the data related to the implemented functions to form record data, carry a digital signature in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes verify the source and integrity of the record data successfully, they add the record data to the temporary block.
[0154] In the second embodiment of the present invention, the services implemented by the application include:
[0155] 2.1) Wallet, which is used to provide the function of conducting electronic currency transactions, including initiating a payment request (i.e., sending the transaction record of the payment to other nodes in the blockchain system). After other nodes verify successfully, as a response to acknowledging the validity of the transaction, they deposit the transaction record data into the temporary block of the blockchain. Of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;
[0156] 2.2) Shared ledger, which is used to provide functions such as storage, query, and modification of account data. It sends the record data of the operations on the payment flow to other nodes in the blockchain system. After other nodes verify its validity, as a response to acknowledging the data in the reconciliation file as valid, they deposit the record data into the temporary block and can also send a confirmation response to the node that initiated the operation.
[0157] 2.3) Smart contract, a computerized protocol that can execute the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met. According to actual business requirements, the code is used to complete automated transactions, such as querying the payment status of a product order and transferring the user's funds to the payment address of the second payment platform after confirmation on the second payment platform. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information.
[0158] 3) Blockchain, including a series of blocks (Block) that are sequentially connected in the order of generation. Once a new block is added to the blockchain, it will not be removed again. The block records the record data submitted by nodes in the blockchain system.
[0159] See Figure 7 , Figure 7 is an optional schematic diagram of the block structure provided by an embodiment of the present invention. Each block includes the hash value of the transaction records stored in this block (the hash value of this block) and the hash value of the previous block. The blocks are connected through the hash values to form a blockchain. In addition, the block may also include information such as the timestamp when the block is generated. Blockchain, essentially a decentralized database, is a string of data blocks associated using cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.
[0160] The following is an embodiment of the device of the present application. For details not described in detail in the device embodiment, reference can be made to the corresponding method embodiment above.
[0161] Please refer to Figure 8 , which shows the structural block diagram of the data processing device provided by an embodiment of the present application. The data processing device is implemented through hardware or a combination of hardware and software to become Figure 2 all or part of the mall server 202 in. The device includes: a transceiver unit 801, a determination unit 802, and a processing unit 803;
[0162] The transceiver unit 801 is used to receive the payment request of the product order sent by the terminal, and the payment request contains the identifier of the second payment platform;
[0163] The determination unit 802 is used to determine that the product order is associated with the first payment flow data, and the first payment flow data contains the identifier of the first payment platform;
[0164] The determination unit 802 is further used to determine that the payment status of the product order is unsuccessful according to the first payment flow data;
[0165] The transceiver unit 801 is further configured to send a payment closure request to the first payment platform and receive a payment closed response fed back by the first payment platform;
[0166] The processing unit 803 is configured to obtain the payment address of the second payment platform;
[0167] The transceiver unit 801 is further configured to send the payment address of the second payment platform to the terminal.
[0168] Optionally, the determination unit 802 is further configured to:
[0169] When determining that the payment status of the product order is successful payment, send an order paid response to the terminal.
[0170] Optionally, when there is no associated payment transaction data for the product order, the processing unit 803 is configured to generate second payment transaction data for the product order and associate it with the product order, and the second payment transaction data includes an identifier of the second payment platform;
[0171] The transceiver unit 801 is further configured to send a payment request for the product order to the second payment platform; receive a payment response sent by the second payment platform, and the payment response includes the payment address of the second payment platform.
[0172] Optionally, the determination unit 802 is further configured to determine that the product order is associated with closed second payment transaction data, and the second payment transaction data includes an identifier of the second payment platform;
[0173] The transceiver unit 801 is further configured to send a transaction activation request to the second payment platform, and the transaction activation request includes the second payment transaction data.
[0174] Optionally, the transceiver unit 801 is further configured to receive a product order placement request sent by the terminal;
[0175] The processing unit 803 is further configured to generate and store the product order.
[0176] Optionally, the transceiver unit 801 is further configured to:
[0177] Send a payment query request for the product order to the first payment platform according to the first payment transaction data;
[0178] Receive a payment query response sent by the first payment platform, and the payment query response includes the payment status of the product order.
[0179] Optionally, the payment address of the second payment platform is the payment URL of the second payment platform;
[0180] The transceiver unit 801 is further configured to:
[0181] Receive the payment result of the product order sent by the second payment platform; the payment result is the result of the terminal making a payment using the payment URL of the second payment platform.
[0182] Please refer to Figure 9 , which shows a block diagram of the structure of a server provided by an embodiment of the present application. The server 1000 is implemented as Figure 2 the mall server 202 in
[0183] The server 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The server 1000 further includes a basic input / output system (I / O system) 1006 for facilitating the transfer of information between various devices within the computer, and a mass storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.
[0184] The basic input / output system 1006 includes a display 1008 for displaying information and input devices 1009 such as a mouse and a keyboard for user input of information. Among them, the display 1008 and the input devices 1009 are both connected to the central processing unit 1001 through an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may further include an input / output controller 1010 for receiving and processing inputs from multiple other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1010 also provides output to a display screen, a printer, or other types of output devices.
[0185] The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable medium provide non-volatile storage for the server 1000. That is to say, the mass storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.
[0186] The computer-readable medium may include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technologies, CD-ROM, DVD or other optical storage, magnetic tape cartridges, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above several types. The above-mentioned system memory 1004 and mass storage device 1007 may be collectively referred to as memory.
[0187] According to various embodiments of the present invention, the server 1000 may also be run by a remote computer on the network connected through a network such as the Internet. That is, the server 1000 may be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005, or in other words, the network interface unit 1011 may also be used to connect to other types of networks or remote computer systems (not shown).
[0188] The memory further includes one or more programs, and the one or more programs are stored in the memory, and the one or more programs include instructions for performing the data processing method provided by the embodiments of the present invention.
[0189] Those of ordinary skill in the art can understand that all or part of the steps in the signing-in method of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. The storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, RandomAccess Memory), magnetic disk or optical disc, etc.
[0190] Those of ordinary skill in the art can understand that all or part of the steps in the signing-in method of the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. The storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random AccessMemory), magnetic disk or optical disc, etc.
[0191] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.
[0192] The foregoing are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A data processing method, characterized in that, the method includes: generating and storing a product order according to the product identifier carried in the order placement request sent by the terminal; receiving a payment request for the product order sent by the terminal in response to the user selecting a first payment method of a first payment platform on the mall client, and associating the product order with the first payment transaction data; sending the payment address of the first payment platform to the terminal so that the terminal jumps to the payment page of the first payment platform client; receiving a payment request for the product order sent by the terminal in response to the user selecting a second payment method of a second payment platform on the mall client, the payment request including an identifier of the second payment platform; determining that the product order is associated with the first payment transaction data, and the first payment transaction data includes an identifier of the first payment platform; if it is determined according to the first payment transaction data that the payment status of the product order is not successful, sending a payment closure request to the first payment platform so that the first payment platform closes the first payment transaction and returns a payment closed response; obtaining the payment address of the second payment platform and sending the payment address of the second payment platform to the terminal so that the terminal jumps to the payment page of the second payment platform client for payment.
2. The method according to claim 1, characterized in that, after receiving the payment request for the product order sent by the terminal in response to the user selecting a second payment method of a second payment platform on the mall client, it further includes: when it is determined that the payment status of the product order is successful payment, sending an order paid response to the terminal.
3. The method according to claim 2, characterized in that, when there is no associated payment transaction data for the product order, the obtaining the payment address of the second payment platform includes: generating second payment transaction data for the product order and associating it with the product order, and the second payment transaction data includes an identifier of the second payment platform; sending a payment request for the product order to the second payment platform; receiving a payment response sent by the second payment platform, and the payment response includes the payment address of the second payment platform.
4. The method according to claim 3, characterized in that, after receiving the payment closed response fed back by the first payment platform and before obtaining the payment address of the second payment platform, it further includes: determining that the product order is associated with the closed second payment transaction data, and the second payment transaction data includes an identifier of the second payment platform; sending a transaction activation request to the second payment platform, and the transaction activation request includes the second payment transaction data.
5. The method according to any one of claims 1 to 4, characterized in that, the determining that the payment status of the product order is not successful according to the first payment transaction data includes: sending a payment query request for the product order to the first payment platform according to the first payment transaction data; Receive the payment query response sent by the first payment platform, where the payment query response contains the payment status of the product order.
6. The method according to any one of claims 1 to 4, characterized in that the payment address of the second payment platform is the payment URL (Uniform Resource Locator) of the second payment platform; after sending the payment address of the second payment platform to the terminal, it further includes: Receiving the payment result of the product order sent by the second payment platform; the payment result is the result of the terminal making a payment using the payment URL of the second payment platform.
7. A data processing device, characterized in that the device includes: a determination unit, configured to generate and store a product order according to the product identifier carried in the order placement request sent by the terminal; a transceiver unit, configured to receive the payment request of the product order sent by the terminal in response to the user selecting the first payment method of the first payment platform on the mall client, and associate the product order with the first payment transaction data; send the payment address of the first payment platform to the terminal, so that the terminal jumps to the payment page of the first payment platform client; the transceiver unit is further configured to receive the payment request of the product order sent by the terminal in response to the user selecting the second payment method of the second payment platform on the mall client, where the payment request contains the identifier of the second payment platform; the determination unit is configured to determine that the product order is associated with the first payment transaction data, and the first payment transaction data contains the identifier of the first payment platform; the determination unit is further configured to determine that the payment status of the product order is unsuccessful according to the first payment transaction data; the transceiver unit is further configured to send a payment closing request to the first payment platform, so that the first payment platform closes the first payment transaction and feedbacks a payment closed response; a processing unit, configured to obtain the payment address of the second payment platform; the transceiver unit is further configured to send the payment address of the second payment platform to the terminal, so that the terminal jumps to the payment page of the second payment platform client to make a payment.
8. A computing device, characterized in that it includes at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor executes the data processing method according to any one of claims 1 to 6.
9. A storage medium, the storage medium stores computer instructions, characterized in that when the computer instructions run on a computer, the computer executes the data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
On-line-shop-based transaction method and system
CN108182572A