CN110633977A - Payment exception processing method and device and terminal equipment - Google Patents

Payment exception processing method and device and terminal equipment Download PDF

Info

Publication number
CN110633977A
CN110633977A CN201910710865.XA CN201910710865A CN110633977A CN 110633977 A CN110633977 A CN 110633977A CN 201910710865 A CN201910710865 A CN 201910710865A CN 110633977 A CN110633977 A CN 110633977A
Authority
CN
China
Prior art keywords
payment
order
abnormal
result information
payment result
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
CN201910710865.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.)
Shenzhen Rongyimai Information Technology Co Ltd
Original Assignee
Shenzhen Rongyimai Information Technology 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 Shenzhen Rongyimai Information Technology Co Ltd filed Critical Shenzhen Rongyimai Information Technology Co Ltd
Priority to CN201910710865.XA priority Critical patent/CN110633977A/en
Publication of CN110633977A publication Critical patent/CN110633977A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/325Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices using wireless networks

Landscapes

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

Abstract

The application is applicable to the technical field of computers, and provides a payment exception handling method, a device and terminal equipment, wherein the payment exception handling method comprises the following steps: calling a payment interface of a third-party payment platform to pay a transaction order, and if network abnormality is detected, marking the transaction order as an abnormal order; calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failure payment; and if the payment result information of the abnormal order returned by the third-party payment platform is received, storing the payment result information of the abnormal order. The method and the device for determining the order payment result state can solve the problem that the order payment result state is not clear due to network abnormity.

Description

