微信支付生成package參數缺失 - 新聞資訊 - 雲南小程序開發|雲南軟件開發|雲南網站建設-昆明融晨信息技術有限公司

159-8711-8523

雲南網建設/小程序開發/軟件開發

知識

不(bù)管是(shì)網站,軟件還是(shì)小程序,都要(yào / yāo)直接或間接能爲(wéi / wèi)您産生價值,我們在(zài)追求其視覺表現的(de)同時(shí),更側重于(yú)功能的(de)便捷,營銷的(de)便利,運營的(de)高效,讓網站成爲(wéi / wèi)營銷工具,讓軟件能切實提升企業内部管理水平和(hé / huò)效率。優秀的(de)程序爲(wéi / wèi)後期升級提供便捷的(de)支持!

您當前位置>首頁 » 新聞資訊 » 技術分享 >

微信支付生成package參數缺失

發表時(shí)間:2020-11-13

發布人(rén):融晨科技

浏覽次數:114


就(jiù)是(shì)這(zhè)個(gè)方法返回了(le/liǎo)flase,所以(yǐ)出(chū)錯。把以(yǐ)下方法替換掉爲(wéi / wèi)最下面的(de)方法,就(jiù)會知道(dào)具體是(shì)什麽參數出(chū)錯
WxPayHelper.php文件
	function check_cft_parameters(){
		if($this->parameters["bank_type"] == null || $this->parameters["body"] == null || $this->parameters["partner"] == null || 
			$this->parameters["out_trade_no"] == null || $this->parameters["total_fee"] == null || $this->parameters["fee_type"] == null ||
			$this->parameters["notify_url"] == null || $this->parameters["spbill_create_ip"] == null || $this->parameters["input_charset"] == null
			)
		{
			return false;
		}
		return true;

	}
将以(yǐ)上(shàng)的(de)方法替換爲(wéi / wèi)下面的(de)方法
	function check_cft_parameters(){
		if($this->parameters["bank_type"] == null){
			die('bank_type爲(wéi / wèi)空');
		}
		if( $this->parameters["body"] == null){
			die('body爲(wéi / wèi)空');
		}
		if($this->parameters["partner"] == null){
			die('partner爲(wéi / wèi)空');
		}if( $this->parameters["out_trade_no"] == null){
			die('out_trade_no爲(wéi / wèi)空');
		}if($this->parameters["total_fee"] == null){
			die('total_fee爲(wéi / wèi)空');
		}if( $this->parameters["fee_type"] == null){
			die('fee_type爲(wéi / wèi)空');
		}if($this->parameters["notify_url"] == null){
			die('notify_url爲(wéi / wèi)空');
		}if( $this->parameters["spbill_create_ip"] == null){
			die('spbill_create_ip爲(wéi / wèi)空');
		}if($this->parameters["input_charset"] == null)
		{
			die('input_charset爲(wéi / wèi)空');
// 			return false;
		}
		return true;

	}

免費微信公衆平台http://www.linglingtang.com

相關案例查看更多