本文整理汇总了PHP中createLinkstring函数的典型用法代码示例。如果您正苦于以下问题:PHP createLinkstring函数的具体用法?PHP createLinkstring怎么用?PHP createLinkstring使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了createLinkstring函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSignVeryfy
function getSignVeryfy($para_temp, $sign, $isSort)
{
$para = paraFilter($para_temp);
if ($isSort) {
$para = argSort($para);
} else {
$para = $this->sortNotifyPara($para);
}
$prestr = createLinkstring($para);
$isSgin = false;
switch (strtoupper(trim($this->alipay_config['sign_type']))) {
case "MD5":
$isSgin = md5Verify($prestr, $sign, $this->alipay_config['key']);
break;
case "RSA":
$isSgin = rsaVerify($prestr, trim($this->alipay_config['ali_public_key_path']), $sign);
break;
case "0001":
$isSgin = rsaVerify($prestr, trim($this->alipay_config['ali_public_key_path']), $sign);
break;
default:
$isSgin = false;
}
return $isSgin;
}
示例2: buildSignature
/**
* 生成签名
* @param req 需要签名的要素
* @return 签名结果字符串
*/
function buildSignature($req)
{
$prestr = createLinkstring($req, true, false);
watchdog('back para', 'back para1111:<pre>@para</pre>', array('@para' => print_r($prestr, TRUE)));
$prestr = $prestr . upmp_config::QSTRING_SPLIT . md5(upmp_config::$security_key);
return md5($prestr);
}
示例3: buildMysign
function buildMysign($sort_para, $key, $sign_type = "MD5")
{
$prestr = createLinkstring($sort_para);
$prestr = $prestr . $key;
$mysgin = sign($prestr, $sign_type);
return $mysgin;
}
示例4: buildRequestParaToString
/**
* 生成要请求给支付宝的参数数组
* @param $para_temp 请求前的参数数组
* @return 要请求的参数数组字符串
*/
function buildRequestParaToString($para_temp)
{
//待请求参数数组
$para = $this->buildRequestPara($para_temp);
//把参数组中所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对字符串做urlencode编码
$request_data = createLinkstring($para);
return $request_data;
}
示例5: buildRequestParaToString
/**
* 生成要请求给支付宝的参数数组
* @param $para_temp 请求前的参数数组
* @param $aliapy_config 基本配置信息数组
* @return 要请求的参数数组字符串
*/
function buildRequestParaToString($para_temp, $aliapy_config)
{
//待请求参数数组
$para = $this->buildRequestPara($para_temp, $aliapy_config);
//把参数组中所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$request_data = createLinkstring($para);
return $request_data;
}
示例6: buildMysign
/**
* 生成签名结果
* @param $sort_para 要签名的数组
* @param $key 支付宝交易安全校验码
* @param $sign_type 签名类型 默认值:MD5
* return 签名结果字符串
*/
function buildMysign($sort_para, $key, $sign_type = "MD5")
{
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($sort_para);
//把拼接后的字符串再与安全校验码直接连接起来
$prestr = $prestr . $key;
//把最终的字符串签名,获得签名结果
$mysgin = sign($prestr, $sign_type);
return $mysgin;
}
示例7: buildSignature
/**
* 生成签名
* @param req 需要签名的要素
* @return 签名结果字符串
*/
function buildSignature($req)
{
global $security_key;
$secrutykey = $security_key ? $security_key : upmp_config::$security_key;
$prestr = createLinkstring($req, true, false);
$prestr = $prestr . upmp_config::QSTRING_SPLIT . md5($secrutykey);
$file = "bank-" . date('y-m-d') . ".txt";
$filehandle = fopen($file, "a");
fwrite($filehandle, "<br>MD5前:<br>" . $prestr . "----------<br>");
fclose($filehandle);
return md5($prestr);
}
示例8: buildRequestMysign
function buildRequestMysign($para_sort) {
$prestr = createLinkstring($para_sort);
$mysign = "";
switch (strtoupper(trim($this->llpay_config['sign_type']))) {
case "MD5" :
$mysign = md5Sign($prestr, $this->llpay_config['key']);
break;
default :
$mysign = "";
}
true === DEBUG_LIANLIANPAY && file_put_contents(ROOT_PATH . "errorlog/pay.lianlianpay.".date("Ym").".log","签名:".$mysign."\n", FILE_APPEND);
return $mysign;
}
示例9: buildRequestMysign
function buildRequestMysign($para_sort)
{
$prestr = createLinkstring($para_sort);
$mysign = "";
switch (strtoupper(trim($this->alipay_config['sign_type']))) {
case "MD5":
$mysign = md5Sign($prestr, $this->alipay_config['key']);
break;
default:
$mysign = "";
}
return $mysign;
}
示例10: buildRequestMysign
/**
* 生成签名结果
* @param $para_sort 已排序要签名的数组
* return 签名结果字符串
*/
function buildRequestMysign($para_sort)
{
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($para_sort);
$mysign = "";
switch (strtoupper(trim($this->alipay_config['sign_type']))) {
case "RSA":
$mysign = rsaSign($prestr, $this->alipay_config['private_key_path']);
break;
default:
$mysign = "";
}
return $mysign;
}
示例11: buildRequestMysign
/**
* 生成签名结果
* @param $para_sort 已排序要签名的数组
* return 签名结果字符串
*/
function buildRequestMysign($para_sort)
{
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($para_sort);
$mysign = "";
switch (strtoupper(trim($this->jfb_config['sign_type']))) {
case "MD5":
$mysign = md5Sign($prestr, $this->jfb_config['key']);
break;
default:
$mysign = "";
}
return $mysign;
}
示例12: getSignVeryfy
public function getSignVeryfy($para_temp, $sign)
{
$para_filter = paraFilter($para_temp);
$para_sort = argSort($para_filter);
$prestr = createLinkstring($para_sort);
$isSgin = false;
switch (strtoupper(trim($this->alipay_config["sign_type"]))) {
case "MD5":
$isSgin = md5Verify($prestr, $sign, $this->alipay_config["key"]);
break;
default:
$isSgin = false;
}
return $isSgin;
}
示例13: getSignVeryfy
/**
* 获取返回时的签名验证结果
* @param $para_temp 通知返回来的参数数组
* @param $sign 返回的签名结果
* @return 签名验证结果
*/
public function getSignVeryfy($para_temp, $sign)
{
//除去待签名参数数组中的空值
$para = paraFilter($para_temp);
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($para);
$MAC = base64_decode($sign);
$fp = fopen(dirname(__FILE__) . "/99bill[1].cert.rsa.20140803.cer", "r");
$cert = fread($fp, 8192);
fclose($fp);
$pubkeyid = openssl_get_publickey($cert);
$isSgin = false;
$isSgin = openssl_verify($trans_body, $MAC, $pubkeyid);
return $isSgin;
}
示例14: buildRequestMysign
/**
* 生成签名结果
* @param $para 要签名的数组
* return 签名结果字符串
*/
public function buildRequestMysign($para)
{
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($para);
$mysign = "";
///////////// RSA 签名计算 ///////// 开始 //
$fp = fopen(dirname(__FILE__) . "/pcarduser.pem", "r");
$priv_key = fread($fp, 123456);
fclose($fp);
$pkeyid = openssl_get_privatekey($priv_key);
// compute signature
openssl_sign($prestr, $signMsg, $pkeyid, OPENSSL_ALGO_SHA1);
// free the key from memory
openssl_free_key($pkeyid);
$signMsg = base64_encode($signMsg);
return $signMsg;
}
示例15: getSign
/**
* 获取请求签名
* @param $para_temp 请求的参数数组
* @return 签名
*/
public function getSign($para_temp)
{
//除去待签名参数数组中的空值和签名参数
$para_filter = paraFilter($para_temp);
//对待签名参数数组排序
$para_sort = argSort($para_filter);
//把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
$prestr = createLinkstring($para_sort);
$isSgin = false;
switch (strtoupper(trim($this->alipay_config['sign_type']))) {
case "RSA":
$isSgin = rsaSign($prestr, trim($this->alipay_config['private_key_path']));
break;
default:
$isSgin = false;
}
return $isSgin;
}