Payment exception processing method and device and terminal equipment
Technical Field
The application belongs to the technical field of computers, and particularly relates to a payment abnormity method and device and terminal equipment.
Background
In existing electronic transaction platforms (e.g., financial transaction platforms, shopping platforms, etc.), it is often necessary to invoke a payment interface of a third party payment platform (e.g., paypal, wechat payment, etc.) to make a payment to complete a transaction.
However, when the electronic transaction platform calls the payment interface of the third party payment platform, a network fault may exist, so that it may be impossible to know whether the payment result status of the current transaction order is successful or failed, thereby causing a consequence that the account cannot be checked accurately in a later period.
Disclosure of Invention
In view of this, embodiments of the present application provide a payment exception handling method, an apparatus, and a terminal device, so as to solve a problem in the prior art how to resolve an ambiguous status of an order payment result caused by a network exception.
A first aspect of an embodiment of the present application provides a payment exception handling method, including:
calling a payment interface of a third-party payment platform to pay a transaction order, and if network abnormality is detected, marking the transaction order as an abnormal order;
calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failure payment;
and if the payment result information of the abnormal order returned by the third-party payment platform is received, storing the payment result information of the abnormal order.
A second aspect of the embodiments of the present application provides a payment exception handling apparatus, including:
the payment unit is used for calling a payment interface of a third-party payment platform to pay a transaction order, and if the network abnormality is detected, the transaction order is marked as an abnormal order;
the payment result query unit is used for calling a payment result query interface of a third-party payment platform and querying the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failed payment;
and the payment result information storage unit is used for storing the payment result information of the abnormal order if the payment result information of the abnormal order returned by the third-party payment platform is received.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the payment exception handling method when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the payment exception handling method as described.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the payment exception handling method according to any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, the transaction order with the network abnormality when the payment interface of the third-party payment platform is called can be recorded, and the final payment result information of the abnormal order is obtained by inquiring the payment result information of the abnormal order by calling the payment result inquiry interface of the third-party payment platform, so that the final payment result of the abnormal order with the network abnormality when the payment is carried out (namely when the payment interface of the third-party payment platform is called) can be obtained, the problem that the order payment result state is unclear due to the network abnormality is solved, and the accuracy and the efficiency of later-stage account checking are improved.
It is understood that the beneficial effects of the second aspect to the fifth aspect can be referred to the related description of the first aspect, and are not described herein again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of an implementation of a first payment exception handling method provided in an embodiment of the present application;
fig. 2 is a schematic system structure diagram of a payment system provided in an embodiment of the present application;
fig. 3 is an interaction flow diagram of a payment exception handling method according to an embodiment of the present application;
fig. 4 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 5 is a schematic flow chart of an implementation of a second payment exception handling method provided in the embodiment of the present application;
fig. 6 is a schematic diagram of a payment exception handling apparatus provided in an embodiment of the present application;
fig. 7 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The first embodiment is as follows:
fig. 1 shows a schematic flow chart of a first payment exception handling method provided in an embodiment of the present application, which is detailed as follows:
the execution main body of the embodiment of the application is terminal equipment, in particular to terminal equipment loaded with an electronic trading platform, and the electronic trading platform can be a financial trading platform, a commodity trading platform and the like. And the electronic transaction platform of the terminal equipment receives the payment instruction of the user side, and calls a payment interface of a third party payment platform with a third party server as a carrier to finish payment operation. As shown in fig. 2, a schematic structural diagram of a payment system provided in the embodiment of the present application is shown, where the payment system includes a user terminal 21, a terminal device 22 equipped with an electronic transaction platform, and a carrier third party server 23 of a third party payment platform.
In S101, a payment interface of a third-party payment platform is called to pay a transaction order, and if network abnormality is detected, the transaction order is marked as an abnormal order.
And acquiring a payment instruction operated by the user, and calling a payment interface of a third-party payment platform to pay the transaction order currently operated by the user. And if the fact that the network abnormality exists when the third-party payment platform is called is detected, the transaction order which is paid currently is marked as an abnormal order. Specifically, after a payment instruction operated by a user is obtained, the generated transaction order is stored, where the transaction order may include information such as an order number, an order generation time, a transaction amount, and a transaction account number. Optionally, when each trade order is generated, the order number of the trade order is stored in a trade order summary table, and the trade order summary table further includes payment result information of the trade order stored corresponding to the order number. Alternatively, the marking of the trade order as the abnormal order may be marking the stored trade order with first identification information (for example, marking characters such as "abnormal", "0", etc. in the trade order information), or marking a storage item corresponding to the trade order in a trade order summary table (for example, the trade order summary table includes an order number column and a trade result information column, and may add second identification information such as characters such as "abnormal", "0", etc. as an identification to the trade result information column item in the same row as the order number of the trade order), or marking the trade order number in the abnormal order table. Optionally, data such as exception orders, trade order summary tables, exception order tables, etc. are stored in a database, such as an oracle database.
Optionally, the step S101 includes:
and calling a payment interface of the third-party payment platform to pay the transaction order and waiting for the target waiting time, and if response information returned by the third-party payment platform is not detected, marking the transaction order as an abnormal order.
Under the condition that the network is normal and the local terminal and the third-party payment platform can stably communicate, the local terminal receives response information returned by the third-party payment platform after calling a payment interface of the third-party payment platform, wherein the response information comprises payment result information of the current transaction order. If the response information returned by the third-party payment platform is not detected after the payment interface of the third-party payment platform is called to pay the transaction order and the waiting time of the target is long, the current network communication is overtime, the current network is abnormal, and the transaction order is marked as an abnormal order. Alternatively, the target waiting duration may be set according to the average response duration of the early test record, and the target waiting duration may be set to be slightly longer than the average response duration.
In S102, a payment result query interface of a third party payment platform is called to query the payment result information of the abnormal order, where the payment result information of the abnormal order is information identifying successful payment, or information identifying failure of payment.
Due to the fact that network abnormality exists when the abnormal order is used for calling a payment interface of the third-party payment platform to carry out payment, the payment result information of the abnormal order cannot be obtained. And after the payment operation is finished, actively calling a payment result query interface of the third-party payment platform to query the payment result information of the abnormal order. Specifically, a payment result query interface of the third-party payment platform is called, a query instruction containing the order number information of the abnormal order queried currently is sent to the third payment platform, and the payment result information of the abnormal order is queried. The payment result information of the abnormal order comprises information for identifying successful payment or information for identifying failed payment, and whether the transaction payment of the abnormal order is successfully executed or not can be accurately known through the payment result information. If the local terminal successfully transmits the payment result query instruction to the third-party payment platform by calling the payment result query interface of the third-party payment platform, the third-party payment platform verifies information such as payment account information and payment balance of the user according to the order information of the abnormal order, if the verification is passed, the third-party payment platform returns information identifying successful payment, and if the verification is not passed, the third-party payment platform returns information identifying failed payment.
Optionally, before the step S102 is executed, the network connectivity status may be detected, and the step S102 is executed if the network connectivity is detected. Since the operation of calling the payment interface of the third-party payment platform to pay the transaction order is short connection, the network anomaly occurring during payment is usually caused by network timeout caused by network fluctuation. But in a few cases, the network abnormality may be caused by the network disconnection of the local terminal. Therefore, before executing step S102, the network connectivity status may be detected, if it is detected that the network is disconnected, the user is prompted to check the network connectivity setting of the home terminal, and step S102 is executed when the network recovers the connectivity status.
Optionally, the invoking a payment result query interface of the third party payment platform to query the payment result information of the abnormal order includes:
calling a payment result query interface of a third-party payment platform every preset time length, querying the payment result information of the abnormal order, and recording the queried times of the abnormal order;
if the inquired times reach a preset threshold value and the payment result information of the abnormal order can not be received, marking the abnormal order as an unknown order and not inquiring the payment result information of the unknown order any more.
When the payment result information of an abnormal order is inquired, network abnormal conditions such as network fluctuation and the like may still exist, so that the payment result information of the abnormal order returned by the third-party payment platform still cannot be received after the payment result inquiry interface of the third-party payment platform is called, therefore, the preset time length can be set, the payment result inquiry interface of the third-party payment platform is automatically called at intervals, the payment result information of the abnormal order is obtained through multiple times of inquiry, and the inquired times of the abnormal order is recorded when the abnormal order is inquired each time. Optionally, the task scheduling framework quartz sets an exception handling timing task, and obtains a preset number of stored exception orders and performs payment result information query on the exception orders at preset time intervals (for example, one minute).
When the number of inquired times corresponding to an abnormal order reaches a preset threshold (for example, 10) and the payment result information of the abnormal order cannot be received, it indicates that the third-party payment platform does not record the related information of the abnormal order or has other unknown faults, and at this time, the abnormal order is marked as an unknown order. For example, the third identification information (for example, "unknown", "X", or other characters) may be marked on the order information of the unknown order, or the fourth identification information may be marked on the storage item corresponding to the unknown order in the trade order summary table (for example, the trade order summary table includes an order number column and a trade result information column, and the fourth identification information may be added to the trade result information column item in the same row as the order number of the trade order, for example, "unknown", "X", or other characters as an identifier), or the unknown order may be stored in a specified area to be processed and deleted from the abnormal order table, or the like, so as to distinguish the unknown order from the abnormal order. And then the payment result information of the unknown order is not inquired. Because the identification information corresponding to the abnormal order and the unknown order is different or the unknown order is deleted from the abnormal order table, the abnormal processing timing task only acquires the transaction order marked as the abnormal order through identification or from the abnormal order table, and the unknown order is not inquired any more.
In the embodiment of the application, the payment result information of the abnormal order in which the payment result information is not obtained can be automatically inquired every other preset time through the timing task, so that the probability of obtaining the payment result information can be improved through multiple times of inquiry; meanwhile, the query times are limited by the preset threshold value, so that excessive invalid queries can be avoided, and system resources are saved.
Optionally, after the no longer querying the payment result information of the unknown order, further comprising:
and storing the unknown order into a target report.
And storing the information of the unknown orders, in which the payment result information cannot be obtained after the inquiry of the preset threshold times, into a target report so as to count and check bills later. Specifically, the information of the unknown order stored in the target report includes the order number information of the unknown order. Optionally, the information of the unknown order stored in the target report may further include information of an order generation time, a transaction amount, a transaction account number, and the like of the unknown order.
Optionally, the method further includes, before the calling a payment interface of the third party payment platform to pay the transaction order, and if a network anomaly is detected, marking the transaction order as an abnormal order, that:
and receiving a setting instruction, and setting the preset duration and/or the preset threshold.
The administrator of the electronic trading platform can set the interval time of the abnormal processing timing task (namely the task of regularly inquiring the payment result information of the abnormal order) or the limited inquiry times according to the actual needs. By receiving the setting instruction, the preset time duration (i.e., the interval time of each inquiry operation) and/or the preset threshold (i.e., the limited number of inquiries) may be set. By receiving a setting instruction and setting the preset time and/or the preset threshold, the abnormal processing timing task and the limited query times can be flexibly adjusted to adapt to actual needs (for example, when the local terminal runs busy and the system resource residual space is less, the preset time can be increased, the preset threshold can be reduced, and the consumption of the system resource is reduced).
In S103, if the payment result information of the abnormal order returned by the third party payment platform is received, the payment result information of the abnormal order is stored.
And if the payment result information of the abnormal order returned by the third party payment platform is received after the payment result inquiry interface of the third party payment platform is called for inquiry, storing the payment result information of the abnormal order, specifically, binding and storing the payment result information and the order number of the abnormal order. Optionally, the payment result information may be updated to a corresponding position of the transaction order summary table according to the order number of the abnormal order, so as to perform transaction order statistics later.
For convenience of understanding, by way of example and not limitation, fig. 3 in the embodiments of the present application presents an interaction schematic diagram of a payment exception handling method, which is detailed as follows:
(1) the user sends a payment instruction to the electronic transaction platform 32 through the user terminal 31;
(2) after receiving the payment instruction, the electronic transaction platform 32 calls a payment interface of the third-party payment platform 33 to pay the transaction order, and if a network anomaly is detected during calling, the transaction order is marked as an abnormal order;
(3) the electronic transaction platform 32 regularly calls a payment result query interface of the third-party payment platform 43 through an exception handling timing task to query the payment result information of the abnormal order;
(4) when receiving the payment result information of the abnormal order returned by the third party payment platform 33, the electronic transaction platform 32 stores the payment result information of the abnormal order.
For ease of understanding, by way of example and not limitation, fig. 4 shows an application scenario diagram of an embodiment of the present application, which is detailed as follows:
(1) the user A enables the user terminal 41 to send a payment instruction to the electronic transaction platform through payment operation;
(2) the terminal device 42 equipped with the electronic trading platform receives the payment instruction and executes the payment exception handling method according to the embodiment of the application, interacts with the third-party server 43 equipped with the third-party payment platform, records the trading order and updates the payment result information of the trading order, and can also generate a target report containing unknown order information.
(3) And the staff B of the electronic trading platform can check the information of the trading orders and the payment result information of the trading orders, can also check the target report forms, and communicates with the staff C of the third-party payment platform to check accounts according to the information. The electronic transaction platform can reduce the number of transaction orders with uncertain payment result information states through the payment abnormity processing method, so that the transaction orders needing to be checked can be reduced, and the efficiency of manual communication and checking is improved.
In the embodiment of the application, the transaction order with the network abnormality when the payment interface of the third-party payment platform is called can be recorded, and the final payment result information of the abnormal order is obtained by inquiring the payment result information of the abnormal order by calling the payment result inquiry interface of the third-party payment platform, so that the final payment result of the abnormal order with the network abnormality when the payment is carried out (namely when the payment interface of the third-party payment platform is called) can be obtained, the problem that the order payment result state is unclear due to the network abnormality is solved, and the accuracy and the efficiency of later-stage account checking are improved.
Example two:
fig. 5 shows a flowchart of a second payment exception handling method provided in the embodiment of the present application, which is detailed as follows:
in S501, a payment interface of a third party payment platform is called to pay a transaction order, and if a network anomaly is detected, the transaction order is stored in an anomaly order table as an anomaly order.
And acquiring a payment instruction operated by the user, and calling a payment interface of a third-party payment platform to pay the transaction order currently operated by the user. And if the network abnormality is detected when the third-party payment platform is called, storing the transaction order which is currently paid as an abnormal order in an abnormal order table. Specifically, the order number of the abnormal order is stored in the abnormal order table.
In S502, the abnormal order table is searched in a traversal manner every preset time interval, where the traversing search for the abnormal order includes: and sequentially calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order in the abnormal order table traversed currently.
And the local terminal sets an exception handling timing task through quartz, and regularly traverses the exception orders of the exception order table every preset time. Specifically, at preset intervals, the traversal query operation on the abnormal order list is started, and the following operations are sequentially executed on each abnormal order in the abnormal order list: and calling a payment result query interface of the third-party payment platform according to the order number information of the currently traversed abnormal order to query the payment result information of the abnormal order. Optionally, each timing task only traverses N abnormal orders (N is a positive integer, for example, N is 200) in the abnormal order table, so as to reduce the time length occupied by a single timing task and avoid that the abnormal processing timing task occupies system resources for a long time. For example, if the number of the abnormal orders in the abnormal order list is 2N, the timing task only traverses the first N abnormal orders, the timing task traverses the (N + 1) th to the 2N th abnormal orders next time, and then returns to the first N abnormal orders, and so on.
In the embodiment of the application, the abnormal order table is searched in a regularly traversing manner, and the payment result query interface of the third-party payment platform can be called periodically, so that the payment result information of the abnormal order in the abnormal order table can be obtained timely and automatically, and the quantity of the transaction orders with uncertain payment result states is reduced.
Optionally, after the querying the payment result information of the abnormal order in the abnormal order table currently traversed by the query, the method further includes:
recording the number of times of inquiry corresponding to the abnormal order in the currently traversed abnormal order table;
if the inquired times reach a preset threshold value and the payment result information of the abnormal order in the abnormal order table traversed currently cannot be received, marking the abnormal order in the abnormal order table traversed currently as an unknown order and not inquiring the payment result information of the unknown order.
And after the payment result information of the currently traversed abnormal order in the abnormal order table is queried, recording the queried times of the abnormal order. For example, initially, the number of queried times corresponding to each abnormal order is 0, and then, after each traversal and query, the number of queried times corresponding to each abnormal order is increased by 1.
If it is detected that the queried number corresponding to the currently traversed abnormal order reaches a preset threshold (for example, 10) and the payment result information of the abnormal order returned by the third-party payment platform cannot be received at this time, marking the abnormal order as an unknown order, for example, storing the abnormal order into an unknown order list, and not querying the payment result information of the unknown order, for example, deleting the unknown order from the abnormal order list, so that the next timed task does not query any more. Because the query times are limited by the preset threshold, excessive invalid queries can be avoided, and system resources are saved.
Optionally, after the no longer querying the payment result information of the unknown order, further comprising:
and storing the unknown order into a target report.
And storing the information of the unknown orders, in which the payment result information cannot be obtained after the inquiry of the preset threshold times, into a target report so as to count and check bills later. Specifically, the information of the unknown order stored in the target report includes the order number information of the unknown order. Optionally, the information of the unknown order stored in the target report may further include information of an order generation time, a transaction amount, a transaction account number, and the like of the unknown order.
Optionally, the method further includes, before the calling a payment interface of the third party payment platform to pay the transaction order, and if a network anomaly is detected, marking the transaction order as an abnormal order, that:
and receiving a setting instruction, and setting the preset duration and/or the preset threshold.
The administrator of the electronic trading platform can set the interval time of the abnormal processing timing task (namely the task of regularly inquiring the payment result information of the abnormal order) or the limited inquiry times according to the actual needs. By receiving the setting instruction, the preset time duration (i.e., the interval time of each inquiry operation) and/or the preset threshold (i.e., the limited number of inquiries) may be set. By receiving a setting instruction and setting the preset time and/or the preset threshold, the abnormal processing timing task and the limited query times can be flexibly adjusted to adapt to actual needs (for example, when the local terminal runs busy and the system resource residual space is less, the preset time can be increased, the preset threshold can be reduced, and the consumption of the system resource is reduced).
In S503, if the payment result information of the abnormal order returned by the third party payment platform is received, the payment result information of the abnormal order is stored, and the abnormal order is deleted from the abnormal order table.
And if the payment result inquiry interface of the third-party payment platform is called for inquiry, the payment result information of the abnormal order returned by the third-party payment platform is received, the payment result information of the abnormal order is stored, and the abnormal order is deleted from the abnormal order table, so that the information of the transaction order which is informed of the payment result information is not inquired any more in the next timing task.
In the embodiment of the application, the transaction orders with network abnormality when the payment interface of the third-party payment platform is called are stored in the abnormal order table, the abnormal orders in the abnormal order table are searched in a traversing mode every preset time length, the abnormal orders are deleted from the abnormal order table after the payment result information of one abnormal order is received, therefore, the payment result information of a plurality of abnormal orders can be actively searched periodically, the quantity of the transaction orders with uncertain order payment result states is reduced, and the accuracy and the efficiency of later-stage account checking are improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Example three:
fig. 6 shows a schematic structural diagram of a payment exception handling apparatus provided in an embodiment of the present application, and for convenience of explanation, only parts related to the embodiment of the present application are shown:
the payment exception handling apparatus includes: a payment unit 61, a payment result inquiry unit 62 and a payment result information storage unit 63. Wherein:
and the payment unit 61 is used for calling a payment interface of the third-party payment platform to pay the transaction order, and if the network abnormality is detected, the transaction order is marked as an abnormal order.
And acquiring a payment instruction operated by the user, and calling a payment interface of a third-party payment platform to pay the transaction order currently operated by the user. And if the fact that the network abnormality exists when the third-party payment platform is called is detected, the transaction order which is paid currently is marked as an abnormal order. Specifically, after a payment instruction operated by a user is obtained, the generated transaction order is stored, where the transaction order may include information such as an order number, an order generation time, a transaction amount, and a transaction account number. Optionally, when each trade order is generated, the order number of the trade order is stored in a trade order summary table, and the trade order summary table further includes payment result information of the trade order stored corresponding to the order number. Alternatively, the marking of the trade order as the abnormal order may be marking the stored trade order with first identification information (for example, marking characters such as "abnormal", "0", etc. in the trade order information), or marking a storage item corresponding to the trade order in a trade order summary table (for example, the trade order summary table includes an order number column and a trade result information column, and may add second identification information such as characters such as "abnormal", "0", etc. as an identification to the trade result information column item in the same row as the order number of the trade order), or marking the trade order number in the abnormal order table. Optionally, data such as exception orders, trade order summary tables, exception order tables, etc. are stored in a database, such as an oracle database.
Optionally, the payment unit 61 includes:
the first detection unit is used for calling a payment interface of the third-party payment platform to pay the transaction order and waiting for the target waiting duration, and if the response information returned by the third-party payment platform is not detected yet, the transaction order is marked as an abnormal order.
And a payment result query unit 62, configured to invoke a payment result query interface of a third party payment platform, and query the payment result information of the abnormal order, where the payment result information of the abnormal order is information identifying successful payment, or information identifying failure payment.
Due to the fact that network abnormality exists when the abnormal order is used for calling a payment interface of the third-party payment platform to carry out payment, the payment result information of the abnormal order cannot be obtained. And after the payment operation is finished, actively calling a payment result query interface of the third-party payment platform to query the payment result information of the abnormal order. Specifically, a payment result query interface of the third-party payment platform is called, a query instruction containing the order number information of the abnormal order queried currently is sent to the third payment platform, and the payment result information of the abnormal order is queried. The payment result information of the abnormal order comprises information for identifying successful payment or information for identifying failed payment, and whether the transaction payment of the abnormal order is successfully executed or not can be accurately known through the payment result information. If the local terminal successfully transmits the payment result query instruction to the third-party payment platform by calling the payment result query interface of the third-party payment platform, the third-party payment platform verifies information such as payment account information and payment balance of the user according to the order information of the abnormal order, if the verification is passed, the third-party payment platform returns information identifying successful payment, and if the verification is not passed, the third-party payment platform returns information identifying failed payment.
Optionally, the payment result query unit 62 includes a first query module and a first query number monitoring module:
the first query module is used for calling a payment result query interface of a third-party payment platform every preset time length, querying the payment result information of the abnormal order and recording the queried times of the abnormal order;
and the first query frequency monitoring module is used for marking the abnormal order as an unknown order and not querying the payment result information of the unknown order any more if the queried frequency reaches a preset threshold value and the payment result information of the abnormal order cannot be received.
And the payment result information storage unit 63 is configured to store the payment result information of the abnormal order if the payment result information of the abnormal order returned by the third-party payment platform is received.
And if the payment result information of the abnormal order returned by the third party payment platform is received after the payment result inquiry interface of the third party payment platform is called for inquiry, storing the payment result information of the abnormal order, specifically, binding and storing the payment result information and the order number of the abnormal order. Optionally, the payment result information may be updated to a corresponding position of the transaction order summary table according to the order number of the abnormal order, so as to perform transaction order statistics later.
Optionally, the payment unit 61 includes an abnormal order storage module, the payment result information query unit 62 includes a traversal query module, and the payment result information storage unit 63 further includes a deletion module:
the abnormal order storage module is used for storing the transaction order as an abnormal order in an abnormal order table;
the traversal query module is configured to query the abnormal order table in a traversal manner every preset time interval, where the traversal query of the abnormal order table includes: sequentially calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order in the abnormal order table traversed currently;
and the deleting module is used for deleting the abnormal order from the abnormal order table.
Optionally, the traversal query module further includes: the inquired times recording module and the second inquiry times monitoring module:
the inquired frequency recording module is used for recording the inquired frequency corresponding to the abnormal order in the currently traversed abnormal order table;
and the second query frequency monitoring module is used for marking the abnormal order in the abnormal order table traversed currently as an unknown order and not querying the payment result information of the unknown order if the query frequency reaches a preset threshold value and the payment result information of the abnormal order in the abnormal order table traversed currently cannot be received.
Optionally, the payment exception handling apparatus further includes:
and the target report generation module is used for storing the unknown order into a target report.
Optionally, the payment exception handling apparatus further includes:
and the setting unit is used for receiving a setting instruction and setting the preset duration and/or the preset threshold.
In the embodiment of the application, the transaction order with the network abnormality when the payment interface of the third-party payment platform is called can be recorded, and the final payment result information of the abnormal order is obtained by inquiring the payment result information of the abnormal order by calling the payment result inquiry interface of the third-party payment platform, so that the final payment result of the abnormal order with the network abnormality when the payment is carried out (namely when the payment interface of the third-party payment platform is called) can be obtained, the problem that the order payment result state is unclear due to the network abnormality is solved, and the accuracy and the efficiency of later-stage account checking are improved.
Example four:
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72, such as a payment exception handler, stored in said memory 71 and operable on said processor 70. The processor 70, when executing the computer program 72, implements the steps in the various payment exception handling method embodiments described above, such as steps S101 to S103 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the units 61 to 63 shown in fig. 6.
Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 72 in the terminal device 7. For example, the computer program 72 may be divided into a payment unit, a payment result query unit, and a payment result information storage unit, and the specific functions of each unit are as follows:
and the payment unit is used for calling a payment interface of the third-party payment platform to pay the transaction order, and if the network abnormality is detected, the transaction order is marked as an abnormal order.
And the payment result query unit is used for calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failed payment.
And the payment result information storage unit is used for storing the payment result information of the abnormal order if the payment result information of the abnormal order returned by the third-party payment platform is received.
The terminal device 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may comprise more or less components than shown, or some components may be combined, or different components, for example the terminal device may further comprise input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used for storing the computer program and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A payment exception handling method, comprising:
calling a payment interface of a third-party payment platform to pay a transaction order, and if network abnormality is detected, marking the transaction order as an abnormal order;
calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failure payment;
and if the payment result information of the abnormal order returned by the third-party payment platform is received, storing the payment result information of the abnormal order.
2. The payment exception handling method according to claim 1, wherein the calling a payment interface of a third party payment platform to pay a transaction order, and if a network exception is detected, marking the transaction order as an exception order comprises:
and calling a payment interface of the third-party payment platform to pay the transaction order and waiting for the target waiting time, and if response information returned by the third-party payment platform is not detected, marking the transaction order as an abnormal order.
3. The payment exception handling method according to claim 1, wherein the invoking of the payment result query interface of the third party payment platform to query the payment result information of the exception order includes:
calling a payment result query interface of a third-party payment platform every preset time length, querying the payment result information of the abnormal order, and recording the queried times of the abnormal order;
if the inquired times reach a preset threshold value and the payment result information of the abnormal order can not be received, marking the abnormal order as an unknown order and not inquiring the payment result information of the unknown order any more.
4. The payment exception handling method of claim 1 wherein said marking said trade order as an exception order comprises:
storing the transaction order as an abnormal order in an abnormal order table;
correspondingly, the calling a payment result query interface of the third-party payment platform to query the payment result information of the abnormal order includes:
the abnormal order table is searched in a traversing mode every preset time, and the step of searching the abnormal order table in the traversing mode comprises the following steps: sequentially calling a payment result query interface of a third-party payment platform to query the payment result information of the abnormal order in the abnormal order table traversed currently;
correspondingly, after the step of storing the payment result information of the abnormal order if the payment result information of the abnormal order returned by the third party payment platform is received, the method further includes:
and deleting the abnormal order from the abnormal order table.
5. The payment exception handling method of claim 4, further comprising, after said querying payment result information of an exception order in the exception order table currently traversed to, further:
recording the number of times of inquiry corresponding to the abnormal order in the currently traversed abnormal order table;
if the inquired times reach a preset threshold value and the payment result information of the abnormal order in the abnormal order table traversed currently cannot be received, marking the abnormal order in the abnormal order table traversed currently as an unknown order and not inquiring the payment result information of the unknown order.
6. The payment exception handling method of claim 3 or 5, further comprising, after said no longer querying the payment result information of the unknown order:
and storing the unknown order into a target report.
7. The payment exception handling method according to claim 3 or 5, wherein before the calling the payment interface of the third party payment platform to pay the transaction order and marking the transaction order as an exception order if the network exception is detected, the method further comprises:
and receiving a setting instruction, and setting the preset duration and/or the preset threshold.
8. A payment exception handling apparatus, comprising:
the payment unit is used for calling a payment interface of a third-party payment platform to pay a transaction order, and if the network abnormality is detected, the transaction order is marked as an abnormal order;
the payment result query unit is used for calling a payment result query interface of a third-party payment platform and querying the payment result information of the abnormal order, wherein the payment result information of the abnormal order is information for identifying successful payment or information for identifying failed payment;
and the payment result information storage unit is used for storing the payment result information of the abnormal order if the payment result information of the abnormal order returned by the third-party payment platform is received.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201910710865.XA 2019-08-02 2019-08-02 Payment exception processing method and device and terminal equipment Pending CN110633977A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910710865.XA CN110633977A (en) 2019-08-02 2019-08-02 Payment exception processing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910710865.XA CN110633977A (en) 2019-08-02 2019-08-02 Payment exception processing method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN110633977A true CN110633977A (en) 2019-12-31

