diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index 5896de4e4..10b196451 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -194,7 +194,7 @@ class OrderLogic extends BaseLogic $generator = new BarcodeGeneratorPNG(); $barcode = $generator->getBarcode($verify_code, $generator::TYPE_CODE_128); $findPath = '/image/barcode/'.time().'.png'; - $savePath = 'public'.$findPath; + $savePath = public_path().$findPath; file_put_contents($savePath, $barcode); $_order['verify_img'] = $findPath; Db::startTrans(); diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index e51603b15..98556c7c2 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -97,7 +97,7 @@ class PayNotifyLogic extends BaseLogic public static function purchase_funds($orderSn, $extra = []) { $order = StoreOrder::where('order_id', $orderSn)->findOrEmpty(); - $user = User::where('id', $extra['uid'])->find(); + $user = User::where('id', $order['uid'])->find(); if ($user['purchase_funds'] < $order['pay_price']) { throw new \Exception('采购款不足'); }