This article has compiled the access to Sesame API two points of caution, to the PHP Sesame Credit Access friends interested in learning through this article
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!
The above is the whole content of this article, I hope that everyone's study has helped.