PHP 实现手机端APP支付宝支付功能(2)

//配置参数 public $alipay_config = array( //2088开头 'partner' => '', //商户的私钥,此处填写原始私钥去头去尾,RSA公私钥生成:https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1 'private_key' => '', //支付宝的公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm?keyType=partner 'alipay_public_key' => '', //异步通知接口 'service'=> 'mobile.securitypay.pay', //字符编码格式 目前支持 gbk 或 utf-8 'input_charset' => 'utf-8', //签名方式 不需修改 'sign_type' => 'RSA', //ca证书路径地址,用于curl中ssl校验 //请保证cacert.pem文件在当前文件夹目录中 'cacert' => '/cacert.pem', //访问模式,根据自己的服务器是否支持ssl访问,若支持请选择https;若不支持请选择http 'transport' => 'http', );

创建$alipa_config属性,可以放到你的配置文件中方便引入,也可以直接放到Alipay类中,里面只要前三项需要自己填写,其余不变就好啦。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/69f40c05e4b052d809b5e8d17d38b7bf.html