rabin vor 2 Jahren
Ursprung
Commit
66d37cd82d
1 geänderte Dateien mit 13 neuen und 0 gelöschten Zeilen
  1. 13 0
      app/shop/src/Yspay.php

+ 13 - 0
app/shop/src/Yspay.php

@@ -89,6 +89,19 @@ bfdc6069eaeb89ec0c4295f5230c13820a578f13ef0086d15a720ea2712ff2040f3ae09a8d3b8f12
 
         if (!$order) {
             echo 'FAILED';die;
+        }
+        if (strstr($order, 'SD')) {
+             $log = Dever::db('shop/yspay_tixian_log')->one(array('order_num' => $order));
+
+             if ($log) {
+                Dever::db('shop/yspay_tixian_log')->update(array('where_id' => $log['id'], 'status' => 2, 'response' => Dever::json_encode($content)));
+
+                $account = Dever::db('shop/yspay_account')->one(array('shop_id' => $log['shop_id']));
+                if ($account) {
+                    Dever::db('shop/yspay_account')->dec(array('where_id' => $account['id'], 'set_cash' => $log['cash']));
+                }
+            }
+            echo 'SUCCESS';die;
         }
 		$where['order_num'] = $order;
 		$order = Dever::db('shop/sell_order')->find($where);