Wechat.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\inter\controller;
  3. use think\Controller;
  4. use think\Db;
  5. use think\Session;
  6. use app\common\library\UUIDs;
  7. use think\Cache;
  8. use think\Log;
  9. use app\common\library\Verify;
  10. use think\File;
  11. use app\common\library\send_message;
  12. use app\common\library\Message;
  13. class Wechat extends Base {
  14. public function _initialize() {
  15. }
  16. public function wechatCallback() {
  17. // $param = $_REQUEST['param'];
  18. Log::record('微信支付回调');
  19. Log::record($this->request->param());
  20. Log::record($this->request);
  21. Log::record(file_get_contents("php://input"));
  22. Log::record('微信支付回调');
  23. // $order_id = $param['order_id'];
  24. // $remote_order = DB::table('remote_order')->where('id', $order_id)->find();
  25. // if(!$remote_order) {
  26. // return json_encode(['status'=>'fail','code'=>'3001','msg'=> "没有找到该订单"]);
  27. // }
  28. // if($remote_order !== Application::ORDER_STATUS['CREATE']) {
  29. // return json_encode(['status'=>'fail','code'=>'3002','msg'=> "订单状态出错"]);
  30. // }
  31. // DB::table('remote_order')->where('id', $order_id)->update(["status" => Application::ORDER_STATUS['PAYCOMPLTET']]);
  32. // return json_encode(['status'=>'ok','code'=>'0000','msg'=> "支付回调成功"]);
  33. }
  34. }