1. User wallet binding interface (optional)
Business description: User A binds a wallet to merchant B, and merchant B calls this interface. The result returned by the interface contains a URL, the URL opens a page containing a QR code. user A scans the QR code using MPay wallet, after the code is scanned successfully, the system will request a callback callBackUrl.
`interface url:{host}/api/v2.1/merch/user/bind
`request method:GET/POST form
field | type | nickname | description |
---|---|---|---|
merchId | Integer | merchant ID | |
body | String | Encryption parameters | See Table 2 for details |
t | Integer | current timestamp | |
key | String | sign | Md5(merchId+body+t+md5key) |
Parameters:
example:merchId=123, body=qwertyui, md5key=asdfghj
then key = MD5(123qwertyuiasdfghj)
Table 2:
field | type | nickname | description |
---|---|---|---|
merchUserName | String | The unique identifier of the user in the merchant system | |
callBackUrl | String | Merchant Customized Callback Interface | For details, please refer to the wallet binding notice. |
body generation rules:
`1. base64Decode public key
`2. Convert the parameters in Table 2 to jsonString
3. Use public key to encrypt jsonString with RSA (ECB mode, PKCS1 alignment)
4. The encryption result base64 Encode is the string body
Interface Response Results:
field | type | nickname | description |
---|---|---|---|
code | Integer | status code | 0 means the request is normal, see the attached table for details. |
message | String | message | |
data | String | Return data | Includes QR code URL |