|
@@ -247,18 +247,18 @@ class Checkout extends Controller
|
|
|
$fromUserId = decrypt($key);
|
|
$fromUserId = decrypt($key);
|
|
|
if ($fromUserId && $fromUserId != $order['user_id']) {
|
|
if ($fromUserId && $fromUserId != $order['user_id']) {
|
|
|
$describe = "Giveaway after sharing";
|
|
$describe = "Giveaway after sharing";
|
|
|
- $payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_SHARE), 0));
|
|
|
|
|
- UserModel::setIncPoints(intval($fromUserId), $payPoints, $describe);
|
|
|
|
|
|
|
+ //$payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_SHARE), 0));
|
|
|
|
|
+ UserModel::setIncPoints(intval($fromUserId), UserAlias::POINTS_FOR_SHARE, $describe);
|
|
|
Cache::delete(UserModel::SHARE_PREFIX . $order['user_id']);
|
|
Cache::delete(UserModel::SHARE_PREFIX . $order['user_id']);
|
|
|
ShareKey::delKey($key);
|
|
ShareKey::delKey($key);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- //自己购买获得积分
|
|
|
|
|
- $describe = "Purchase goods to earn points.";
|
|
|
|
|
- UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ //自己购买获得积分
|
|
|
|
|
+ $describe = "Purchase goods to earn points.";
|
|
|
|
|
+ UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return view('paySuccessful', ['notice' => 'Payment Successful']);
|
|
return view('paySuccessful', ['notice' => 'Payment Successful']);
|