第一次搞这玩意,真是心累了。麻烦。。
参考了好几个文章
1、基于php的身份证实名认证接口调用代码实例
2、支付宝身份验证接口踩坑实录-PHP(基于ThinkPHP5)
public function userCertifyOpenInitialize($outer_order_no,$cert_name,$cert_no,$return_url)
{
require(EXTEND_PATH . 'Alipay/aop/AopClient.php');
require(EXTEND_PATH . '/Alipay/aop/request/AlipayUserCertifyOpenInitializeRequest.php');
require(EXTEND_PATH . '/Alipay/aop/request/AlipayUserCertifyOpenCertifyRequest.php');
$aop = new \AopClient ();
$aop->gatewayUrl = 'https://openapi.alipay.com/gateway.do';
$aop->appId = 'APPID';
$aop->rsaPrivateKey = '私钥';
$aop->alipayrsaPublicKey = '公钥';
$aop->apiVersion = '1.0';
$aop->signType