Family

ID=68970352

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910710865.XA Pending CN110633977A (en) 2019-08-02 2019-08-02 Payment exception processing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN110633977A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487071A (en) * 2020-11-17 2021-03-12 中信银行股份有限公司 Transaction query method and device, electronic equipment and readable storage medium
CN112529649A (en) * 2020-11-20 2021-03-19 深圳市智莱科技股份有限公司 Processing method and device for withholding abnormity of self-service charging cabinet and related equipment
CN113256276A (en) * 2021-06-07 2021-08-13 深圳华南城网科技有限公司 Payment state maintenance method and system based on order call-back
CN113643112A (en) * 2021-07-23 2021-11-12 山东浪潮通软信息科技有限公司 Method and device for judging financial transaction state
CN113793139A (en) * 2021-01-29 2021-12-14 北京京东拓先科技有限公司 Payment abnormity processing method, processing device, storage medium and electronic equipment
CN115277131A (en) * 2022-07-14 2022-11-01 国网福建省电力有限公司 Network security evaluation system based on multi-dimensional information processing
CN116051106A (en) * 2022-07-29 2023-05-02 荣耀终端有限公司 Abnormal order processing method and device
CN116051106B (en) * 2022-07-29 2024-06-11 荣耀终端有限公司 Abnormal order processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133797A (en) * 2017-04-28 2017-09-05 努比亚技术有限公司 One kind pays abnormal automatic testing method, terminal and computer-readable recording medium
CN107392722A (en) * 2017-07-27 2017-11-24 福建中金在线信息科技有限公司 Order processing method, apparatus, electronic equipment and storage medium
CN108520454A (en) * 2018-04-10 2018-09-11 平安科技(深圳)有限公司 The method and system of readjustment order in real time

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133797A (en) * 2017-04-28 2017-09-05 努比亚技术有限公司 One kind pays abnormal automatic testing method, terminal and computer-readable recording medium
CN107392722A (en) * 2017-07-27 2017-11-24 福建中金在线信息科技有限公司 Order processing method, apparatus, electronic equipment and storage medium
CN108520454A (en) * 2018-04-10 2018-09-11 平安科技(深圳)有限公司 The method and system of readjustment order in real time

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487071A (en) * 2020-11-17 2021-03-12 中信银行股份有限公司 Transaction query method and device, electronic equipment and readable storage medium
CN112529649A (en) * 2020-11-20 2021-03-19 深圳市智莱科技股份有限公司 Processing method and device for withholding abnormity of self-service charging cabinet and related equipment
CN112529649B (en) * 2020-11-20 2024-02-27 深圳市智莱科技股份有限公司 Processing method and device for self-service charging cabinet deduction abnormality and related equipment
CN113793139A (en) * 2021-01-29 2021-12-14 北京京东拓先科技有限公司 Payment abnormity processing method, processing device, storage medium and electronic equipment
CN113256276A (en) * 2021-06-07 2021-08-13 深圳华南城网科技有限公司 Payment state maintenance method and system based on order call-back
CN113643112A (en) * 2021-07-23 2021-11-12 山东浪潮通软信息科技有限公司 Method and device for judging financial transaction state
CN115277131A (en) * 2022-07-14 2022-11-01 国网福建省电力有限公司 Network security evaluation system based on multi-dimensional information processing
CN115277131B (en) * 2022-07-14 2023-10-10 国网福建省电力有限公司 Network security assessment system based on multidimensional information processing
CN116051106A (en) * 2022-07-29 2023-05-02 荣耀终端有限公司 Abnormal order processing method and device
CN116051106B (en) * 2022-07-29 2024-06-11 荣耀终端有限公司 Abnormal order processing method and device

