PHP zhima credit access considerations, php zhima credit access
The official download SDK from zhima cannot run, and Baidu does not find many articles. Only one article written by a CSDN blog is of reference value.
For more information, see the document + several days to test and sort out the following considerations:
To access the sesame API, perform the following two steps:
Step 1: get authorization. This is the official SDK. You can perform operations only if the parameter configuration is correct. Note the following parameters,
In addition, the most important point is the generation and modification of the sesame public key. The generated public key is copied to the sesame background according to official operations. After saving the public key, sesame will generate a new public key and click Copy, save it to our public key file and upload it to the space for PHP call.
$ Request-> setScene ("test"); $ request-> setChannel ("apppc"); $ request-> setPlatform ("zmop "); $ request-> setIdentityType ("2"); // required parameters // construct the Authorization Service input credential number, name, and credential type; "identity_param" $ request-> setIdentityParam ("{\" certNo \ ": \" $ certNo \ ", \" certType \": \ "IDENTITY_CARD \", \ "name \": \ "$ name \"} "); // $ request-> setIdentityParam (" {\ "certNo \": \ "$ certNo \", \ "certType \": \ "IDENTITY_CARD \", \ "name \": \ "$ name \", \ "mobileNo \": \ "$ mobile \"}"); // construct biz_params for business input parameters in section 4. $ request-> setBizParams ("{\" auth_code \ ": \" M_H5 \", \ "channelType \": \ "app \", \ "state \": \ "$ uid \"}");//
After successful authorization, the system will jump to the callback address we set. This callback address is the GET parameter and has a param parameter. You must use the decryption function in the SDK to obtain the client's OPENI_ID after decryption,
After obtaining the OPEN_ID, save it to the database and complete the authorization.
Step 2,
According to the OPEN_ID obtained by the authorization, the zhima score is obtained. The example in this SDK can be run...
The most important thing is the first point.
The above is a small Editor to introduce you to the PHP sesame credit access considerations, I hope to help you, if you have any questions, please leave a message, the small editor will reply to you in a timely manner. Thank you very much for your support for the help House website!