diff --git a/app/controller/PayController.php b/app/controller/PayController.php index 81d4f43..67f6bdf 100644 --- a/app/controller/PayController.php +++ b/app/controller/PayController.php @@ -211,7 +211,7 @@ class PayController } } } - // 获取收款通知,提交收款订单明细 + // [定时任务]获取收款明细,提交收款通知[本地版] public function checkPayResult(Request $request) { $req_info = $request->get(); diff --git a/app/controller/api/PayManageController.php b/app/controller/api/PayManageController.php index 7f22810..d7ba26b 100644 --- a/app/controller/api/PayManageController.php +++ b/app/controller/api/PayManageController.php @@ -65,6 +65,10 @@ class PayManageController extends BaseController $info = $this->request->post(); $pid = $this->request->session('pid'); $info['pid'] = $pid; + $check_acc = PayAccount::where(['account' => $info['account'], 'pid' => $pid])->find(); + if ($check_acc) { + return \json(\backMsg(1, '账号已存在')); + } $acc = PayAccount::create($info); if ($acc) { $this->createAccountConfig($acc); diff --git a/app/model/Order.php b/app/model/Order.php index fede272..9512d2f 100644 --- a/app/model/Order.php +++ b/app/model/Order.php @@ -120,7 +120,7 @@ class Order extends BaseModel return []; } $patt = PayAccount::find($channel_info->account_id); - $channel = ['aid' => $channel_info->account_id, 'cid' => $channel_info->id, 'patt' => $patt->pattern]; + $channel = ['aid' => $channel_info->account_id, 'cid' => $channel_info->id, 'patt' => $patt->getData('pattern')]; PayChannel::update(['last_time' => self::getFormatTime(), 'id' => $channel['cid']]); return $channel; } diff --git a/config/payconfig/1001_39.php b/config/payconfig/1001_39.php deleted file mode 100644 index dd44926..0000000 --- a/config/payconfig/1001_39.php +++ /dev/null @@ -1,33 +0,0 @@ - [ - 'pid' => 1001, - 'key' => '7ImzF6Rf8OciQcmRJv8oTNBwIp6uqF0p' - ], - // 收款平台账号配置 - 'pay' => [ - // 账号id - 'aid' => 39, - // 收款平台 - 'platform' => 'sqbpay', - // 账号 - 'account' => '18727623516', - // 密码 - 'password' => '123456', - // 订单查询参数配置 - 'query' => array ( - 'date_end' => NULL, - 'date_start' => NULL, - 'page' => 1, - 'page_size' => 10, - 'upayQueryType' => 0, - 'status' => '2000', - 'store_sn' => '', - 'type' => '30', -), - ] -]; diff --git a/config/payconfig/1001_40.php b/config/payconfig/1001_40.php deleted file mode 100644 index a5bc813..0000000 --- a/config/payconfig/1001_40.php +++ /dev/null @@ -1,39 +0,0 @@ - [ - 'pid' => 1001, - 'key' => '953c4d682d9ab148277b76a06e215ce7' - ], - // 收款平台账号配置 - 'pay' => [ - // 账号id - 'aid' => 40, - // 收款平台 - 'platform' => 'mqpay', - // 收款平台 - 'payclass' => 'MaQian', - // 账号 - 'account' => '18657945333', - // 密码 - 'password' => 'Aa12345678', - // 订单查询参数配置 - 'query' => array ( - 'terminalType' => '', - 'payType' => '', - 'payMode' => '', - 'tradeStatus' => '1', - 'tradeNo' => '', - 'storeId' => '', - 'page' => 1, - 'rows' => 10, - 'endDate' => NULL, - 'endTime' => NULL, - 'startDate' => NULL, - 'startTime' => NULL, -), - ] -]; diff --git a/extend/MpayClass.php b/extend/MpayClass.php index 01314fe..793b373 100644 --- a/extend/MpayClass.php +++ b/extend/MpayClass.php @@ -4,15 +4,15 @@ class MpayClass { private $pid; private $key; - private $host = env('WEB_HOST', 'http://localhost'); + private $host = 'https://mpay.zhaidashi.cn/'; private $check_neworder_url; private $submit_records_url; function __construct($config) { $this->pid = $config['pid']; $this->key = $config['key']; - $this->check_neworder_url = $this->host . '/order.php'; - $this->submit_records_url = $this->host . '/payHeart'; + $this->check_neworder_url = $this->host . 'order.php'; + $this->submit_records_url = $this->host . 'payHeart'; } // 查询新订单 public function orderHeart() diff --git a/mpay01.zip b/mpay01.zip new file mode 100644 index 0000000..c542a99 Binary files /dev/null and b/mpay01.zip differ diff --git a/runtime/order.json b/runtime/order.json index d50c472..51b4235 100644 --- a/runtime/order.json +++ b/runtime/order.json @@ -1 +1 @@ -{"code":1,"msg":"\u67091\u4e2a\u65b0\u8ba2\u5355","orders":[{"id":27409,"pid":1001,"aid":30,"cid":31,"patt":0}]} \ No newline at end of file +{"code":0,"msg":"没有新订单"} \ No newline at end of file