Browse Source

pay offcial name

zz 6 years ago
parent
commit
ced7b140fa
1 changed files with 10 additions and 0 deletions
  1. 10 0
      app/Http/Controllers/Wap/Pay/OrdersController.php

+ 10 - 0
app/Http/Controllers/Wap/Pay/OrdersController.php

@@ -1509,6 +1509,16 @@ class OrdersController extends Controller
         if (isset($res->nickname) && !empty($res->nickname)) {
             return $res->nickname;
         }
+        try{
+            $official = DB::table('official_accounts')
+                ->where('distribution_channel_id', $distribution_channel_id)
+                ->where('is_auth',1)
+                ->orderBy('id','desc')
+                ->select('nickname')->first();
+            if ($official && isset($official->nickname)) {
+                return $official->nickname;
+            }
+        }catch (\Exception $e){}
         return '';
     }