php专区

 首页 > php专区 > PHP应用 > 开放平台 > 微信支付生成package参数缺失 - 微信公众平台开发

微信支付生成package参数缺失 - 微信公众平台开发

分享到:
【字体:
导读:
          就是这个方法返回了flase,所以出错。把以下方法替换掉为最下面的方法,就会知道具体是什么参数出错WxPayHelper php文件function check_cft_parameters(){if($this-parameters[bank_type] == null ||...

就是这个方法返回了flase,所以出错。把以下方法替换掉为最下面的方法,就会知道具体是什么参数出错

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;

	}
将以上的方法替换为下面的方法

 

 

	function check_cft_parameters(){
		if($this->parameters[bank_type] == null){
			die('bank_type为空');
		}
		if( $this->parameters[body] == null){
			die('body为空');
		}
		if($this->parameters[partner] == null){
			die('partner为空');
		}if( $this->parameters[out_trade_no] == null){
			die('out_trade_no为空');
		}if($this->parameters[total_fee] == null){
			die('total_fee为空');
		}if( $this->parameters[fee_type] == null){
			die('fee_type为空');
		}if($this->parameters[notify_url] == null){
			die('notify_url为空');
		}if( $this->parameters[spbill_create_ip] == null){
			die('spbill_create_ip为空');
		}if($this->parameters[input_charset] == null)
		{
			die('input_charset为空');
// 			return false;
		}
		return true;

	}

 

 

分享到:
微信--使用客服消息异步自动回复用户消息...
接收到微信用户发送过来的消息,我们服务器处理并回应。 需要注意一下,微信说明 对于每一个POST请求,开发者在响应包(Get)中返回特定XML结构,对该消息进行响应(现支持回复文本、图片、图文、语音、视频、音乐)。请注意,回复图片等多媒体消息时需要预先上传多媒体文件到微信服务器,只支持认证服务号。 微信服...
C#微信公众号开发系列教程五(接收事件推...
在上一篇的博文中讲到,微信的消息可以大体分为两种类型,一种是包括:文本,语音,图片等的普通消息,另一种就是本篇要将的事件类型。包括:关注/取消关注事件,扫描带参数二维码事件,上报地理位置事件,自定义菜单相关事件等。本篇一一进行讲解。 上一篇也提到了,微信服务器在5秒内收不到响应会断掉连接,并且重新发起...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……