public function addAmountBll($propSpreadId, $addon_amount = 0, $account = 0, $addon_sn = 0, $propId = 0, $planVersion) { $addon_amount_zf = $addon_amount / 100; $propSpread = APF::get_instance()->get_config("propSpread2", "app"); $apporderbll = new BLL_Payment_AppOrder($propSpread['paycenter_id'], $propSpread['paycenter_key'], 0); if ($addon_sn) { $note = "推广房源" . $propId . "(房源编号)追加冻结金额"; } else { $note = "推广房源" . $propId . "(房源编号)冻结金额"; } $requestid = $propId . "_" . $planVersion; //防止并发 $serial_number = $apporderbll->freezeAccount($account, $addon_amount_zf, $addon_sn, $note, $requestid); return $serial_number; }
public function isOtherPayMobile($mobile = 0, $brokerId = 0) { $rstUserCard = $this->dao->getUserByMobile($mobile); if (isset($rstUserCard) && !empty($rstUserCard)) { apf_require_class("BLL_Payment_AppOrder"); $propSpread = APF::get_instance()->get_config("propSpread", "app"); $apporderbll = new BLL_Payment_AppOrder($propSpread['paycenter_id'], $propSpread['paycenter_key'], 0); $accountid = $apporderbll->getAccountIdBll($rstUserCard['UserId']); $balance = $apporderbll->checkMoneyBll($accountid, true, 1); if (($rstUserCard['PayType'] > 1 || floatval($balance) > 0) && $rstUserCard['BrokerId'] != $brokerId) { return 1; } elseif ($rstUserCard['BrokerId'] != $brokerId) { return 2; } else { return 0; } } else { return 0; } }
/** * 获取账户余额 * @return bool|float|int */ public static function getAccountBalance() { $apf = APF::get_instance(); $request = $apf->get_request(); $userID = $request->getUserId(); $propSpread = $apf->get_config("propSpread", "app"); apf_require_class("BLL_Payment_AppOrder"); $apporderbll = new BLL_Payment_AppOrder($propSpread['paycenter_id'], $propSpread['paycenter_key'], 0); $AccountID = $apporderbll->getAccountIdBll($userID); if ($AccountID) { $balanceTmp = $apporderbll->checkMoneyBll($AccountID, false, 0); $balance = $balanceTmp['balance']; $balance = floatval($balance) * 100; return $balance; } else { return 0; //账户中心数据获取失败,无账户ID返回 页面将404 } }