700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > 支付宝c2c现金红包php代码/支持扫码/h5的方式没有任何依赖

支付宝c2c现金红包php代码/支持扫码/h5的方式没有任何依赖

时间:2024-07-15 01:52:04

相关推荐

支付宝c2c现金红包php代码/支持扫码/h5的方式没有任何依赖

<?phprequire_once 'EncryptResponseData.php';require_once 'SignData.php';require_once 'AopEncrypt.php';require_once 'AopCertification.php';require_once 'EncryptParseItem.php';class AopCertClient{//应用证书地址public $appCertSN;//支付宝公钥证书地址public $alipayCertSN;//支付宝根证书地址public $alipayRootCertSN;//支付宝根证书地址public $alipayRootCertContent;//是否校验支付宝公钥证书public $isCheckAlipayPublicCert;//应用IDpublic $appId;//私钥文件路径public $rsaPrivateKeyFilePath;//私钥值public $rsaPrivateKey;//网关public $gatewayUrl = "/gateway.do";//返回数据格式public $format = "json";//api版本public $apiVersion = "1.0";// 表单提交字符集编码public $postCharset = "UTF-8";//使用文件读取文件格式,请只传递该值public $alipayPublicKey = null;//使用读取字符串格式,请只传递该值public $alipayrsaPublicKey;public $debugInfo = false;//签名类型public $signType = "RSA";//加密密钥和类型public $encryptKey;public $encryptType = "AES";protected $alipaySdkVersion = "alipay-sdk-php--04-15";private $fileCharset = "UTF-8";private $RESPONSE_SUFFIX = "_response";private $ERROR_RESPONSE = "error_response";private $SIGN_NODE_NAME = "sign";private $ALIPAY_CERT_SN = "alipay_cert_sn";//加密XML节点名称private $ENCRYPT_XML_NODE_NAME = "response_encrypted";private $needEncrypt = false;private $targetServiceUrl = "";// 添加构造函数function __construct() {//根据参数个数和参数类型 来做相应的判断if(func_num_args()==1 && func_get_arg(0) instanceof AlipayConfig){$config = func_get_arg(0);$this->appId = $config->getAppId();$this->format = $config->getFormat();$this->postCharset = $config->getCharset();$this->rsaPrivateKey = $config->getPrivateKey();$this->gatewayUrl = $config->getServerUrl();$this->signType = $config->getSignType();// 优先从Content字段获取内容, content 未设置内容则从文件路径中读取内容$alipayPublicContent = !$this->checkEmpty($config->getAlipayPublicCertContent())?$config->getAlipayPublicCertContent():file_get_contents($config->getAlipayPublicCertPath());$this->alipayrsaPublicKey = $this->getPublicKeyFromContent($alipayPublicContent);$rootCertContent = !$this->checkEmpty($config->getRootCertContent())?$config->getRootCertContent():file_get_contents($config->getRootCertPath());$this->alipayRootCertSN = $this->getRootCertSNFromContent($rootCertContent);$appCertContent = !$this->checkEmpty($config->getAppCertContent())?$config->getAppCertContent():file_get_contents($config->getAppCertPath());$this->appCertSN = $this->getCertSNFromContent($appCertContent);}}

成果演示

查看更多 /apppay/xjhb

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。