Similar Documents

Publication Publication Date Title
CN110633977A (en) Payment exception processing method and device and terminal equipment
CN107819627B (en) System fault processing method and server
JP2019500680A (en) Data processing method and apparatus
CN111352902A (en) Log processing method and device, terminal equipment and storage medium
CN112597153B (en) Block chain-based data storage method, device and storage medium
CN110362455B (en) Data processing method and data processing device
CN110196759B (en) Distributed transaction processing method and device, storage medium and electronic device
CN109542935A (en) A kind of execution method, storage medium and the server of regulation engine
CN111414374B (en) Block chain transaction concurrent processing method, device and equipment
CN111061802B (en) Power data management processing method, device and storage medium
CN110704486A (en) Data processing method, device, system, storage medium and server
CN109947797B (en) Data inspection device and method
CN112598529B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN109918385A (en) Tripartite's account checking method, electronic device and readable storage medium storing program for executing
CN113312259A (en) Interface testing method and device
CN116645082A (en) System inspection method, device, equipment and storage medium
CN114039878B (en) Network request processing method and device, electronic equipment and storage medium
CN115643172A (en) Abnormity detection method, abnormity detection device, terminal equipment and storage medium
CN112287027B (en) Database synchronization method, device, equipment and storage medium
CN115098157A (en) Method and device for processing public service data
CN110955547B (en) Management method, system, equipment and readable storage medium for interface abnormal information
CN112711584A (en) Data checking method, checking device, terminal equipment and readable storage medium
CN111835566A (en) System fault management method, device and system
CN110309211A (en) A kind of method and relevant device positioning ETL Process Problems
CN114546705B (en) Operation response method, operation response device, electronic apparatus, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191231

WD01 Invention patent application deemed withdrawn after publication