PHP zhima credit access considerations, php zhima credit access

Source: Internet
Author: User

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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.