Home Backend Development PHP Tutorial Things to note when accessing PHP Sesame Credit

Things to note when accessing PHP Sesame Credit

May 30, 2018 am 09:32 AM
php Access Precautions

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\"}");//
Copy after login

After the authorization is successful, it will jump to the callback address we set. This callback address GET parameter has a param parameter. You must use the decryption function in the SDK. After decryption, you can get the customer's OPENI_ID.

After getting the OPEN_ID, save it to the database and the authorization is completed.

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.


Related recommendations:

How to implement the function of randomly generating watermark images in PHP

# #PHP implements reading Cookies set by JavaScript


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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

CakePHP Date and Time

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

CakePHP File upload

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

CakePHP Project Configuration

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

CakePHP Routing

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

Discuss CakePHP

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP Quick Guide

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

See all articles