feat: 优化支付通知逻辑并添加成功支付推送通知
This commit is contained in:
parent
040891bd22
commit
d3f90f03af
@ -41,14 +41,6 @@ class PayNotifyLogic extends BaseLogic
|
||||
{
|
||||
Db::startTrans();
|
||||
try {
|
||||
if ($action != 'cash_pay' && $action != 'balancePay' && $action != 'purchase_funds' && $action != 'gift_pay') {
|
||||
$payNotifyLogLogic = new PayNotifyLogLogic();
|
||||
if ($action == 'refund') {
|
||||
$payNotifyLogLogic->insert($action, $extra, PayNotifyLog::TYPE_REFUND);
|
||||
} else {
|
||||
$payNotifyLogLogic->insert($action, $extra);
|
||||
}
|
||||
}
|
||||
self::$action($orderSn, $extra, $type);
|
||||
Db::commit();
|
||||
return true;
|
||||
@ -428,11 +420,11 @@ class PayNotifyLogic extends BaseLogic
|
||||
$user->total_recharge_amount = bcadd($user->total_recharge_amount, $price, 2);
|
||||
$user->save();
|
||||
|
||||
PushService::push('wechat_mmp_' . $uid, $uid, ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
||||
|
||||
if (!empty($extra['payer']['openid'])) {
|
||||
Redis::send('push-delivery', ['order_id' => $order['order_id'], 'openid' => $extra['payer']['openid'], 'logistics_type' => 3], 4);
|
||||
}
|
||||
PushService::push('wechat_mmp_' . $order['uid'], $order['uid'], ['type'=>'INDUSTRYMEMBERS','msg'=>'订单支付成功','data'=>['id'=>$order['id'],'paid'=>1]]);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user