Considerations for accessing sesame credit in PHP, zhima credit

Source: Internet
Author: User

Considerations for accessing sesame credit in PHP, zhima credit

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 Parameter

// Construct an Authorization Service input credential number, name, and credential type. "business input parameter description in Section 4: identity_param"
$ Request-> setIdentityParam ("{\" certNo \ ": \" $ certNo \ ", \" certType \ ": \" IDENTITY_CARD \ ", \" name \": \ "$ name \"}");
// $ Request-> setIdentityParam ("{\" certNo \ ": \" $ certNo \ ", \" certType \ ": \" IDENTITY_CARD \", \ "name \": \ "$ name \", \ "mobileNo \": \ "$ mobile \"}");
// Construct the business input parameter extension parameter "biz_params" 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.

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.