|
@@ -355,19 +355,22 @@ class WechatService
|
|
|
$wechatContext = WechatContext::create($data, true);
|
|
|
return true;
|
|
|
}
|
|
|
- @file_put_contents("quanju.txt", json_encode($notify)."-签约成功内容\r\n", 8);
|
|
|
+ @file_put_contents("quanju.txt", json_encode($notify)."-签约返回内容\r\n", 8);
|
|
|
if ($successful && isset($notify['plan_id'])) {
|
|
|
+ @file_put_contents("quanju.txt", $notify['plan_id']."-模版编号\r\n", 8);
|
|
|
if (isset($notify['change_type']) && $notify['change_type']) {
|
|
|
+ @file_put_contents("quanju.txt", $notify['change_type']."-签约返回状态\r\n", 8);
|
|
|
+ if ($notify['change_type']=='ADD'){
|
|
|
+ $cs=WechatPlanRecord::where('contract_code',$notify['contract_code'])->Update(['contract_id' => $notify['contract_id']]);
|
|
|
+ }elseif ($notify['change_type']=='DELETE'){
|
|
|
+ $cs=WechatPlanRecord::where('contract_code',$notify['contract_code'])->Update(['is_signing' => 1]);
|
|
|
+ }
|
|
|
+ @file_put_contents("quanju.txt", $notify['change_type']."-签约返回状态\r\n", 8);
|
|
|
if (($count = strpos($notify['contract_code'], '_')) !== false) {
|
|
|
$notify['contract_code'] = substr($notify['contract_code'], $count + 1);
|
|
|
}
|
|
|
$params = [$cid, $notify['contract_code']];
|
|
|
Hook::exec("\\liuniu\\repositories\\PaymentRepositories", "wechat" . ucfirst('lavesign'), $params);
|
|
|
- if ($notify['change_type']=='ADD'){
|
|
|
- WechatPlanRecord::where('contract_code',$notify['contract_code'])->where('cid',$cid)->Update(['contract_id' => $notify['contract_id']]);
|
|
|
- }elseif ($notify['change_type']=='DELETE'){
|
|
|
- WechatPlanRecord::where('contract_code',$notify['contract_code'])->where('cid',$cid)->Update(['is_signing' => 1]);
|
|
|
- }
|
|
|
}
|
|
|
$data = ['eventkey' => 'notify', 'command' => '', 'refreshtime' => time(), 'openid' => $notify['openid'], 'message' => json_encode($notify)];
|
|
|
$wechatContext = WechatContext::create($data, true);
|