芝麻信用新版网站
https://b.xin.xin/ant/index.htm
芝麻信用开放平台对接thinkphp
商户通过芝麻信用开放平台对接芝麻信用提供的产品和服务,芝麻信用开放平台定位于芝麻信用产品的快速安全输出以及商户对于芝麻信用产品的快速安全接入,通过芝麻信用开放平台,商户将芝麻信用的产品、服务整合在自己的业务流程中。
开放平台通过轻量级的HTTP服务的方式输出芝麻信用产品,在安全性方面,除了使用HTTPS外,对于所有的业务数据,我们提供了使用RSA加密加签的方式,最大化的保证了数据的安全传输。
生成RSA密钥 神器
配置芝麻信用再不说了
直接上类库及 用法吧
下载附件到 \ThinkPHP\Library\Vendor\
Vendor('aop.AopClient');
$aop = new \AopClient();
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
$aop->appId = '';//设置自己的
$aop->rsaPrivateKey ='';//设置自己的
$aop->alipayrsaPublicKey=";//设置自己的
$aop->apiVersion = '1.0';
$aop->signType = 'RSA2';
$aop->postCharset='UTF-8';
$aop->format='json';
$accessToken='';//设置自己的
Vendor('aop.request.ZhimaCreditScoreGetRequest');//设置API名称
$request = new \ZhimaCreditScoreGetRequest();//设置API名称
////设置API请求参数
$str=array(
"transaction_id"=>"201512100936588040000".time(),
"product_code"=>'w1010100100000000001',
);
$str=json_encode($str);
$request->setBizContent($str);
$result =$aop ->execute($request,$accessToken);
$responseNode = str_replace(".", "_", $request->getApiMethodName()) . "_response";
$result=object_array($result);
$res=$result[$responseNode];
aop.zip
( 658.39 KB 下载:52 次 )
