This article has compiled two precautions for accessing the Sesame API. Friends who are interested in PHP Sesame Credit access should learn through this article.
The SDK officially downloaded by Sesame cannot run. After searching on Baidu, I didn't find too many articles. There was only one article written by a CSDN blog, which is more valuable for reference.
Read the documentation in detail for a few days to test and sort out the following notes:
Accessing the Sesame API interface should be divided into two steps:
The first step is to obtain authorization. This is the official SDK. As long as the parameters are configured correctly, it can be operated. Pay attention to the following parameters, compare with the Sesame document,
##The other most important point is, Sesame public key generation and modification, the generated public key is copied according to the official operation Enter the Sesame backend, and after saving, Sesame will generate a new public key, click copy, save it to our public key file, and then upload it to the space for PHP to call.
$request->setScene("test"); $request->setChannel("apppc"); $request->setPlatform("zmop"); $request->setIdentityType("2");// 必要参数 // 构造授权业务入参证件号,姓名,证件类型;“章节4中的业务入参说明identity_param” $request->setIdentityParam("{\"certNo\":\"$certNo\",\"certType\":\"IDENTITY_CARD\", \"name\":\"$name\"}"); // $request->setIdentityParam("{\"certNo\":\"$certNo\",\"certType\":\"IDENTITY_CARD\", \"name\":\"$name\",\"mobileNo\":\"$mobile\"}"); // 构造业务入参扩展参数“章节4中的业务入参说明biz_params” $request->setBizParams("{\"auth_code\":\"M_H5\",\"channelType\":\"app\",\"state\":\"$uid\"}");//
The second step,
According to the OPEN_ID obtained through authorization, you can get Sesame points. The example in this SDK can be run. . . The most important thing is the first point. The above are the precautions for PHP Sesame Credit access introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for your support of the Script House website! The above is the entire content of this article, I hope it will be helpful to everyone's study.How to implement the function of randomly generating watermark images in PHP
phpMethod to implement multi-dimensional array sorting
The above is the detailed content of Things to note when accessing PHP Sesame Credit. For more information, please follow other related articles on the PHP Chinese website!