A payment method and device
By storing, encrypting and decrypting offline payment credentials locally on the terminal, it solves the existing technology problems of cumbersome processes and low security when third-party payment applications select other payment applications for offline payments, and achieves a faster and safer offline payment process.
Patent Information
- Application Number
- CN202010760707.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2016-06-20
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2036-06-20
AI Technical Summary
In the existing technology, when a third-party payment application selects other payment applications on the consumer terminal for offline payment, the process is cumbersome and less secure. The user needs to manually launch the payment client and obtain the offline payment identity certificate, which is easily obtained and easily accessed directly. use.
The offline payment voucher is stored locally on the terminal through a third-party payment application, and is decrypted and obtained through the user authentication identification when used, achieving rapid acquisition and encrypted storage to ensure the security of the voucher.
It simplifies the offline payment process of third-party payment applications on consumer terminals, improves the speed and security of payment, and ensures that only legitimate users can pay using offline payment credentials.
Smart Images

Figure CN111899026B_ABST
Abstract
Description
[0001] Divisional application statement
[0002] This application is a divisional application based on the Chinese invention patent application with application number 201610448201.7, application date June 20, 2016, and invention name “An offline payment method and device”. Technical Field
[0003] The present application relates to network technology, and in particular to a payment method and device. Background Art
[0004] Offline payment is a payment method that does not require the Internet. This method makes payment more convenient for users and does not require network traffic, so it is gradually being used. When smart devices such as smartphones and smart watches are used as consumer terminals, they also need to be able to use the consumer terminals to perform offline payments to facilitate user payments. In addition, with the development of mobile Internet, it has gradually become a trend for consumer terminals to integrate payment methods of third-party payment companies. Users can quickly open the third-party payment application corresponding to the third-party payment company from the consumer terminal and use the third-party payment application to quickly make payments; then there may be a corresponding demand that users can select a payment application account from the opened third-party payment application to make offline payments, which will be more convenient.
[0005] However, in the related art, even if you select another payment application account from a third-party payment application for offline payment, you still need to call up the payment client of the payment application on the consumer terminal, and let the payment client execute the offline payment process of the payment application. This method is more cumbersome for users to handle the process, and the offline payment identity certificate generated by the other payment application can be directly obtained after reaching the consumer terminal, which is equivalent to the user being able to easily obtain the offline payment identity certificate of a certain payment application from the third-party payment application, and the security is also low. Summary of the invention
[0006] In view of this, the present application provides a payment method and device to make it faster and safer to select a payment application from a third-party payment application integrated in a consumer terminal for payment.
[0007] Specifically, the present application is implemented through the following technical solutions:
[0008] In a first aspect, a payment method is provided, wherein the method is used to perform payment using a target payment application in a third-party payment application integrated by a terminal; the method comprises:
[0009] The payment credentials of the target payment application are stored through a third-party payment application; the payment credentials are used for offline payment;
[0010] Use the payment credentials stored in the third-party application to perform the payment corresponding to the target payment application;
[0011] The method also includes:
[0012] The third-party payment application sends a payment activation request to the target payment application; wherein the payment activation request carries a first identifier corresponding to the user and a second identifier corresponding to the terminal;
[0013] The third-party payment application receives the payment credential returned by the target payment application, which corresponds to the first identifier and is encrypted by the first secret key;
[0014] The third-party payment application decrypts the encrypted payment credential using the second secret key; wherein the first secret key and the second secret key are a key pair corresponding to the second identifier;
[0015] The payment credentials of the target payment application are stored through a third-party payment application, including:
[0016] The decrypted payment credentials are stored in the terminal through a third-party payment application.
[0017] In a second aspect, a payment method is provided, which is applied to a payment server of a target payment application and is used for executing payment using the target payment application in a third-party payment application integrated by a terminal; the method comprises:
[0018] Sending the payment credentials of the target payment application to the third-party payment application so that the payment credentials are stored through the third-party payment application; the payment credentials are stored in the terminal for offline payment;
[0019] The payment server of the target payment application sends the payment credentials of the target payment application to the third-party payment application, including:
[0020] The payment server of the target payment application generates a corresponding business identifier and a third key and a fourth key pair corresponding to the business identifier for the third-party payment application, and sends the fourth key to the third-party payment application;
[0021] The payment server of the target payment application receives the payment activation request sent by the third-party payment application, which carries the first identifier corresponding to the user and the second identifier corresponding to the terminal, the first identifier and the second identifier are signed using the fourth secret key, and the request also carries the service identifier;
[0022] After receiving the payment activation request, the payment server obtains the corresponding third secret key according to the business identifier to verify that the payment activation request is sent by the third-party payment application, generates a payment voucher corresponding to the first identifier, and encrypts the payment voucher using the first secret key and sends it to the third-party payment application, so that the third-party payment application obtains the payment voucher after decrypting it using the second secret key;
[0023] Among them, the first key and the second key are the keys corresponding to the second identifier.
[0024] In a third aspect, a payment device is provided, which is applied to a third-party payment application and is used to perform payment using a target payment application in a third-party payment application integrated by a terminal; the device includes:
[0025] The credential storage module is used to store the payment credentials of the target payment application through a third-party payment application; the payment credentials are used for offline payment;
[0026] A payment module, used to use the payment credentials stored by the third-party application to perform payment corresponding to the target payment application;
[0027] The payment module is also used to: send a payment activation request to a target payment application through a third-party payment application; wherein the payment activation request carries a first identifier corresponding to the user and a second identifier corresponding to the terminal; receive, through the third-party payment application, a payment voucher corresponding to the first identifier and encrypted by a first secret key returned by the target payment application; and decrypt the encrypted payment voucher through the third-party payment application using a second secret key; wherein the first secret key and the second secret key are a key pair corresponding to the second identifier;
[0028] The payment module is used to store the decrypted payment voucher in the terminal through a third-party payment application.
[0029] In a fourth aspect, a payment device is provided, which is applied to a payment server of a target payment application and is used for executing payment using the target payment application in a third-party payment application integrated by a terminal; the device comprises:
[0030] A credential providing module, used to send the payment credential of the target payment application to the third-party payment application so that the payment credential can be stored through the third-party payment application; the payment credential is stored in the terminal for offline payment;
[0031] The credential providing module is also used to: generate a corresponding business identifier and a third key and a fourth key pair corresponding to the business identifier for a third-party payment application through the payment server of the target payment application, and send the fourth key to the third-party payment application; receive a payment activation request sent by the third-party payment application through the payment server of the target payment application, carrying a first identifier corresponding to the user and a second identifier corresponding to the terminal, the first identifier and the second identifier are signed using the fourth key, and the request also carries a business identifier; after receiving the payment activation request, the payment server obtains the corresponding third key according to the business identifier to verify that the payment activation request is sent by the third-party payment application, generates a payment credential corresponding to the first identifier, and encrypts the payment credential using the first key and sends it to the third-party payment application, so that the third-party payment application obtains the payment credential after decrypting it using the second key; wherein the first key and the second key are keys corresponding to the second identifier.
[0032] The payment method and device provided by the present application store credentials locally in the terminal by a third-party payment application, and when the credentials are used, the third-party payment application can obtain them locally from the terminal, making it faster to select a payment application from the third-party payment application integrated in the consumer terminal for payment. In addition, when the stored credentials are obtained locally by the terminal, it is necessary to first verify the user's identity authentication identifier, thereby making the use of the credentials safer. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 is an application environment diagram of an offline payment method shown in an exemplary embodiment of the present application;
[0034] Figure 2 This is an offline payment activation process shown in an exemplary embodiment of the present application;
[0035] Figure 3 This is an offline payment usage process shown in an exemplary embodiment of the present application;
[0036] Figure 4 This is an offline payment cancellation process shown in an exemplary embodiment of the present application;
[0037] Figure 5 is a structural diagram of an offline payment device shown in an exemplary embodiment of the present application;
[0038] Figure 6 is a structural diagram of another offline payment device shown in an exemplary embodiment of the present application;
[0039] Figure 7 is a structural diagram of another offline payment device shown in an exemplary embodiment of the present application;
[0040] Figure 8It is a structural diagram of another offline payment device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0041] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0042] With the development of mobile Internet, it has gradually become a trend for consumer terminals to integrate payment methods of third-party payment companies. Users can quickly open the third-party payment application corresponding to the third-party payment company from the consumer terminal and use the third-party payment application to quickly make payments. For example, the third-party payment application can be: Android Pay, Samsung Pay, Huawei Pay and other applications, which can be quickly started and opened by consumer terminals (for example, smart devices such as smartphones). When using a third-party payment application, the user may also have the following requirements: for example, the user already has an account for a certain payment application (for example, the application is Alipay), and the user hopes to quickly open the third-party payment application and then choose to use the above-mentioned payment application for offline payment from the third-party payment application. For example, the user hopes to use Alipay's offline payment from Huawei Pay.
[0043] If the payment application is only called up by a third-party payment application, and the payment application itself processes it according to the existing offline payment method, the efficiency is low and the process is cumbersome. For example, the Alipay client is called up from Huawei Pay, and the Alipay client interacts with the offline payment server at the back end of Alipay to perform Alipay's offline payment. In this way, the third-party payment application is basically not involved; moreover, the offline code (which can be called an offline payment voucher) generated by the Alipay client can also be directly obtained (for example, the merchant as the offline payment service party directly scans the code to obtain it), which is less secure. Based on this, the embodiment of the present application provides an offline payment method, which is intended to provide a method for a third-party payment application to apply for an offline payment voucher from the payment application when it is necessary to select a payment application from a third-party payment application integrated in a consumer terminal for offline payment, and the third-party payment application itself stores the voucher locally in the terminal, so that the third-party payment application can quickly obtain the voucher when the subsequent voucher is used; the method provides an interactive process between a third-party payment application and a payment application, so that the payment application can provide the offline code to the third-party payment application, and the process is also designed for speed and security, which will be described in detail later.
[0044] The offline payment method of the present application is described below, wherein the payment application interacting with the third-party payment application may be referred to as the target payment application (for example, Alipay, but not limited thereto, and may also be other applications), and the third-party payment application is not limited to the above-mentioned Samsung Pay, Huawei Pay, etc. In addition, in the description of the method, the offline code is referred to as an "offline payment voucher", and its form is not limited, for example, it may be a QR code.
[0045] Figure 1 The examples illustrate various devices or modules involved in the offline payment method of the embodiment of the present application that may be involved. For example, the consumer terminal 11 may include: a third-party payment application 12 (for example, Huawei Pay), a payment client 13 (Alipay client) of the target payment application, and a TEE (Trusted execution environment) 14. Among them, TEE can provide a secure operating environment, and applications with higher security requirements can run in this environment. For example, the payment client 13 can run in TEE14, and the TEE14 can provide authentication, certification, storage and other services for the application.
[0046] Figure 1 The application server 15 and the target application's offline payment server 16 may also be included, wherein the application server 15 may be the backend server of the third-party payment application 12, and the offline payment server 16 may be the backend server responsible for offline payment services of the target payment application, for example, the offline payment server of Alipay may provide offline payment services for registered Alipay users. Figure 1 The arrows also indicate that these devices or modules can interact with each other, for example, the application server 15 and the offline payment server 16 can interact (for example, send a request and a response), the third-party payment application 12 and the payment client 13 can interact, and so on.
[0047] The following will be combined Figure 1 As an example, this paper explains how the target payment application and the third-party payment application perform offline payment interaction. Figure 1 The method will describe the activation, use, and cancellation of offline payment between the third-party payment application and the target payment application.
[0048] Activation of offline payment:
[0049] Assume that a registered user of a target payment application wants to enable offline payment, and wants to enable offline payment using the target payment application in a third-party payment application. Then, the user can open the third-party payment application and choose to enable offline payment of the target payment application in the third-party payment application. The selection method can be flexibly set. For example, the interface of the opened third-party payment application can display multiple payment applications for the user to choose to use. The user can select the target payment application and choose to enable offline payment for the target payment application.
[0050] After receiving the user's selection, the third-party payment application knows that the user wants to enable offline payment for the corresponding target payment application, and then starts to execute Figure 2 The offline payment activation process shown here needs to be explained. Figure 2 The process shown is only an exemplary process, and other processes may be used in specific implementations, for example, the order of each step may be changed. Figure 2 The process may include the following processing, wherein the TEE may include a payment application authentication center, a local authentication center, and a local secure storage, wherein the payment application authentication center may be a payment client of a target payment application, and in addition, since the third-party payment application in subsequent steps uses the local authentication center and the local secure storage in the TEE when storing offline payment credentials, the local authentication center and the local secure storage may be referred to as local storage devices; the application server and the offline payment server of the target payment application also participate in the process.
[0051] In step 201 to step 203, the third-party payment application can obtain the user identification and terminal identification from the payment client of the target payment application. For example, when the third-party payment application obtains the user's choice to open an offline payment of a target payment application, it can request the payment client of the target payment application located at the same terminal to obtain the user identification and terminal identification, wherein the user identification is the user who has currently logged into the target payment application account. For example, a user's mobile phone has installed both a third-party payment application Pay and a client APP of a payment application. The user who is currently logged into the target payment application is the user logged in to the payment application client on the mobile phone. The payment application client feeds back the user's user identification and terminal identification to the third-party payment application.
[0052] In this embodiment, the user identification returned by the payment client to the third-party payment application can be a token corresponding to the user account (also called user ID) of the currently logged-in payment application. The token can be a token corresponding to the user ID generated by the offline payment server of the target payment application for the user after the user registers, and a copy of the token is sent to the payment client. The terminal identification can be the unique ID of the terminal.
[0053] In addition, the payment client not only returns the terminal identification and user identification to the third-party payment application, but also sends the terminal private key of the terminal to the third-party payment application. Each terminal can have a corresponding public-private key pair, the terminal private key can be stored in the terminal, and the terminal public key can be stored in the offline payment server of the target payment application, so that when the offline payment server sends the generated offline payment voucher to the terminal, it is encrypted with the terminal public key and sent, so that only the terminal can use the terminal private key to decrypt and obtain the offline payment voucher, which improves the security of voucher transmission and enables a specific device to use the offline payment voucher of the user. This process will also be described in the subsequent embodiments.
[0054] After obtaining the user ID and terminal ID sent by the payment client, the third-party payment application can send an offline payment activation request to the target payment application, carrying the user ID and the terminal ID of the terminal. Figure 2 For example, in steps 205 and 206, the third-party payment application may forward the request through its application server, and the application server may sign with a private key when forwarding the request.
[0055] The private key described here can be pre-assigned to the application server by the offline payment server of the target payment application; for example, taking the offline payment server of Alipay and Huawei Pay as examples, the offline payment server can assign a business ID (i.e., business identifier) corresponding to Huawei Pay, and generate a public-private key pair corresponding to the business ID, send the private key to the application server of Huawei Pay, and still store the public key in the offline payment server of Alipay. When the application server interacts with the offline payment server, such as sending an offline payment activation request to the offline payment server, the request can be signed with the private key assigned by the offline payment server, and correspondingly, the offline payment server verifies the signature with the public key. If the verification is successful, it indicates that the request is indeed sent by the application server of Huawei Pay, ensuring that the source of the request is reliable and legal. Of course, when forwarding the request in step 206, the application server can carry the business ID, so that in step 207, the offline payment server can find the corresponding public key according to the business ID and verify the signature. For different third-party payment applications, the business ID assigned by the offline payment server of the target payment application can be different. For example, the business ID of the Huawei Pay application is different from the business ID of the Samsung Pay application.
[0056] In steps 208 to 210, the offline payment server of the target payment application allocates a corresponding offline payment credential to the user. The credential is equivalent to an identity identifier of the user. For example, in an offline environment without a network, as long as the offline payment credential is provided, the identity of the user can be confirmed and a payment account of the user can be deducted.
[0057] Among them, the offline payment server can obtain the corresponding user account according to the user identification token carried in the request, know which account the user is requesting to open offline payment, and generate the corresponding offline payment voucher for the account. The algorithm for generating the voucher can be set independently by the target payment application. Then, in order to ensure security, the offline payment server can obtain the corresponding terminal public key according to the terminal identification carried in the request, use the terminal public key to encrypt the offline payment voucher, and then send it to the third-party payment application. Figure 2 In steps 211 and 212, the application server returns the encrypted offline payment voucher to the third-party payment application on the terminal side. The third-party payment application can decrypt with the terminal private key to obtain the offline payment voucher.
[0058] After obtaining the offline payment credential, the third-party payment application also needs to store the offline payment credential in the terminal where it is located. Figure 2 Store offline payment credentials as shown. Figure 2 As shown, the third-party payment application can store the offline payment credentials in the local storage device of the terminal, and will also cooperate with the local storage device to encrypt and store the credentials. For example, the third-party payment application can send a credential storage request to the local authentication center in the local storage device, carrying the offline payment credentials issued to the user by the offline payment server of the target payment application received by the third-party payment application. In addition, the local authentication center can prompt the user to select an identity authentication method, such as fingerprint authentication, iris authentication or other methods. After the user selects the authentication method, the third-party payment application can transmit the user's identity authentication identifier to the local authentication center. The identity authentication identifier is, for example, the user's fingerprint, the user's iris, etc.
[0059] The local authentication center can instruct the local secure storage to generate the corresponding associated key according to the user's identity authentication identifier, and use the associated key to encrypt and store the user's offline payment credentials. In this way, when the subsequent user wants to use the stored offline payment credentials for offline payment, he needs to provide the user's identity authentication identifier, and the credentials can only be provided after confirmation. These will be described in the subsequent offline payment usage process, so as to make the use of credentials safer and ensure that the credentials for this offline payment are used by the user himself.
[0060] Finally, in steps 224 to 226, the third-party payment application can notify the offline payment server of the target payment application that the offline payment credential has been stored locally in the terminal, and the offline payment server can record the offline payment activation information, which may include, for example: user identification (the identification here may be a user account), the offline payment credential corresponding to the account, and may also include offline payment activation time and other information.
[0061] Through the above Figure 2 In the process shown, the third-party payment application requests the target payment application to open offline payment for a certain user, obtains the offline payment credential of the user returned by the target payment application, and stores the credential on the terminal where the third-party payment application is located. The credential is encrypted and stored on the terminal with the associated secret key of the user's identity authentication identifier. Next, the use process executed by the third-party payment application when the user wants to use the offline payment of the target payment application will be described.
[0062] Usage of offline payment:
[0063] This usage process still combines Figure 2 Take the application scenario described above as an example, that is, the offline payment credentials are stored locally in the terminal by the third-party payment application and are encrypted. When the user purchases the goods and wants to perform offline payment, he can quickly open the third-party payment application in the consumer terminal, select a target payment application in the third-party payment application, and determine to use the target payment application for offline payment. When the third-party payment application receives the above user's selection, it is equivalent to receiving the offline payment request initiated by the user for the corresponding target payment application, and can then execute Figure 3 The usage process shown is the process of performing offline payment.
[0064] See also Figure 3 As shown, the third-party payment application can send a credential acquisition request to the local storage device to request the user's offline payment credential. In addition, when the user chooses to use the offline payment of the target payment application in the third-party payment application, the user can be instructed to provide the account ID registered in the target payment application, and the account ID is carried in the credential acquisition request, so that the local secure storage can know which user's offline payment credential the third-party payment application wants to obtain.
[0065] When storing offline payment credentials, the payment client may store them according to the corresponding relationship of "account ID corresponding to offline payment credentials". Then, in step 303, the corresponding offline payment credentials may be found according to the account ID of the user currently requesting offline payment, and the credentials may be sent to the local authentication center. The local authentication center may generate a corresponding payment string based on the offline payment credentials. The payment string may be a payment string (or a key string) generated by taking the offline payment credentials as factors and following certain algorithmic rules, and return the payment string to the local authentication center. In addition, the specific implementation is not limited to the above-mentioned method. The storage of offline payment credentials may also be carried out in other ways. For example, the corresponding relationship between the payment application and the credentials may be stored, so that the corresponding credentials may be determined according to the application selected by the user for offline payment.
[0066] In steps 306 to 308, the local authentication center may authenticate the user before returning the payment string to the third-party payment application. Figure 2 In the activation process shown, if the authentication method selected by the user is fingerprint authentication, then in step 306, the third-party payment application can obtain the user's fingerprint information and transmit the fingerprint to the local authentication center. The local authentication center can store the identity authentication identifier when the user activates the offline payment of the target payment application, and when it determines that the obtained identity authentication identifier has been verified, it will provide the above payment string to the third-party payment application. In fact, what the local authentication center feeds back to the third-party payment application is the user's offline payment credential. It just generates the corresponding payment string according to certain rules for greater security. The subsequent offline payment server can convert the payment string into the offline payment credential to obtain the user's identity. The offline payment server knows the generation rules when the local authentication center generates the payment string.
[0067] Through the above steps 301 to 308, the third-party payment application has obtained the user's offline payment credentials, and it is obtained when the user's identity authentication identifier is authenticated, ensuring that it is the user himself who obtains his offline payment credentials, further improving the security of offline payment. In steps 309 and 310, the third-party payment application can provide the payment string to the offline payment service provider, which can be the merchant's acquiring system. The acquiring system can flexibly set a variety of methods to obtain the payment string, such as QR code, NFC, Bluetooth, sound waves, etc. For example, when the payment string is presented in the form of a QR code, the merchant's acquiring system can obtain the payment string by scanning.
[0068] In steps 311 to 315, the merchant can use the obtained payment string to request the offline payment server of the target payment application to process the offline payment of the user, and provide the payment string to the offline payment server of the target payment application. After obtaining the payment string, the offline payment server of the target payment application can convert the payment string into the corresponding offline payment voucher according to the preset rules, and can obtain the user account corresponding to the voucher according to the voucher generation rules, know which user's voucher it is, and then deduct the payment account of the user. The acquiring system can feedback to the third-party consumption application that the deduction is successful.
[0069] Through the above process, it can be seen that, for example, if the user's consumption terminal does not use the network and is offline, if the target payment application's offline payment is to be used, the user can open the third-party payment application on the terminal and select a target payment application's offline payment from the application. The third-party payment application can obtain the user's pre-stored offline payment credentials from the terminal locally according to the user's request, and obtain the credentials only after the identity authentication is passed. Then, the third-party payment application can provide the credentials to the merchant, such as by scanning a QR code, and the merchant carries the credentials to the offline payment server of the target payment application to request offline payment processing for the user corresponding to the credentials, and deducts money from the user's payment account, thereby completing the local offline payment.
[0070] Cancellation of offline payment:
[0071] The third-party payment application can also interact with the target payment application to cancel the user's offline payment in the target payment application. The offline payment cancellation process can be found in Figure 4 , including: in step 401, the third-party payment application receives a request initiated by the user to cancel offline payment. For example, the user can choose to cancel offline payment of a target payment application on the page of the third-party payment application. Then, in steps 402 to 409, the third-party payment application obtains the payment string generated by the offline payment voucher as a factor from the local storage device. For the specific process, please refer to Figure 3 Description.
[0072] In steps 410 and 411, the third-party payment application can send a request to cancel offline payment (i.e., an offline payment cancellation request) to the offline payment server of the target payment application through forwarding by the application server, and carry the payment string obtained above. Alternatively, instead of obtaining the payment string, the payment client can also return the offline payment voucher to the third-party payment application, and the application can carry the offline payment voucher in the request to cancel offline payment. Even if it is a payment string, the offline payment server can obtain the offline payment voucher accordingly.
[0073] In step 412, the offline payment server of the target payment application can obtain the user account (i.e., user identification, whether it is the token mentioned above or the user account here, in fact, can be called user identification) corresponding to the offline payment voucher obtained by the received offline payment release request, and know which user wants to request to release the offline payment. In addition, the offline payment activation information of the user is deleted. In steps 413 and 414, the offline payment server can feedback the notification of successful offline payment release to the third-party payment application.
[0074] In addition, in the above example, the third-party payment application obtains the offline payment voucher from the offline payment server of the target payment application and stores the offline payment voucher locally in the terminal. When the user uses the offline payment of the target payment application, the third-party payment application can obtain the voucher locally in the terminal and then provide the voucher to the offline payment service provider, such as the merchant acquiring system. The specific implementation is not limited to Figures 2 to 4 In the process shown, for example, in other examples, the third-party payment application may obtain the credential from the target payment application and store the credential itself, that is, without going through the payment client of the target payment application.
[0075] The offline payment method of the embodiment of the present application provides a method for the target payment application to provide the offline payment credentials of a registered user of the application to a third-party payment application. The third-party payment application can obtain the credentials provided by the target payment application by interacting with the target payment application. In addition, the third-party payment application can store the credentials on the terminal side. When a subsequent user wants to use the offline payment of the target payment application through the third-party payment application, the third-party payment application can take out the stored credentials and provide the credentials to the merchant after verifying the user's identity authentication identifier, so that the merchant can request the target payment application to execute the offline payment deduction of the corresponding user. This is a way for the target payment application to output its own offline payment service to the third-party payment application, so that the user can use the offline payment of the target payment application through the third-party payment application.
[0076] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by a processor of the device to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0077] In order to implement the above method, the embodiment of the present application also provides an offline payment device, which is applied to a third-party payment application and is used to perform offline payment using a target payment application in a third-party payment application integrated by a terminal. Figure 5As shown, the device may include: an information acquisition module 51, a credential acquisition module 52 and a credential providing module 53.
[0078] An information acquisition module 51 is used to acquire the identity authentication identifier of the user who sends the offline payment request when receiving the offline payment request corresponding to the target payment application, where the user is a registered user of the target payment application;
[0079] The credential acquisition module 52 is used to obtain the offline payment credential issued by the target payment application to the user and stored in the terminal when it is determined that the identity authentication identifier obtained has been verified;
[0080] The credential providing module 53 is used to provide the offline payment credential to the offline payment service provider, so that the offline payment service provider requests the target payment application to process the offline payment of the user according to the offline payment credential.
[0081] In another example, Figure 6 As shown, the device may further include: an activation request module 54 , a credential receiving module 55 , a credential decryption module 56 and a credential storage module 57 .
[0082] The request activation module 54 is used to send an offline payment activation request to the target payment application, carrying the user identifier of the user and the terminal identifier of the terminal;
[0083] The credential receiving module 55 is used to receive the offline payment credential corresponding to the user identifier returned by the target payment application, and the offline payment credential is encrypted by the target payment application using the terminal public key corresponding to the terminal identifier;
[0084] The credential decryption module 56 is used for the third-party payment application to decrypt using the terminal private key corresponding to the terminal identifier to obtain the offline payment credential;
[0085] The credential storage module 57 is used to store the offline payment credential in the terminal.
[0086] It may also include: a credential cancellation module 58, which is used to send an offline payment cancellation request to a target payment application, carrying an offline payment credential issued for the user, so that the target payment application deletes the offline payment credential.
[0087] In order to implement the above method, the embodiment of the present application also provides an offline payment device, which is applied to the offline payment server of the target payment application, and is used by the third-party payment application integrated by the terminal to perform offline payment using the target payment application. Figure 7As shown, the device may include: a request receiving module 71 and a credential providing module 72.
[0088] A request receiving module 71, configured to receive an offline payment activation request sent by a third-party payment application, carrying a user identifier of a user and a terminal identifier of the terminal, wherein the user is a registered user of the target payment application;
[0089] The credential providing module 72 is used to generate an offline payment credential corresponding to the user identifier, and encrypt the offline payment credential using the terminal public key corresponding to the terminal identifier and send it to the third-party payment application, so that the third-party payment application obtains the offline payment credential after decrypting it using the terminal private key corresponding to the terminal identifier.
[0090] In another example, Figure 8 As shown, the device may further include: a key generation module 73.
[0091] The key generation module 73 is used to generate a corresponding service identifier and a public-private key pair corresponding to the service identifier for the third-party payment application, and send the private key to the third-party payment application;
[0092] The request receiving module 71 is also used to obtain the corresponding public key according to the business identifier after receiving the offline payment activation request, and use the public key to verify that the offline payment activation request is sent by a third-party payment application; the user identifier and terminal identifier carried in the offline payment activation request are signed by the third-party payment application using the private key, and the request also carries the business identifier.
[0093] In one example, the device may further include: an information deletion module 74 .
[0094] The request receiving module 71 is further used to receive an offline payment cancellation request sent by a third-party payment application, carrying the offline payment credential;
[0095] The information deletion module 74 is used to obtain the corresponding user identification according to the offline payment credential and delete the offline payment activation information of the user identification.
[0096] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A payment method, characterized in that: The method is used to execute payment using a target payment application in a third-party payment application integrated by a terminal; the method comprises: Storing payment credentials of the target payment application through a third-party payment application; the payment credentials are used for offline payment; Using the payment credentials stored by the third-party application, executing payment corresponding to the target payment application; The method further comprises: The third-party payment application sends a payment activation request to the target payment application; wherein the payment activation request carries a first identifier corresponding to the user and a second identifier corresponding to the terminal; The third-party payment application receives the payment credential returned by the target payment application, corresponding to the first identifier and encrypted by the first secret key; The third-party payment application decrypts the encrypted payment credential using a second secret key; wherein the first secret key and the second secret key are a key pair corresponding to the second identifier; The storing of the payment credentials of the target payment application through the third-party payment application includes: The payment credential obtained after decryption is stored in the terminal through the third-party payment application.
2. The method according to claim 1, characterized in that The using the payment credential stored by the third-party application to execute the payment corresponding to the target payment application includes: when the third-party payment application receives the payment request corresponding to the target payment application, obtaining the identity authentication identifier of the user who sent the payment request; When it is determined that the obtained identity authentication identifier has been verified, the third-party payment application provides the payment credential of the target payment application stored in the terminal to the payment service provider.
3. The method according to claim 2, characterized in that The step of storing the decrypted payment credential obtained by the third-party payment application in the terminal includes: The third-party payment application sends the user's identity authentication identifier to the local storage device of the terminal, so that the local storage device generates an associated secret key corresponding to the identity authentication identifier, and uses the associated secret key to encrypt the payment credential for storage; When the obtained identity authentication identifier is verified to be successful, the third-party payment application provides the payment credential of the target payment application stored in the terminal to the payment service provider, including: When the local storage device verifies that the identity authentication identifier is successful, the third-party payment application provides the payment service provider with the payment credential decrypted using the secret key associated with the identity authentication identifier.
4. The method according to claim 1, characterized in that The method further comprises: The third-party payment application sends a payment cancellation request to the target payment application, carrying the payment credential issued for the user, so that the target payment application deletes the payment credential.
5. A payment method, characterized in that: The method is applied to a payment server of a target payment application, and is used for executing payment using the target payment application in a third-party payment application integrated by a terminal; the method comprises: Sending the payment credential of the target payment application to the third-party payment application so as to store the payment credential through the third-party payment application; the payment credential is stored in the terminal for offline payment; The payment server of the target payment application sends the payment credential of the target payment application to the third-party payment application, including: The payment server of the target payment application generates a corresponding service identifier and a third key and a fourth key pair corresponding to the service identifier for the third-party payment application, and sends the fourth key to the third-party payment application; The payment server of the target payment application receives a payment activation request sent by the third-party payment application, which carries a first identifier corresponding to the user and a second identifier corresponding to the terminal, wherein the first identifier and the second identifier are signed using the fourth secret key, and the request also carries the service identifier; After receiving the payment activation request, the payment server obtains the corresponding third secret key according to the service identifier to verify that the payment activation request is sent by the third-party payment application, generates a payment credential corresponding to the first identifier, and encrypts the payment credential using the first secret key and sends it to the third-party payment application, so that the third-party payment application obtains the payment credential after decrypting it using the second secret key; Among them, the first key and the second key are keys corresponding to the second identifier.
6. The method according to claim 5, characterized in that The method further comprises: The payment server receives a payment cancellation request sent by a third-party payment application, carrying the payment credential; The payment server obtains the corresponding user identification according to the payment credential, and deletes the payment activation information of the user identification.
7. A payment device, characterized in that: The device is applied to a third-party payment application and is used to execute payment using a target payment application in a third-party payment application integrated by a terminal; the device comprises: A credential storage module, used to store the payment credential of the target payment application through a third-party payment application; the payment credential is used for offline payment; A payment module, used to use the payment voucher stored by the third-party application to execute payment corresponding to the target payment application; The payment module is also used to: send a payment activation request to the target payment application through the third-party payment application; wherein the payment activation request carries a first identifier corresponding to the user and a second identifier corresponding to the terminal; receive the payment voucher corresponding to the first identifier and encrypted by the first key returned by the target payment application through the third-party payment application; decrypt the encrypted payment voucher through the third-party payment application using the second key; wherein the first key and the second key are a key pair corresponding to the second identifier; The payment module is used to store the payment voucher obtained after decryption in the terminal through the third-party payment application.
8. A payment device, characterized in that: The device is applied to a payment server of a target payment application, and is used for executing payment using the target payment application in a third-party payment application integrated by a terminal; the device comprises: A credential providing module, used for sending the payment credential of the target payment application to the third-party payment application so as to store the payment credential through the third-party payment application; the payment credential is stored in the terminal for offline payment; The credential providing module is also used for: generating a corresponding business identifier and a third key and a fourth key pair corresponding to the business identifier for the third-party payment application through the payment server of the target payment application, and sending the fourth key to the third-party payment application; receiving a payment activation request sent by the third-party payment application through the payment server of the target payment application, carrying a first identifier corresponding to the user and a second identifier corresponding to the terminal, the first identifier and the second identifier are signed using the fourth key, and the request also carries the business identifier; after receiving the payment activation request, the payment server obtains the corresponding third key according to the business identifier to verify that the payment activation request is sent by the third-party payment application, generates a payment credential corresponding to the first identifier, and encrypts the payment credential using the first key and sends it to the third-party payment application, so that the third-party payment application obtains the payment credential after decrypting it using the second key; wherein the first key and the second key are the keys corresponding to the second identifier.
