Search

CN-121981718-A - Payment processing method, device, electronic equipment, storage medium and program product

CN121981718ACN 121981718 ACN121981718 ACN 121981718ACN-121981718-A

Abstract

The embodiment of the application provides a payment processing method, a payment processing device, electronic equipment, a storage medium and a program product. The technical field of design computers. The method comprises the steps of receiving an original payment request, wherein the original payment request comprises at least one payment information, determining a target payment channel according to channel payment information when the payment information comprises channel payment information indicating a payment channel, determining a target payment channel according to a preset channel determination rule when the payment information does not comprise channel payment information indicating a payment channel, converting the original payment request into a target payment request which is adaptive to the target payment channel by adopting a preset protocol conversion strategy, calling the target payment channel, and completing payment according to the target payment request. The method is used for achieving the effects of uniformly interfacing multiple payment channels, reducing the complexity of the system and improving the expansibility and the maintenance efficiency.

Inventors

  • LI BIAO

Assignees

  • 灵谷流光科技(南京)有限公司

Dates

Publication Date
20260505
Application Date
20251218

Claims (10)

  1. 1. A payment processing method, comprising: Receiving an original payment request, the original payment request including at least one payment information; Determining a target payment channel according to the channel payment information in the case that the payment information contains channel payment information indicating a payment channel; Determining a target payment channel according to a preset channel determination rule under the condition that the payment information does not contain channel payment information indicating a payment channel; converting the original payment request into a target payment request which is adapted to the target payment channel by adopting a preset protocol conversion strategy; and calling the target payment channel, and completing payment according to the target payment request.
  2. 2. The method of claim 1, wherein determining a target payment channel from the channel payment information comprises: acquiring a request identifier of the original payment request, and extracting a payment channel identifier from the channel payment information; And according to the payment channel identification, or the request identification and the payment channel identification, inquiring a preset payment channel routing table, and determining a target payment channel corresponding to the original payment request.
  3. 3. The method of claim 1, wherein determining the target payment channel according to a preset channel determination rule comprises at least one of: acquiring a default payment channel, and determining the default payment channel as a target payment channel; acquiring a payment channel with a historical payment success rate higher than a preset threshold value, and determining the payment channel as a target payment channel; And determining a target payment channel according to one or more items of the at least one payment information and a preset channel selection strategy.
  4. 4. The method of claim 1, wherein converting the original payment request into a target payment request that is adapted to the target payment channel using a preset protocol conversion policy comprises: Acquiring a target protocol conversion strategy corresponding to the target payment channel from a preset protocol conversion strategy; and carrying out format conversion and/or parameter mapping on at least one payment information in the original payment request according to the target protocol conversion strategy, and generating a target payment request meeting the target payment channel requirements.
  5. 5. The method of claim 1, wherein invoking the target payment channel to complete payment in accordance with the target payment request comprises: When the target payment channel returns a payment failure response, acquiring a preset payment retry strategy; determining a standby payment channel as a new target payment channel according to the payment retry strategy; And re-executing the payment request conversion and payment call flow based on the new target payment channel until a payment success response is received, and completing the payment.
  6. 6. The method of any of claims 1-5, wherein after receiving the original payment request, the method further comprises: determining whether the original payment request has a payment risk according to the at least one payment information; If the original payment request is determined to have payment risk, executing preset risk processing operation; and if the original payment request is determined to not have the payment risk, executing the step of determining a target payment channel of the original payment request.
  7. 7. A payment processing apparatus, comprising: The payment request acquisition module is used for receiving an original payment request, wherein the original payment request comprises at least one piece of payment information; a first channel determining module, configured to determine a target payment channel according to channel payment information when the payment information includes channel payment information indicating a payment channel; The second channel determining module is used for determining a target payment channel according to a preset channel determining rule under the condition that the payment information does not contain channel payment information indicating the payment channel; The payment request conversion module is used for converting the original payment request into a target payment request which is suitable for the target payment channel by adopting a preset protocol conversion strategy; And the payment module is used for calling the target payment channel and completing payment according to the target payment request.
  8. 8. An electronic device is characterized by comprising a memory and a processor; the memory stores computer-executable instructions; The processor executing computer-executable instructions stored in the memory, causing the processor to perform the method of any one of claims 1-6.
  9. 9. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-6.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-6.

Description

Payment processing method, device, electronic equipment, storage medium and program product Technical Field The present application relates to the field of computer technologies, and in particular, to a payment processing method, apparatus, electronic device, storage medium, and program product. Background With the rapid development of mobile internet and electronic commerce, the payment link has become a core component in various business scenes. Whether it is an e-commerce platform, an online-offline (O2O) service, or a diversified business mode such as cross-border transaction, the user needs to be supported to complete the transaction through multiple payment channels, such as a third party payment tool accessing to a main stream in China, bank card payment, and an overseas localized payment mode, so as to satisfy the payment habits and regional requirements of different user groups. At present, when an enterprise is in butt joint with multiple payment channels, a mode of independently developing an adaptation module for each channel is generally adopted, so that the problems of complex system architecture, repeated functions, code redundancy, high maintenance cost, poor expansibility, difficult management and the like are caused. In addition, the increase or the decrease or the change of the payment channel needs to greatly modify codes, so that the development period is long, the error risk is high, and the rapid change payment business requirement is difficult to adapt. Disclosure of Invention The embodiment of the application provides a payment processing method, a payment processing device, electronic equipment, a storage medium and a program product, which are used for achieving the effects of uniformly butting multiple payment channels, reducing the complexity of a system and improving the expansibility and the maintenance efficiency. In a first aspect, an embodiment of the present application provides a payment processing method, including: Receiving an original payment request, the original payment request including at least one payment information; Determining a target payment channel according to the channel payment information in the case that the payment information contains channel payment information indicating a payment channel; Determining a target payment channel according to a preset channel determination rule under the condition that the payment information does not contain channel payment information indicating a payment channel; converting the original payment request into a target payment request which is adapted to the target payment channel by adopting a preset protocol conversion strategy; and calling the target payment channel, and completing payment according to the target payment request. In one possible implementation, determining a target payment channel according to the channel payment information includes: acquiring a request identifier of the original payment request, and extracting a payment channel identifier from the channel payment information; And according to the payment channel identification, or the request identification and the payment channel identification, inquiring a preset payment channel routing table, and determining a target payment channel corresponding to the original payment request. In one possible implementation, determining the target payment channel according to a preset channel determination rule includes at least one of: acquiring a default payment channel, and determining the default payment channel as a target payment channel; acquiring a payment channel with a historical payment success rate higher than a preset threshold value, and determining the payment channel as a target payment channel; And determining a target payment channel according to one or more items of the at least one payment information and a preset channel selection strategy. In one possible implementation, the converting the original payment request into the target payment request adapted to the target payment channel using a preset protocol conversion policy includes: Acquiring a target protocol conversion strategy corresponding to the target payment channel from a preset protocol conversion strategy; and carrying out format conversion and/or parameter mapping on at least one payment information in the original payment request according to the target protocol conversion strategy, and generating a target payment request meeting the target payment channel requirements. In one possible implementation, invoking the target payment channel to complete payment according to the target payment request includes: When the target payment channel returns a payment failure response, acquiring a preset payment retry strategy; determining a standby payment channel as a new target payment channel according to the payment retry strategy; And re-executing the payment request conversion and payment call flow based on the new target payment channel until a payment success response is received