dever 6 years ago
parent
commit
0e9a152ed4
2 changed files with 7 additions and 0 deletions
  1. 2 0
      config/base.php
  2. 5 0
      lib/Core.php

+ 2 - 0
config/base.php

@@ -18,6 +18,8 @@ $config['base'] = array
 			3 => '支付失败',
 		),
 	),
+
+	'pay_notify' => '',
 );
 
 return $config;

+ 5 - 0
lib/Core.php

@@ -21,6 +21,11 @@ class Core
 			}
 			$this->log($msg, $info);
 			$db->update($param);
+
+			$state = Dever::config('base', 'project')->pay_notify;
+			if ($state) {
+				Dever::load($state, $info['product_id'], $info['uid'], $order_id, $param['status'], $msg);
+			}
 		} else {
 			$this->log('支付失败', '错误的订单id:' . $order_id);
 		}