/** * 生成签名结果 * * @param $para_sort 已排序要签名的数组 * * @return 签名结果字符串 */ function buildRequestMysign($para_sort) { //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串 $prestr = Core::createLinkstring($para_sort); $mysign = ""; switch (strtoupper(trim($this->alipay_config['sign_type']))) { case "RSA": $mysign = Rsa::rsaSign($prestr, $this->alipay_config['private_key_path']); break; default: $mysign = ""; } return $mysign; }