コード例 #1
0
ファイル: Submit.php プロジェクト: yocome/alipay
 /**
  * 生成签名结果
  * @param $para_sort 已排序要签名的数组
  * return 签名结果字符串
  */
 public function buildRequestMysign($para_sort)
 {
     //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
     $prestr = Alipay::createLinkstring($para_sort);
     $mysign = "";
     switch (strtoupper(trim($this->config['sign_type']))) {
         case "RSA":
             $mysign = RSA::rsaSign($prestr, $this->config['private_key_path']);
             break;
         default:
             $mysign = "";
     }
     return $mysign;
 }