PHP Sesame Credit Access Considerations _php Example

Source: Internet
Author: User
Zhimaguan side Download SDK, not run up, Baidu Search also did not find too many articles, only a CSDN blog wrote an article, comparative reference value

Detailed documentation + several days of testing to organize the following notes:

Access Sesame API interface, should be divided into 2 steps:

The first step, get authorization, this, the official SDK, as long as the parameters are configured correctly, you can operate. Note the following parameters, and the sesame document comparison,

The other most important point,,, the sesame public key generation, as well as the modification, the generated public key according to the official operation copied into the sesame background, after saving, sesame will generate a new public key, click Copy, save to our public key file, and then upload to the space to PHP call.

$request->setscene ("test"); $request->setchannel ("APPPC"), $request->setplatform ("Zmop"), $request->setidentitytype ("2");//Necessary parameters// Constructs the authorization business to enter the document number, the name, the document type; Business entry instructions 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 \ "}"); The Business Entry specification in section 4, "Biz_params" $request->setbizparams ("{\" auth_code\ ": \" m_h5\ ", \" channeltype\ ": \" App\ ", \ "state\": \ "$uid \"} ");//

After the authorization succeeds, will jump to our set callback address, this callback address get parameter, has a param parameter, must use the decryption function in the SDK, after decryption, can obtain the customer openi_id,

Okay, after getting this open_id, save it to the database, and the authorization is done.

Step Two,

According to the authorization obtained open_id, obtains the sesame cent, this SDK example, can run up ...

The most important is the 1th.

The above is a small part of the introduction of the PHP Sesame Credit access considerations, I hope that we have some help, if you have any questions please give me a message, small series will promptly reply to you. Thank you very much for the support of the Scripting House website!

  • Related Article

    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.