Wechat.php 1.2 KB

12345678910111213141516171819202122232425262728293031
  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 Application extends Base {
  14. public function wechatCallback() {
  15. $param = $_REQUEST['param'];
  16. Log::record('微信支付回调');
  17. Log::record($param);
  18. Log::record('微信支付回调');
  19. // $order_id = $param['order_id'];
  20. // $remote_order = DB::table('remote_order')->where('id', $order_id)->find();
  21. // if(!$remote_order) {
  22. // return json_encode(['status'=>'fail','code'=>'3001','msg'=> "没有找到该订单"]);
  23. // }
  24. // if($remote_order !== Application::ORDER_STATUS['CREATE']) {
  25. // return json_encode(['status'=>'fail','code'=>'3002','msg'=> "订单状态出错"]);
  26. // }
  27. // DB::table('remote_order')->where('id', $order_id)->update(["status" => Application::ORDER_STATUS['PAYCOMPLTET']]);
  28. // return json_encode(['status'=>'ok','code'=>'0000','msg'=> "支付回调成功"]);
  29. }
  30. }