收藏
回答

微信支付成功怎么可以跳转到其他页面

我想在支付成功以后怎么跳转到其他界面		

                                ksort($pars, SORT_STRING);
				$string1 = '';
				foreach ($pars as $k => $v) {
					$string1 .= "{$k}={$v}&";
				}
				$string1 .= "key=" . $mchkey;
				//$pars['sign'] = strtoupper(md5($string1));
				$pars['sign'] = strtoupper(hash_hmac("sha256",$string1 ,$mchkey));
				$xml = array2xml($pars);


				$client = new \GuzzleHttp\Client(['timeout'=>30,'verify'=>false]);
				$response = $client->request('POST',"https://api.mch.weixin.qq.com/secapi/pay/profitsharingreturn",['body'=>$xml,'cert'=>$sslcert,'ssl_key'=>$sslkey]);
				$info = $response->getBody()->getContents();


				$resp = (array)(simplexml_load_string($info,'SimpleXMLElement', LIBXML_NOCDATA));
				//\think\facade\Log::write($pars);
				//\think\facade\Log::write($resp);
				if($resp['return_code'] == 'SUCCESS' && $resp['result']=='SUCCESS'){
					Db::name('wxpay_log')->where('aid',$aid)->where('ordernum',$ordernum)->update(['isfenzhang'=>3]);
回答关注问题邀请回答
收藏

1 个回答

  • 跨商通
    跨商通
    2023-05-17

    wx.navigateTo

    2023-05-17
    有用
    回复 1
    • 安子
      安子
      05-21
      怎么解决,兄台
      05-21
      回复
登录 后发表内容