diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php
index 9b9a76d7b..a7aa59456 100644
--- a/app/common/logic/PayNotifyLogic.php
+++ b/app/common/logic/PayNotifyLogic.php
@@ -2,6 +2,7 @@
 
 namespace app\common\logic;
 
+use app\api\logic\order\OrderLogic;
 use app\common\enum\OrderEnum;
 use app\common\enum\PayEnum;
 use app\common\enum\user\UserShipEnum;
@@ -124,6 +125,15 @@ class PayNotifyLogic extends BaseLogic
             self::dealVipAmount($order, PayEnum::PURCHASE_FUNDS);
         }
 
+        if($extra && $extra['store_id']){
+            $params = [
+                'verify_code'=>$order['verify_code'],
+                'store_id'=>$extra['store_id'],
+                'staff_id'=>$extra['staff_id']
+            ];
+            OrderLogic::writeOff($params);
+        }
+
         // self::afterPay($order);
         // Redis::send('push-platform-print', ['id' => $order['id']], 60);
         // PushService::push('store_merchant_' . $order['store_id'], $order['store_id'], ['type' => 'store_merchant', 'msg' => '您有一笔新的订单']);
@@ -252,10 +262,10 @@ class PayNotifyLogic extends BaseLogic
         $order->paid = 1;
         $order->pay_time = time();
         $order->status = 2;
-        self::afterPay($order);
         if (!$order->save()) {
             throw new \Exception('订单保存出错');
         }
+        self::afterPay($order);
         $cashFlowLogic = new CashFlowLogic();
         $cashFlowLogic->insert($order['store_id'], $order['pay_price']);
         // Redis::send('push-platform-print', ['id' => $order['id']]);
diff --git a/app/store/controller/store_order/StoreOrderController.php b/app/store/controller/store_order/StoreOrderController.php
index 70d8173e4..e69c4f048 100644
--- a/app/store/controller/store_order/StoreOrderController.php
+++ b/app/store/controller/store_order/StoreOrderController.php
@@ -146,7 +146,10 @@ class StoreOrderController extends BaseAdminController
             switch ($pay_type) {
                 case PayEnum::PURCHASE_FUNDS:
                     //采购款支付
-                    PayNotifyLogic::handle('purchase_funds', $order['order_id'], ['uid' => $uid]);
+                    PayNotifyLogic::handle('purchase_funds', $order['order_id'], [
+                        'uid' => $uid,'store_id'=>$this->request->adminInfo['store_id'],
+                        'staff_id'=>$this->request->adminInfo['admin_id']
+                    ]);
                     return $this->success('采购款支付成功', ['id' => $order['id']]);
 
                 case PayEnum::CASH_PAY: