Payment method, first server, client and system
By setting the length and offset of the AES key in the payment method in the mobile payment field, and decrypting the encrypted payment information using the decryption function, the problem of cumbersome decryption of payment information in the prior art is solved, and payment efficiency and capital flow are improved.
Patent Information
- Application Number
- CN202010945465.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-10
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2040-09-10
AI Technical Summary
In the field of mobile payment, in the field of mobile payments, in the prior art enterprises realize Apple payment by connecting to UnionPay's SDK, the funds do not remain in the company's own reserve fund account, which affects the flow of funds. The decryption process of encrypted payment information strings is cumbersome and takes too long.
Provide a payment method, by receiving a payment page call request from a payment user, returning to the corresponding payment page, receiving an encrypted payment information string, and by setting the length of the AES key to 128 bits, the offset is 16 bits of empty characters, and using the decryption function to decrypt the encrypted payment information to obtain payment information to complete the deduction process.
It realizes efficient decryption of payment information, shortens the decryption time, improves payment efficiency, and ensures smooth capital flow.
Smart Images

Figure CN114169882B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mobile payment, and in particular to a payment method, a first server, a client, and a system. Background Art
[0002] In the mobile payment sector, when businesses adopt Apple Pay, they do so by accessing UnionPay's Software Development Kit (SDK), which in turn connects to Apple's Application Programming Interface (API). However, this method hinders cash flow because funds are not held in the company's own reserve account.
[0003] In the existing technology, each company develops its own SDK, and the company's own SDK calls Apple's API to complete payment.
[0004] However, in the above payment process, the decryption process of the encrypted payment information string payment Token is extremely cumbersome and time-consuming. Summary of the Invention
[0005] In response to the above problems, the present invention provides a payment method, a first server, a client, and a system.
[0006] In a first aspect, the present invention provides a payment method, which is applied to a first server, and the method includes: receiving a payment page call request initiated by a paying user through a client after determining a first payment method; returning a payment page corresponding to the first payment method to the client, the payment page including payment information; receiving an encrypted payment information string sent by the paying user through the client; wherein the encrypted payment information string is obtained by the paying user sending the payment information to a second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key; decrypting the encrypted AES key through the RAS private key in the encryption certificate to obtain the AES key; setting the length of the AES key to 128 bits and the offset to 16-bit null characters, and using a decryption function to decrypt the encrypted payment information to obtain the payment information; completing the deduction processing according to the payment information.
[0007] In other optional embodiments, the first service end includes a front-end server and a basic payment server; the method includes: the front-end server receives an encrypted payment information string sent by a paying user, and decrypts the encrypted AES key using a RAS private key to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16 null characters, and using a decryption function to decrypt the encrypted payment information, the payment information is obtained; determining the basic payment server corresponding to the business type of the payment information based on the payment information; and sending the payment information to the basic payment server, so that the basic payment server initiates a deduction request to the UnionPay server based on the payment information to complete the deduction processing.
[0008] In other optional embodiments, the payment information includes a payment account number, a payment password, and a payment recipient user ID; wherein the payment recipient user ID is obtained by the payment recipient user through registration on the second server.
[0009] In other optional embodiments, the method further includes: receiving a registration request from a payee user, the registration request including a payee user identifier; generating an encryption certificate based on the registration request, so that the second server calls the encryption certificate corresponding to the first server through the payee user identifier in the payment information.
[0010] In other optional embodiments, the method further includes: generating a QR code corresponding to the payment receiving user identifier according to the registration request, and returning the QR code to the payment receiving user terminal.
[0011] In other optional embodiments, the method further includes: receiving a payment page formulation request from the payee user, and formulating the payment page according to the formulation request, so that the paying user calls the payment page after selecting the first payment method.
[0012] In a second aspect, the present invention provides a payment method, which is applied to a client, and the method includes: receiving a selection operation of a first payment method by a paying user, and initiating a payment page call request based on the selection operation to retrieve a payment page corresponding to the first payment method, wherein the payment page includes payment information; sending the payment information to a second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key to obtain an encrypted payment information string; sending the encrypted payment information string to the first server, so that the first server decrypts the encrypted AES key through the RAS private key in the encryption certificate to obtain the AES key; setting the length of the AES key to 128 bits and the offset to 16-bit empty characters, and using a decryption function to decrypt the encrypted payment information to obtain the payment information; and completing the deduction processing according to the payment information.
[0013] In a third aspect, the present invention provides a first server, comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the method described in the first aspect.
[0014] In a fourth aspect, the present invention provides a client, comprising: at least one processor and a memory;
[0015] The memory stores computer-executable instructions; and the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to the second aspect.
[0016] In a fifth aspect, the present invention provides a payment system, comprising: the first server as described in the third aspect and the client as described in the fourth aspect.
[0017] The payment method, first server, client, and system provided by the present invention receive a payment page call request initiated by a paying user through a client after determining a first payment method; return a payment page corresponding to the first payment method to the client, the payment page including payment information;
[0018] Receive an encrypted payment information string sent by a paying user through a client; wherein, the encrypted payment information string is obtained by the paying user sending the payment information to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key; decrypt the encrypted AES key by using the RAS private key in the encryption certificate to obtain the AES key; set the length of the AES key to 128 bits, the offset to 16-bit empty characters, and use the decryption function to decrypt the encrypted payment information to obtain the payment information; complete the deduction processing according to the payment information; that is, the present invention realizes the decryption of the encrypted payment information only through the three steps of setting the length of the AES key to 128 bits, setting the offset to 16-bit empty characters, and using the decryption function, thereby shortening the decryption time and improving the payment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of a system architecture on which the present invention is based;
[0020] Figure 2 A schematic diagram of a payment method provided by the present invention;
[0021] Figure 3 A schematic diagram of a payment page provided by the present invention;
[0022] Figure 4 A schematic diagram of a flow chart of another payment method provided by the present invention;
[0023] Figure 5 A schematic structural diagram of a first server provided by the present invention;
[0024] Figure 6 A schematic structural diagram of a client provided by the present invention;
[0025] Figure 7 A schematic diagram of the hardware structure of a first server provided by the present invention. Specific embodiments
[0026] To make the objectives, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0027] Apple Pay is a mobile payment feature released by Apple based on Near Field Communication (NFC). When businesses adopt Apple Pay, they access UnionPay's Software Development Kit (SDK), which in turn accesses Apple's Application Programming Interface (API). However, this method hinders cash flow because funds are not held in the company's own reserve account.
[0028] In existing technology, each company develops its own SDK, which calls Apple's API to complete payments. During this payment process, the decryption process for the encrypted payment token typically involves using asymmetric RSA encryption to decrypt the wrapping key, obtaining a symmetric AES key, and then using the AES key to decrypt the encrypted data in the payment token. However, this process is extremely complex, involving multiple combinations of offset vectors and decryption methods, resulting in a lengthy decryption process.
[0029] In response to the above problems, the technical concept of the present invention is to achieve decryption of payment information, shorten the decryption time and improve payment efficiency by only three steps: setting the decryption method parameter AES key length to 128 bits, adding a 16-bit null character as the offset of AES decryption, and using a decryption function to decrypt the encrypted payment information and perform fault-tolerant verification.
[0030] Figure 1 A schematic diagram of a system architecture on which the present invention is based, such as Figure 1 As shown, one of the system architectures based on the present invention may include a user terminal 1, a first server 2, a second server 3, and a UnionPay server 4; wherein the first server 2 is a service device on the enterprise side, the second server 3 is a service device of Apple, and a client is installed on the user terminal 1, and an SDK provided by the first server 2 is installed on the client, and the SDK can call the Apple API.
[0031] It should be noted that the payment method described in the following embodiment is implemented through the cooperation of the user terminal 1, the first server 2, the second server 3, and the UnionPay server 4.
[0032] The embodiment of the present invention provides a payment method. Figure 2 A schematic diagram of a payment method provided by the present invention.
[0033] like Figure 2 As shown, the payment methods include:
[0034] Step 101: The client receives a selection operation of a first payment method by a payer, and initiates a payment page call request to a first server according to the selection operation.
[0035] Specifically, a client, such as the Pinduoduo application (App), is installed on the mobile terminal held by the user (referring to the paying user), and multiple merchants (referring to the receiving users) are integrated on the Pinduoduo App. Before executing this embodiment, the enterprise corresponding to the first server 2 will develop its own SDK to call the API of Apple (i.e., the second server), and the enterprise corresponding to the first server 2 will sign an agreement with the platform where the merchant is located, such as the Pinduoduo platform, so that when the user installs the Pinduoduo App, the SDK provided by the enterprise is also installed. When the user selects a product from a merchant on the client and settles the bill, the user can click the "Pay" button to pop up multiple payment methods, such as WeChat Pay, Alipay, UnionPay, and the first payment method described in the present invention. Among them, the first payment method is the enterprise SDK payment method based on Apple Pay corresponding to the first server. Therefore, in this embodiment, when the user selects the first payment method through the client, a payment page call request will be initiated to the first server corresponding to the first payment method.
[0036] Correspondingly, on the first server side, the first server will receive a payment page call request initiated by the paying user through the client after determining the first payment method.
[0037] It should be noted that, compared with enterprises accessing UnionPay SDK, this embodiment adopts the method of enterprises developing their own SDKs, so that deductions will be directly deposited into the enterprise's own reserve fund account, which is beneficial to the flow of enterprise funds.
[0038] Step 102: The first server returns a payment page corresponding to the first payment method to the client, where the payment page includes payment information.
[0039] Optionally, the payment information includes: a payment account number, a payment password, and a payment recipient user ID; wherein the payment recipient user ID is obtained by the payment recipient through registration on the second server. Optionally, the payment page also includes product order information, such as product quantity, free shipping method, etc.
[0040] Specifically, after the client calls the payment page, the user can select or fill in the bank card number for payment, and can also select the quantity of goods, free shipping method, etc. After confirming the above relevant information, enter the payment password, which can be a fingerprint password or facial recognition code, etc.
[0041] Optionally, the first server receives a payment page formulation request from the payee user, and formulates the payment page according to the formulation request, so that the paying user calls the payment page after selecting the first payment method.
[0042] Specifically, the payment page can be personalized according to the merchant's needs, so that the payment environment is closer to the merchant's usage environment. Figure 3 A schematic diagram of a payment page provided by the present invention, such as Figure 3 As shown, the payment page can be configured with the title, payment card number, cancel button, shipping method, product information, and other payment methods according to merchant needs.
[0043] Step 103: The client sends the payment information to the second server.
[0044] Specifically, the necessary payment information for Apple Pay can be sent to the second server (Apple server), including the payment account number, password, and payment user ID.
[0045] Step 104: The second server encrypts the payment information using the symmetric encryption AES key in the encryption certificate generated by the first server, and encrypts the AES key using the asymmetric encryption RAS public key in the encryption certificate to obtain an encrypted payment information string.
[0046] Optionally, the method further includes: receiving a registration request from a payee user, the registration request including a payee user identifier; generating an encryption certificate according to the registration request, so that the second server calls the encryption certificate corresponding to the first server through the payee user identifier in the payment information.
[0047] Specifically, the merchant registers with the second server (Apple server) and obtains the merchant ID (payment user identifier); then the merchant registers with the first server (enterprise server) with the ID, and the first server generates a corresponding encryption certificate, which includes a symmetric encryption AES key, an asymmetric RAS public key, and a RAS private key. In this embodiment, after the second server obtains the payment information, it calls the corresponding encryption certificate of the first server according to the merchant ID carried in the payment information, and uses
[0048] The payment information is encrypted using the AES key, which is then encrypted using the RAS public key. The encrypted AES key is used as the ciphertext header, and the encrypted payment information is used as the ciphertext body to form the encrypted payment information string paymenttoken.
[0049] Step 105: The second server sends the encrypted payment information string to the client.
[0050] Specifically, the Apple server sends the payment token to the user.
[0051] Step 106: The client sends the encrypted payment information string to the first server.
[0052] Specifically, after receiving the payment token, the user will send the payment token to the first server. Optionally, the product order information can also be sent to the first server at the same time as the payment token is sent.
[0053] Correspondingly, on the first server side, the first server will receive the encrypted payment information string sent by the paying user through the client; wherein, the encrypted payment information string is obtained by the paying user sending the payment information to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key.
[0054] Step 107: The first server decrypts the encrypted AES key using the RAS private key in the encryption certificate to obtain the AES key.
[0055] Step 108: The first server sets the length of the AES key to 128 bits and the offset to 16 null characters, and uses a decryption function to decrypt the encrypted payment information to obtain the payment information.
[0056] Specifically, the encrypted payment information string payment token includes two sub-data parts: the encrypted AES key and the encrypted payment information. On the first server, the encrypted AES key is first decrypted using the RAS private key to obtain the AES key; then the encrypted payment information is decrypted using the AES key to obtain the payment information. The process of decrypting the encrypted payment information using the AES key includes the following steps:
[0057] (1) Set the decryption method parameters to AES-128 (id-aes128-GCM 2.16.840.1.101.3.4.1.6);
[0058] (2) Add a 16-bit null character as the offset for AES decryption;
[0059] (3) The decryption function decrypts the payment information and performs fault-tolerant verification.
[0060] Compared with existing decryption methods, this embodiment uses a Galois / Counter Mode (GCM) mode plus an offset for decryption, decrypting the payment information in just three steps, shortening the decryption time.
[0061] Step 109: Complete the deduction process according to the payment information.
[0062] Specifically, after obtaining the decrypted payment information, a debit request can be initiated to the UnionPay server based on the payment information to complete the debit process. After the debit is completed, the debit processing result is returned to the first server, which then returns the debit processing result to the client. If the debit is successful, a successful debit prompt message is returned to the first server, which then returns the successful debit prompt message to the client to remind the user that the debit was successful. If the debit fails, a failed debit prompt message can also be sent to the client through the first server, prompting the user to initiate the debit request again or terminate the transaction.
[0063] Optionally, the method further includes generating a QR code corresponding to the payment receiving user identifier according to the registration request, and returning the QR code to the payment receiving user terminal.
[0064] Specifically, the merchant first initiates registration with the second server (Apple server) to obtain the merchant ID, and then the merchant uses the ID to initiate registration with the first server (enterprise server). In addition to generating the corresponding encryption certificate, the first server also generates a QR code corresponding to the payment user ID, which is used by the merchant for authentication and signature verification, thereby improving the security of payment.
[0065] The payment method provided by an embodiment of the present invention receives a payment page call request initiated by a paying user through a client after determining a first payment method; returns a payment page corresponding to the first payment method to the client, the payment page including payment information; receives an encrypted payment information string sent by the paying user through the client; wherein the encrypted payment information string is obtained by the paying user sending the payment information to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key; decrypts the encrypted AES key using the RAS private key in the encryption certificate to obtain the AES key; sets the length of the AES key to 128 bits, the offset to 16-bit null characters, and uses a decryption function to decrypt the encrypted payment information to obtain the payment information; completes the deduction processing according to the payment information; that is, the present invention achieves decryption of the encrypted payment information only through the three steps of setting the length of the AES key to 128 bits, setting the offset to 16-bit null characters, and using a decryption function, thereby shortening the decryption time and improving payment efficiency.
[0066] In combination with the aforementioned embodiments, Figure 4 This is a flow chart of another payment method provided by the present invention. In this embodiment, the first service end includes a front-end server and a basic payment server. Figure 4 As shown, the payment methods include:
[0067] Step 201: The client receives a payment method selection operation from a payer and initiates a payment page call request to a first server according to the selection operation.
[0068] Step 202: The first server returns a payment page corresponding to the payment method to the client, where the payment page includes payment information.
[0069] Step 203: The client sends the payment information to the second server.
[0070] Step 204: The second server encrypts the payment information using the symmetric encryption AES key in the encryption certificate generated by the first server, and encrypts the AES key using the asymmetric encryption RAS public key in the encryption certificate to obtain an encrypted payment information string.
[0071] Step 205: The second server sends the encrypted payment information string to the client.
[0072] Step 206: The client sends the encrypted payment information string to the front-end server.
[0073] Step 207: The front-end server decrypts the encrypted AES key using the RAS private key in the encryption certificate to obtain the AES key.
[0074] Step 208: The front-end server sets the length of the AES key to 128 bits and the offset to 16 null characters, and uses a decryption function to decrypt the encrypted payment information to obtain the payment information.
[0075] Step 209: Determine the basic payment server corresponding to the business type of the payment information according to the payment information.
[0076] Step 210: The front-end server sends the payment information to the basic payment server.
[0077] Step 211: The basic payment server initiates a deduction request to the UnionPay server according to the payment information.
[0078] Step 212: The basic payment server receives the deduction processing result returned by the UnionPay server, and returns the deduction processing result to the client through the front-end server.
[0079] Steps 201-205 in this embodiment are similar to the implementation of steps 101-105 in the aforementioned embodiment, and are not described in detail here.
[0080] Different from the previous embodiment, considering that the enterprise side may need to handle different types of business, in order to improve payment efficiency, in this embodiment, the first service end includes a front-end server and a basic payment server, and receives the encrypted payment information string sent by the paying user through the front-end server, and decrypts the encrypted AES key through the RAS private key to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16-bit null characters, and using the decryption function to decrypt the encrypted payment information, the payment information is obtained; the basic payment server corresponding to the business type of the payment information is determined according to the payment information; the payment information is sent to the basic payment server, so that the basic payment server initiates a deduction request to the UnionPay server according to the payment information to complete the deduction processing.
[0081] Specifically, when the client obtains the payment token, it will send the payment token and product order information to the front-end server, which will decrypt it. Based on the decrypted information, if it is confirmed that the corresponding business type is a basic payment business, the decrypted payment information will be sent to the basic payment server. The basic payment server calls the UnionPay payment interface to initiate a deduction. The UnionPay server returns the deduction result to the basic payment server, and the basic payment server notifies the front-end server, which then notifies the client of the deduction result. If it is confirmed that the corresponding business type is other business, the information will be sent to other servers.
[0082] In order to better understand the present invention, Figure 1 The embodiment of the present invention is further described by taking the system shown as an example, wherein the first server 2 includes a front-end server and a basic payment server.
[0083] First, the merchant (payee) registers through Apple's official website (second server) to obtain the merchant ID and other qualification information; then the merchant takes the obtained merchant ID and other qualification information to register with the official website of the company providing payment services (first server), and the company's official website will generate a corresponding encryption certificate, and can also generate a merchant-customized payment page, as well as a merchant QR code for authentication and signature verification, and install the SDK provided by the company on the merchant's client; when a user selects a merchant's product through the client on the user terminal 1 and makes a payment settlement, the payment page will be called according to the SDK installed on the client, and the user can enter the card number and other information on the payment page, and enter the fingerprint password or face recognition password; after entering the above information, the client will send the payment information including the payment account number, payment password and merchant ID to the second server 3, i.e., the Apple server (such as Figure 1 In ①), the Apple server calls the encryption certificate corresponding to the first server according to the merchant ID to encrypt the payment information, generate the encrypted payment token, and return it to the client (such as Figure 1 ② in ); the client sends the payment token and other order information to the front-end server in the enterprise's first server 2 (such as Figure 1 ③), the front-end server decrypts the payment token, obtains the payment information, and authenticates the merchant according to the merchant's QR code. Then, it assembles the data according to the basic payment interface requirements to confirm the payment order to the basic payment server. The basic payment server calls the UnionPay interface to initiate the deduction based on the payment information (such as Figure 1 ④ in the above), the UnionPay server returns the deduction processing result to the first server (such as Figure 1 ⑤ in the above), and then feedback the deduction processing result to the client (such as Figure 1⑥ in the figure).
[0084] Based on the above embodiment, the first service end includes a front-end server and a basic payment server, which receives the encrypted payment information string sent by the paying user through the front-end server, and decrypts the encrypted AES key through the RAS private key to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16 empty characters, and using the decryption function to decrypt the encrypted payment information, the payment information is obtained; the basic payment server corresponding to the business type of the payment information is determined according to the payment information; the payment information is sent to the basic payment server, so that the basic payment server initiates a deduction request to the UnionPay server according to the payment information to complete the deduction processing; that is, the received information is classified by the front-end server, and when the business type is determined to be basic payment, the decrypted payment information is sent to the basic payment server, which further improves the payment efficiency and facilitates the enterprise's management of different businesses.
[0085] An embodiment of the present invention provides a first server, Figure 5 A schematic diagram of the structure of a first server provided by the present invention, such as Figure 5 As shown, the first server includes:
[0086] The first receiving module 10 is used to receive a payment page call request initiated by the paying user through the client after determining the first payment method; the first sending module 20 is used to return the payment page corresponding to the first payment method to the client, and the payment page includes payment information; the first receiving module 10 is also used to receive an encrypted payment information string sent by the paying user through the client; wherein, the encrypted payment information string is obtained by the paying user sending the payment information to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key; the decryption module 30 is used to decrypt the encrypted AES key using the RAS private key in the encryption certificate to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16-bit null characters, and using the decryption function to decrypt the encrypted payment information, the payment information is obtained; the first sending module 20 is also used to complete the deduction processing according to the payment information.
[0087] In other optional embodiments, the first server includes a front-end server and a basic payment server; the front-end server receives the encrypted payment information string sent by the paying user, and decrypts the encrypted AES key through the RAS private key to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16 null characters, and using a decryption function to decrypt the encrypted payment information, the payment information is obtained; the basic payment server corresponding to the business type of the payment information is determined according to the payment information; the payment information is sent to the basic payment server, so that the basic payment server initiates a deduction request to the UnionPay server according to the payment information to complete the deduction processing.
[0088] In other optional embodiments, the payment information includes a payment account number, a payment password, and a payment recipient user ID; wherein the payment recipient user ID is obtained by the payment recipient user through registration on the second server.
[0089] In other optional embodiments, the first receiving module 10 is further used to receive a registration request from a payee user, the registration request including a payee user identifier; and generate an encryption certificate based on the registration request, so that the second server calls the encryption certificate corresponding to the first server through the payee user identifier in the payment information.
[0090] In other optional embodiments, the first receiving module 10 is further used to: generate a QR code corresponding to the payment receiving user identification according to the registration request, and return it to the payment receiving user terminal.
[0091] In other optional embodiments, the first receiving module 10 is further used to: receive a payment page formulation request from the payee user, formulate the payment page according to the formulation request, so that the paying user calls the payment page after selecting the first payment method.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the first server described above and the corresponding beneficial effects can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0093] The first server provided by the present invention is used to receive a payment page call request initiated by a paying user through a client after determining a first payment method through a first receiving module; a first sending module is used to return a payment page corresponding to the first payment method to the client, and the payment page includes payment information; the first receiving module is also used to receive an encrypted payment information string sent by the paying user through the client; wherein the encrypted payment information string is the payment information sent by the paying user to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the payment information. The AES key is encrypted by the RAS private key; a decryption module is used to decrypt the encrypted AES key by using the RAS private key in the encryption certificate to obtain the AES key; the payment information is obtained by setting the length of the AES key to 128 bits, the offset to 16-bit empty characters, and using the decryption function to decrypt the encrypted payment information; the first sending module is also used to complete the deduction processing; that is, the embodiment of the present invention only realizes the decryption of the encrypted payment information through the three steps of setting the length of the AES key to 128 bits, setting the offset to 16-bit empty characters, and using the decryption function, thereby shortening the decryption time and improving the payment efficiency.
[0094] An embodiment of the present invention provides a client, Figure 6 A schematic diagram of the structure of a client provided by the present invention, such as Figure 6 As shown, the client includes:
[0095] The second receiving module 40 is used to receive the payment user's selection operation for the first payment method, and to initiate a payment page call request based on the selection operation to retrieve the payment page corresponding to the first payment method; the second sending module 50 is used to send the payment information to the second server, so that the second server uses the symmetric encryption AES key in the encryption certificate generated by the first server to encrypt the payment information, and uses the asymmetric encryption RAS public key in the encryption certificate to encrypt the AES key to obtain an encrypted payment information string; the second sending module 50 is also used to send the encrypted payment information string to the first server, so that the first server decrypts the encrypted AES key through the RAS private key in the encryption certificate to obtain the AES key; by setting the length of the AES key to 128 bits and the offset to 16-bit empty characters, and using the decryption function to decrypt the encrypted payment information, the payment information is obtained; and the deduction processing is completed according to the payment information.
[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the first server described above and the corresponding beneficial effects can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0097] An embodiment of the present invention provides a first server, Figure 7 A schematic diagram of the hardware structure of a first server provided by the present invention is shown as follows: Figure 7 Shown, including:
[0098] At least one processor 701 and memory 702 .
[0099] During the specific implementation process, at least one processor 701 executes the computer-executable instructions stored in the memory 702, so that at least one processor 701 executes the method described in the first aspect above, wherein the processor 701 and the memory 702 are connected via a bus 703.
[0100] The specific implementation process of the processor 701 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0101] The embodiment of the present invention also provides a client, whose hardware structure is similar to Figure 7 Similarly, the method described in the second aspect above is implemented, and its implementation principle and technical effects are similar to those of the above method embodiment, which will not be repeated here.
[0102] In the above Figure 7 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASICs), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0103] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0104] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0105] In a fourth aspect, the present invention further provides a readable storage medium, which is arranged on the first server side, and the readable storage medium stores computer execution instructions. When the processor executes the computer execution instructions, the method described in the first aspect above is implemented.
[0106] The present invention also provides another readable storage medium, which is provided on the client side. The readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the method described in the second aspect above is implemented.
[0107] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0108] An exemplary embodiment of a readable storage medium is coupled to a processor, such that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in a device as discrete components.
[0109] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A payment method, characterized in that: Applied to a first server, where the first server is a service device on an enterprise side, the method includes: receiving a payment page call request initiated by a paying user through a client after determining a first payment method; the client is installed with an SDK provided by the first server, the SDK provided by the first server can call an API of a second server, the second server is a service device of Apple, and the first payment method is an enterprise SDK payment method based on Apple Pay corresponding to the first server; Returning a payment page corresponding to the first payment method to the client, the payment page including payment information; Receive an encrypted payment information string sent by a paying user through a client; wherein the encrypted payment information string is obtained by the paying user sending the payment information to the second server, so that the second server encrypts the payment information using the symmetric encryption AES key in the encryption certificate generated by the first server, and encrypts the AES key using the asymmetric encryption RAS public key in the encryption certificate; Decrypt the encrypted AES key using the RAS private key in the encryption certificate to obtain the AES key; The payment information is obtained by setting the length of the AES key to 128 bits and the offset to 16 null characters and using a decryption function to decrypt the encrypted payment information; The deduction process is completed according to the payment information.
2. The method according to claim 1, characterized in that The first server includes a front-end server and a basic payment server; The method comprises: The front-end server receives the encrypted payment information string sent by the payee, and decrypts the encrypted AES key by using the RAS private key to obtain the AES key; sets the length of the AES key to 128 bits, the offset to 16 null characters, and uses the decryption function to decrypt the encrypted payment information to obtain the payment information; Determine, according to the payment information, a basic payment server corresponding to the business type of the payment information; The payment information is sent to the basic payment server, so that the basic payment server initiates a deduction request to the UnionPay server according to the payment information to complete the deduction process.
3. The method according to claim 1 or 2, characterized in that: The payment information includes the payment account number, payment password and payment recipient user ID; The payment recipient user identifier is obtained by the payment recipient user through registration on the second server.
4. The method according to claim 3, characterized in that: The method further comprises: receiving a registration request from a payment receiving user, wherein the registration request includes a payment receiving user identifier; An encryption certificate is generated according to the registration request, so that the second server calls the encryption certificate corresponding to the first server through the payment receiving user identifier in the payment information.
5. The method according to claim 4, characterized in that The method further comprises: According to the registration request, a QR code corresponding to the payment receiving user identification is generated and returned to the payment receiving user terminal.
6. The method according to claim 1 or 2, characterized in that: The method further comprises: A payment page formulation request is received from a payee user, and the payment page is formulated according to the formulation request, so that the payer user can call the payment page after selecting a first payment method.
7. A payment method, characterized in that: Applied to a client, the method comprises: Receive a selection operation of a first payment method by a payer, and initiate a payment page call request according to the selection operation to retrieve a payment page corresponding to the first payment method, wherein the payment page includes payment information; the client is installed with an SDK provided by a first server, the SDK provided by the first server can call an API of a second server, the first server is a service device on the enterprise side, the second server is a service device of Apple Inc., and the first payment method is an enterprise SDK payment method based on Apple Pay corresponding to the first server; Sending the payment information to the second server, so that the second server encrypts the payment information using the symmetric encryption AES key in the encryption certificate generated by the first server, and encrypts the AES key using the asymmetric encryption RAS public key in the encryption certificate to obtain an encrypted payment information string; The encrypted payment information string is sent to the first server, so that the first server decrypts the encrypted AES key through the RAS private key in the encryption certificate to obtain the AES key; the encrypted payment information is decrypted by setting the length of the AES key to 128 bits and the offset to 16 null characters, and using the decryption function to obtain the payment information; and the deduction process is completed according to the payment information.
8. A first server, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method according to any one of claims 1 to 6.
9. A client, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method of claim 7.
10. A payment system, characterized in that: include: The first server as claimed in claim 8 and the client as claimed in claim 9.
Citation Information
Patent Citations
Radar parameter encryption and test device and method
CN102385052A
Method and system for touch-screen based graphical password authentication in mobile payment
CN103268436A