feat(PayNotifyLogic): 添加新功能,推送新订单信息至指定URL
This commit is contained in:
parent
eff3a9a2c6
commit
855c600f2b
@ -25,6 +25,7 @@ use app\common\model\user\UserAddress;
|
|||||||
use app\common\model\user\UserRecharge;
|
use app\common\model\user\UserRecharge;
|
||||||
use app\common\model\user\UserShip;
|
use app\common\model\user\UserShip;
|
||||||
use app\common\model\user_sign\UserSign;
|
use app\common\model\user_sign\UserSign;
|
||||||
|
use app\common\service\Curl;
|
||||||
use app\common\service\PushService;
|
use app\common\service\PushService;
|
||||||
use support\Log;
|
use support\Log;
|
||||||
use think\facade\Db;
|
use think\facade\Db;
|
||||||
@ -585,6 +586,19 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
$financeLogic = new StoreFinanceFlowLogic();
|
$financeLogic = new StoreFinanceFlowLogic();
|
||||||
$user_sing = new UserSign();
|
$user_sing = new UserSign();
|
||||||
$off_activity = Config::where('name', 'off_activity')->value('value');
|
$off_activity = Config::where('name', 'off_activity')->value('value');
|
||||||
|
try{
|
||||||
|
$url=getenv('WETCHA_PUSH');
|
||||||
|
if($url){
|
||||||
|
$order_id=$order['order_id'];
|
||||||
|
$pay_price=$order['pay_price'];
|
||||||
|
$arr=["msgtype"=>"markdown","markdown"=>["content"=> "有新的订单请及时跟踪\n
|
||||||
|
>单号:<font color=\"comment\">$order_id</font>
|
||||||
|
>金额:<font color=\"comment\">$pay_price</font>"]];
|
||||||
|
(new Curl())->post($url,$arr);
|
||||||
|
}
|
||||||
|
}catch(\Exception $e){
|
||||||
|
Log::error('推送订单失败',['order_id'=>$order['id'],'error'=>$e->getMessage()]);
|
||||||
|
}
|
||||||
if ($off_activity == 1) {
|
if ($off_activity == 1) {
|
||||||
//-----活动价结算更改
|
//-----活动价结算更改
|
||||||
$financeLogic->order = $order;
|
$financeLogic->order = $order;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user