Open aa820t opened 7 years ago
/**
作用:设置jsapi的参数 / public function getParameters() { / 原代码 $jsApiObj["appId"] = $this->appId; //请求生成支付签名时需要,js调起支付参数中不需要 $timeStamp = time(); $jsApiObj["timeStamp"] = "$timeStamp"; //用大写的timeStamp参数请求生成支付签名 $jsParamObj["timestamp"] = $timeStamp; //用小写的timestamp参数生成js支付参数,还要注意数据类型,坑! $jsParamObj["nonceStr"] = $jsApiObj["nonceStr"] = $this->weObj->generateNonceStr(); $jsParamObj["package"] = $jsApiObj["package"] = "prepay_id=$this->prepay_id"; $jsParamObj["signType"] = $jsApiObj["signType"] = "MD5"; $jsParamObj["paySign"] = $jsApiObj["paySign"] = $this->getSign($jsApiObj); $jsParam = json_encode($jsParamObj); return $jsParam; */
/ 新测试正常代码/ $jsParamObj["appId"] = $jsApiObj["appId"] = $this->appId; $timeStamp = time(); $jsParamObj["timeStamp"] = "$timeStamp"; $jsParamObj["nonceStr"] = $this->weObj->generateNonceStr(); $jsParamObj["package"] = "prepay_id=$this->prepay_id"; $jsParamObj["signType"] = $jsApiObj["signType"] = "MD5"; $jsParamObj["paySign"] = $this->getSign($jsParamObj); $jsParam = json_encode($jsParamObj); return $jsParam; }
/**
作用:设置jsapi的参数 / public function getParameters() { / 原代码 $jsApiObj["appId"] = $this->appId; //请求生成支付签名时需要,js调起支付参数中不需要 $timeStamp = time(); $jsApiObj["timeStamp"] = "$timeStamp"; //用大写的timeStamp参数请求生成支付签名 $jsParamObj["timestamp"] = $timeStamp; //用小写的timestamp参数生成js支付参数,还要注意数据类型,坑! $jsParamObj["nonceStr"] = $jsApiObj["nonceStr"] = $this->weObj->generateNonceStr(); $jsParamObj["package"] = $jsApiObj["package"] = "prepay_id=$this->prepay_id"; $jsParamObj["signType"] = $jsApiObj["signType"] = "MD5"; $jsParamObj["paySign"] = $jsApiObj["paySign"] = $this->getSign($jsApiObj); $jsParam = json_encode($jsParamObj); return $jsParam; */
/ 新测试正常代码/ $jsParamObj["appId"] = $jsApiObj["appId"] = $this->appId; $timeStamp = time(); $jsParamObj["timeStamp"] = "$timeStamp"; $jsParamObj["nonceStr"] = $this->weObj->generateNonceStr(); $jsParamObj["package"] = "prepay_id=$this->prepay_id"; $jsParamObj["signType"] = $jsApiObj["signType"] = "MD5"; $jsParamObj["paySign"] = $this->getSign($jsParamObj); $jsParam = json_encode($jsParamObj); return $jsParam; }