$appId
$appId
配置账号信息
GetSSLCertPath(mixed $sslCertPath, mixed $sslKeyPath) : mixed
TODO:设置商户证书路径 证书路径,注意应该填写绝对路径(仅退款、撤销订单时需要,可登录商户平台下载, API证书下载地址:https://pay.weixin.qq.com/index.php/account/api_cert,下载之前需要安装商户操作证书) 注意: 1.证书文件不能放在web服务器虚拟目录,应放在有访问权限控制的目录中,防止被他人下载; 2.建议将证书文件名改为复杂且不容易猜测的文件名; 3.商户服务器要做好病毒和木马防护工作,不被非法侵入者窃取证书文件。
mixed | $sslCertPath | |
mixed | $sslKeyPath |
<?php
require_once "WxPay.Config.Interface.php";
class WxPayConfig extends WxPayConfigInterface{
public $appId = "";
public $merchantId = "";
public $notifyUrl = "";
public $signType = "HMAC-SHA256";
public $proxyHost = "0.0.0.0";
public $proxyPort = 0;
public $reportLevenl = 1;
public $key = "";
public $appSecret = "";
public $sslCertPath = "apiclient_cert.pem";
public $sslKeyPath = "apiclient_key.pem";
//商户ID
public function GetAppId(){
return $this->appId;
}
//商户号
public function GetMerchantId(){
return $this->merchantId;
}
//异步通知地址
public function GetNotifyUrl(){
return $this->notifyUrl;
}
//签名方式
public function GetSignType(){
return $this->signType;
}
//代理信息
public function GetProxy(&$proxyHost, &$proxyPort){
$proxyHost = $this->proxyHost;
$proxyPort = $this->proxyPort;
}
//错误上报等级
public function GetReportLevenl(){
return $this->reportLevenl;
}
//支付密钥
public function GetKey(){
return $this->key;
}
//公众帐号secert
public function GetAppSecret(){
return $this->appSecret;
}
//证书路径
public function GetSSLCertPath(&$sslCertPath, &$sslKeyPath){
$sslCertPath = $this->sslCertPath;
$sslKeyPath = $this->sslKeyPath;
}
}