feat(PayNotifyLogic): 修改支付通知逻辑,修复错误,优化代码,增加临时活动兑换券逻辑
This commit is contained in:
parent
c6bcec76fa
commit
e7a74c1b10
@ -389,14 +389,24 @@ class PayNotifyLogic extends BaseLogic
|
||||
public static function afterPay($order, $transaction_id = 0)
|
||||
{
|
||||
$financeLogic = new StoreFinanceFlowLogic();
|
||||
$user_sing = new UserSign();
|
||||
//-----临时活动更改
|
||||
$financeLogic->order = $order;
|
||||
$financeLogic->user = ['uid' => $order['uid']];
|
||||
$financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::USER_ORDER_PAY, $order['store_id'], $order['staff_id'], 0, $order['pay_type']); //用户订单支付
|
||||
$financeLogic->in($transaction_id, $order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], 0, 0, $order['pay_type']);
|
||||
$financeLogic->out($transaction_id,$order['pay_price'], OrderEnum::SUPPLIER_ORDER_OBTAINS, $order['store_id'], $order['staff_id'], 0, $order['pay_type']);
|
||||
$user_number = bcmul($order['pay_price'], '0.10', 2);
|
||||
$sing = [
|
||||
'uid' => $order['uid'],
|
||||
'order_id' => $order['order_id'],
|
||||
'title' => '购买商品获得兑换券',
|
||||
'store_id' => $order['store_id'],
|
||||
'number' => $user_number,
|
||||
];
|
||||
$user_sing->save($sing);
|
||||
User::where('id', $order['uid'])->inc('integral', $user_number)->update();
|
||||
return false;
|
||||
$user_sing = new UserSign();
|
||||
$vipFen = 0;
|
||||
if ($order['uid'] > 0) {
|
||||
// 结算金额 要支付的钱减去冻结得钱去走后面得逻辑 发得兑换券也要去减去
|
||||
|
Loading…
x
Reference in New Issue
Block a user