# User registration/Signing (optional)
WeChat background to the owner initiated user registration.
# 1, request parameters
Parameter Name | type | Required | Remarks |
---|---|---|---|
appid | string | And | Mini Programs |
appidmch_id | string | And | Payment Merchant Number |
nuncio_st | string | And | Random string |
encrypted_data | string | And | Using AESCBCPKCS7PADDING |
iv | string | And | IV for decryption |
sign | string | And | 1Signature of field 5 |
encrypted_Data decryption data
Parameter Name | type | Required | Remarks |
---|---|---|---|
openid | string | And | User id |
# 2. Return parameters
Parameter Name | type | Required | Remarks |
---|---|---|---|
Errcode | int | And | 0 for success |
errmsg | string | N | Error message |
nuncio_st | string | And | Unaltered bring back |
encrypted_data | string | And | Using AESCBCPKCS7PADDING |
iv | string | And | IV for decryption |
encrypted_Data decryption data
Parameter Name | type | Required | Remarks |
---|---|---|---|
cardid | string | And | User Card ID |
# 3. Sample code
Request:
{"appid":"test","mch_id":"123456","nonce_str":"abcdefg","encrypted_data":"jfiwajeofjiefef","iv":"afweifwefe"}
encrypted_The data is decrypted as:
{“openid”:”1234”}
Return:
{"errcode":0,"nonce_str":"abcdefg","encrypted_data":"jfiwajeofjiefef","iv":"afweifwefe"}
encrypted_Data after decryption:
{“card_id”:”xxafdafd”}