|
@@ -17,12 +17,18 @@ class Wechat extends Base {
|
|
|
public function wechatCallback() {
|
|
|
// $param = $_REQUEST['param'];
|
|
|
Log::record('微信支付回调');
|
|
|
-
|
|
|
- $res = file_get_contents("php://input");
|
|
|
- $xml = simplexml_load_string($res);
|
|
|
+ Log::record('xml');
|
|
|
+ $xml = file_get_contents("php://input");
|
|
|
Log::record($xml);
|
|
|
- $data = json_decode(json_encode($xml),TRUE);
|
|
|
- json_decode($data);
|
|
|
+ Log::record('objectxml');
|
|
|
+ $objectxml = simplexml_load_string($xml);//将文件转换成 对象
|
|
|
+ Log::record($objectxml);
|
|
|
+ Log::record('xmljson');
|
|
|
+ $xmljson= json_encode($objectxml );//将对象转换个JSON
|
|
|
+ Log::record($xmljson);
|
|
|
+ Log::record('xmlarray');
|
|
|
+ $xmlarray=json_decode($xmljson,true);//将json转换成数组
|
|
|
+ Log::record($xmlarray);
|
|
|
Log::record('微信支付回调');
|
|
|
// $order_id = $param['order_id'];
|
|
|
// $remote_order = DB::table('remote_order')->where('id', $order_id)->find();
|