PHP微信支付 返回参数 获取对象里面的protected的内容

        微信支付生成预支付订单接口返回参数打印出来 我们想要的内容被放在【content protected】里面,那么如何取到内容呢?

       解决办法是通过 $request->getContent 获取原始内容解析

if($pay_type ==1){//支付宝
            $result = $this->aliPay($bill_id,$total_amount,$name,$platform_type,$order_type,$account_no);
            $arr['order'] = strstr($result,'app_id');
            $arr['pay_type'] = $pay_type;
        }else{//微信
            $arr = $this->wxPay($bill_id,$total_amount,$name,$platform_type,$order_type,$account_no);
            $arr = json_decode($arr->getContent());
        }

猜你喜欢

转载自blog.csdn.net/lw545034502/article/details/84998588