本文整理汇总了PHP中SC_Helper_Customer_Ex类的典型用法代码示例。如果您正苦于以下问题:PHP SC_Helper_Customer_Ex类的具体用法?PHP SC_Helper_Customer_Ex怎么用?PHP SC_Helper_Customer_Ex使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SC_Helper_Customer_Ex类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action
/**
* Page のアクション.
*
* @return void
*/
function action()
{
parent::action();
$objQuery = SC_Query_Ex::getSingletonInstance();
if (is_array($this->arrHidden['search_customer_type'])) {
$cnt = array_sum($this->arrHidden['search_customer_type']);
// tpl表示切換用
$this->search_customer_type = $cnt;
} elseif (is_array($this->arrForm['search_customer_type']['value'])) {
$cnt = array_sum($this->arrForm['search_customer_type']['value']);
// tpl表示切換用
$this->search_customer_type = $cnt;
} else {
$this->search_customer_type = 1;
}
if (is_array($this->arrData)) {
foreach ($this->arrData as &$customer) {
$customer_id = $customer["customer_id"];
if ($this->objDb->sfColumnExists("cp_dtb_customer_docomo_mymenu", "customer_id")) {
$customer = array_merge(SC_Helper_Customer_Ex::sfGetCustomerData($customer_id), $customer);
$customer["mymenu"] = call_user_func("CarrierPay::getCustomerMymenu", array($customer_id));
}
if ($this->objDb->sfColumnExists("cp_dtb_point_history", "id")) {
$point = $objQuery->getRow(implode(",", array("sum(add_point ) AS add_point", "sum(use_point ) AS use_point", "sum(lost_point) AS lost_point")), "cp_dtb_point_history", "customer_id = ?", array($customer_id));
foreach ($point as $key => $value) {
$customer[$key] = $value;
}
}
if ($this->objDb->sfColumnExists("cp_dtb_customer_transaction", "id")) {
$customer["transaction"] = $objQuery->select("*", "cp_dtb_customer_transaction", "customer_id = ? AND del_flg = 0 AND continue_account_id IS NOT NULL", array($customer_id));
}
}
}
}
示例2: CHECK_REGIST_CUSTOMER_EMAIL
/**
* CHECK_REGIST_CUSTOMER_EMAIL
*
* メールアドレスが会員登録されているか調べる
* @param array $value value[0] = 項目名 value[1] = 判定対象メールアドレス
* @access public
* @return void
*/
function CHECK_REGIST_CUSTOMER_EMAIL($value)
{
if (isset($this->arrErr[$value[1]])) {
return;
}
$this->createParam($value);
$register_user_flg = SC_Helper_Customer_Ex::sfCheckRegisterUserFromEmail($this->arrParam[$value[1]]);
switch ($register_user_flg) {
case 1:
$this->arrErr[$value[1]] .= t('c_* T_ARG1 already used in member registration. <br />_01', array('T_ARG1' => $value[0]));
break;
case 2:
$this->arrErr[$value[1]] .= t('c_* For a certain period of time after membership withdrawal, it is not possible to use the same T_ARG1. <br />_01', array('T_ARG1' => $value[0]));
break;
default:
break;
}
}
示例3: setOrderToFormParam
/**
* 受注データを取得して, SC_FormParam へ設定する.
*
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @param integer $order_id 取得元の受注ID
* @return void
*/
function setOrderToFormParam(&$objFormParam, $order_id)
{
$objPurchase = new SC_Helper_Purchase_Ex();
// 受注詳細を設定
$arrOrderDetail = $objPurchase->getOrderDetail($order_id, false);
$objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrOrderDetail));
$arrShippingsTmp = $objPurchase->getShippings($order_id);
$arrShippings = array();
foreach ($arrShippingsTmp as $row) {
// お届け日の処理
if (!SC_Utils_Ex::isBlank($row['shipping_date'])) {
$ts = strtotime($row['shipping_date']);
$row['shipping_date_year'] = date('Y', $ts);
$row['shipping_date_month'] = date('n', $ts);
$row['shipping_date_day'] = date('j', $ts);
}
$arrShippings[$row['shipping_id']] = $row;
}
$objFormParam->setValue('shipping_quantity', count($arrShippings));
$objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrShippings));
/*
* 配送商品を設定
*
* $arrShipmentItem['shipment_(key)'][$shipping_id][$item_index] = 値
* $arrProductQuantity[$shipping_id] = 配送先ごとの配送商品数量
*/
$arrProductQuantity = array();
$arrShipmentItem = array();
foreach ($arrShippings as $shipping_id => $arrShipping) {
$arrProductQuantity[$shipping_id] = count($arrShipping['shipment_item']);
foreach ($arrShipping['shipment_item'] as $item_index => $arrItem) {
foreach ($arrItem as $item_key => $item_val) {
$arrShipmentItem['shipment_' . $item_key][$shipping_id][$item_index] = $item_val;
}
}
}
$objFormParam->setValue('shipping_product_quantity', $arrProductQuantity);
$objFormParam->setParam($arrShipmentItem);
/*
* 受注情報を設定
* $arrOrderDetail と項目が重複しており, $arrOrderDetail は連想配列の値
* が渡ってくるため, $arrOrder で上書きする.
*/
$arrOrder = $objPurchase->getOrder($order_id);
$objFormParam->setParam($arrOrder);
// ポイントを設定
list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint($order_id, $arrOrder['use_point'], $arrOrder['add_point'], $arrOrder['status']);
$objFormParam->setValue('total_point', $db_point);
$objFormParam->setValue('point', $rollback_point);
if (!SC_Utils_Ex::isBlank($objFormParam->getValue('customer_id'))) {
$arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($objFormParam->getValue('customer_id'));
$objFormParam->setValue('customer_point', $arrCustomer['point']);
}
}
示例4: lfDoSearch
/**
* 会員一覧を検索する処理
*
* @param array $arrParam 検索パラメーター連想配列
* @return array( integer 全体件数, mixed 会員データ一覧配列, mixed SC_PageNaviオブジェクト)
*/
public function lfDoSearch($arrParam)
{
return SC_Helper_Customer_Ex::sfGetSearchData($arrParam);
}
示例5: sfSendRegistMail
/**
* 登録メールを送信する。
*
* @param string $secret_key 会員固有キー
* @param integer $customer_id 顧客ID
* @param boolean $is_mobile false(default):PCアドレスにメールを送る true:携帯アドレスにメールを送る
* @return boolean true:成功 false:失敗
*/
function sfSendRegistMail($secret_key, $customer_id = '', $is_mobile = false)
{
// 会員データの取得
if (SC_Utils_Ex::sfIsInt($customer_id)) {
$arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
} else {
$arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId('', "secret_key = ?", array($secret_key));
}
if (SC_Utils_Ex::isBlank($arrCustomerData)) {
return false;
}
$CONF = SC_Helper_DB_Ex::sfGetBasisData();
$objMailText = new SC_SiteView_Ex();
$objMailText->assign('CONF', $CONF);
$objMailText->assign("name01", $arrCustomerData['name01']);
$objMailText->assign("name02", $arrCustomerData['name02']);
$objMailText->assign('uniqid', $arrCustomerData['secret_key']);
$objMailText->assignobj($arrCustomerData);
$objMailText->assignobj($this);
$objHelperMail = new SC_Helper_Mail_Ex();
// 仮会員が有効の場合
if (CUSTOMER_CONFIRM_MAIL == true and $arrCustomerData['status'] == 1) {
$subject = $objHelperMail->sfMakeSubject('会員登録のご確認', $objMailText);
$toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
} else {
$subject = $objHelperMail->sfMakeSubject('会員登録のご完了', $objMailText);
$toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl");
}
$objMail = new SC_SendMail();
$objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
// 宛先の設定
if ($is_mobile) {
$to_addr = $arrCustomerData["email_mobile"];
} else {
$to_addr = $arrCustomerData['email'];
}
$objMail->setTo($to_addr, $arrCustomerData["name01"] . $arrCustomerData["name02"] . " 様");
$objMail->sendMail();
return true;
}
示例6: lfRegistCustomerData
/**
* 会員情報を登録する
*
* @param mixed $objFormParam
* @param mixed $customer_id
* @access private
* @return void
*/
function lfRegistCustomerData(&$objFormParam, $customer_id)
{
$arrRet = $objFormParam->getHashArray();
$sqlval = $objFormParam->getDbArray();
$sqlval['birth'] = SC_Utils_Ex::sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']);
SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $customer_id);
}
示例7: setCustomerTo
/**
* 会員情報をフォームに設定する.
*
* @param integer $customer_id 会員ID
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @return void
*/
function setCustomerTo($customer_id, &$objFormParam)
{
$arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
foreach ($arrCustomer as $key => $val) {
$objFormParam->setValue('order_' . $key, $val);
}
$objFormParam->setValue('customer_id', $customer_id);
$objFormParam->setValue('customer_point', $arrCustomer['point']);
}
示例8: lfCheckForgotSecret
/**
* 秘密の質問確認
*
* @param array $arrForm フォーム入力値
* @param array $arrReminder リマインダー質問リスト
* @return string エラー文字列 問題が無ければNULL
*/
function lfCheckForgotSecret(&$arrForm, &$arrReminder)
{
$errmsg = '';
$objQuery =& SC_Query_Ex::getSingletonInstance();
$cols = 'customer_id, reminder, reminder_answer, salt';
$table = 'dtb_customer';
$where = '(email Like ? OR email_mobile Like ?)' . ' AND name01 Like ? AND name02 Like ?' . ' AND status = 2 AND del_flg = 0';
$arrVal = array($arrForm['email'], $arrForm['email'], $arrForm['name01'], $arrForm['name02']);
$result = $objQuery->select($cols, $table, $where, $arrVal);
if (isset($result[0]['reminder']) and isset($arrReminder[$result[0]['reminder']]) and $result[0]['reminder'] == $arrForm['reminder']) {
$is_authorized = false;
if (empty($result[0]['salt'])) {
// 旧バージョン(2.11未満)からの移行を考慮
if ($result[0]['reminder_answer'] == $arrForm['reminder_answer']) {
$is_authorized = true;
}
} elseif (SC_Utils_Ex::sfIsMatchHashPassword($arrForm['reminder_answer'], $result[0]['reminder_answer'], $result[0]['salt'])) {
$is_authorized = true;
}
if ($is_authorized) {
// 秘密の答えが一致
// 新しいパスワードを設定する
$new_password = GC_Utils_Ex::gfMakePassword(8);
if (FORGOT_MAIL == 1) {
// メールで変更通知をする
$objDb = new SC_Helper_DB_Ex();
$CONF = $objDb->sfGetBasisData();
$this->lfSendMail($CONF, $arrForm['email'], $arrForm['name01'], $new_password);
}
$sqlval = array();
$sqlval['password'] = $new_password;
SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $result[0]['customer_id']);
$arrForm['new_password'] = $new_password;
} else {
// 秘密の答えが一致しなかった
$errmsg = '秘密の質問が一致しませんでした。';
}
} else {
//不正なアクセス リマインダー値が前画面と異なる。
// 新リファクタリング基準ではここで遷移は不許可なのでエラー表示
//SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
$errmsg = '秘密の質問が一致しませんでした。';
}
return $errmsg;
}
示例9: sfCustomerMypageErrorCheck
/**
* 会員情報変更エラーチェック
*
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @param boolean $isAdmin 管理画面チェック時:true
* @access public
* @return array エラーの配列
*/
function sfCustomerMypageErrorCheck(&$objFormParam, $isAdmin = false)
{
$objFormParam->toLower('email_mobile');
$objFormParam->toLower('email_mobile02');
$objErr = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck($objFormParam);
$objErr = SC_Helper_Customer_Ex::sfCustomerRegisterErrorCheck($objErr, $isAdmin);
if (isset($objErr->arrErr['password']) && $objFormParam->getValue('password') == DEFAULT_PASSWORD) {
unset($objErr->arrErr['password']);
unset($objErr->arrErr['password02']);
}
if (isset($objErr->arrErr['reminder_answer']) && $objFormParam->getValue('reminder_answer') == DEFAULT_PASSWORD) {
unset($objErr->arrErr['reminder_answer']);
}
return $objErr->arrErr;
}
示例10: action
/**
* Page のプロセス.
*
* @return void
*/
function action()
{
$objSiteSess = new SC_SiteSession_Ex();
$objCartSess = new SC_CartSession_Ex();
$objCustomer = new SC_Customer_Ex();
$objCookie = new SC_Cookie_Ex();
$objPurchase = new SC_Helper_Purchase_Ex();
$objFormParam = new SC_FormParam_Ex();
$nonmember_mainpage = 'shopping/nonmember_input.tpl';
$nonmember_title = 'お客様情報入力';
$this->tpl_uniqid = $objSiteSess->getUniqId();
$objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
$this->cartKey = $objCartSess->getKey();
// ログイン済みの場合は次画面に遷移
if ($objCustomer->isLoginSuccess(true)) {
SC_Response_Ex::sendRedirect($this->getNextlocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess));
SC_Response_Ex::actionExit();
} else {
if ($this->cartKey == PRODUCT_TYPE_DOWNLOAD) {
$msg = 'ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>' . 'お手数ですが、会員登録をお願いします。';
SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, $msg);
SC_Response_Ex::actionExit();
}
}
switch ($this->getMode()) {
// ログイン実行
case 'login':
$this->lfInitLoginFormParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->trimParam();
$objFormParam->convParam();
$objFormParam->toLower('login_email');
$this->arrErr = $objFormParam->checkError();
// ログイン判定
if (SC_Utils_Ex::isBlank($this->arrErr) && $objCustomer->doLogin($objFormParam->getValue('login_email'), $objFormParam->getValue('login_pass'))) {
// モバイルサイトで携帯アドレスの登録が無い場合、携帯アドレス登録ページへ遷移
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
if (!$objCustomer->hasValue('email_mobile')) {
SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');
SC_Response_Ex::actionExit();
}
} elseif (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo SC_Utils_Ex::jsonEncode(array('success' => $this->getNextLocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess)));
SC_Response_Ex::actionExit();
}
SC_Response_Ex::sendRedirect($this->getNextLocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess));
SC_Response_Ex::actionExit();
} else {
// 仮登録の場合
if (SC_Helper_Customer_Ex::checkTempCustomer($objFormParam->getValue('login_email'))) {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
} else {
SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
SC_Response_Ex::actionExit();
}
} else {
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(SITE_LOGIN_ERROR);
SC_Response_Ex::actionExit();
} else {
SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
SC_Response_Ex::actionExit();
}
}
}
break;
// お客様情報登録
// お客様情報登録
case 'nonmember_confirm':
$this->tpl_mainpage = $nonmember_mainpage;
$this->tpl_title = $nonmember_title;
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $this->lfCheckError($objFormParam);
if (SC_Utils_Ex::isBlank($this->arrErr)) {
$this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam);
$arrParams = $objFormParam->getHashArray();
$shipping_id = $arrParams['deliv_check'] == '1' ? 1 : 0;
$objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id);
$objSiteSess->setRegistFlag();
SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
SC_Response_Ex::actionExit();
}
break;
// 前のページに戻る
// 前のページに戻る
case 'return':
SC_Response_Ex::sendRedirect(CART_URLPATH);
SC_Response_Ex::actionExit();
break;
// 複数配送ページへ遷移
// 複数配送ページへ遷移
case 'multiple':
//.........这里部分代码省略.........
示例11: action
/**
* Page のAction.
*
* @return void
*/
function action()
{
$objCustomer = new SC_Customer_Ex();
$ParentPage = MYPAGE_DELIVADDR_URLPATH;
// GETでページを指定されている場合には指定ページに戻す
if (isset($_GET['page'])) {
$ParentPage = htmlspecialchars($_GET['page'], ENT_QUOTES);
} else {
if (isset($_POST['ParentPage'])) {
$ParentPage = htmlspecialchars($_POST['ParentPage'], ENT_QUOTES);
}
}
$this->ParentPage = $ParentPage;
/*
* ログイン判定 及び 退会判定
* 未ログインでも, 複数配送設定ページからのアクセスの場合は表示する
*
* TODO 購入遷移とMyPageで別クラスにすべき
*/
if (!$objCustomer->isLoginSuccess(true) && $ParentPage != MULTIPLE_URLPATH) {
$this->tpl_onload = "fnUpdateParent('" . $this->getLocation($_POST['ParentPage']) . "'); window.close();";
}
// other_deliv_id のあるなしで追加か編集か判定しているらしい
$_SESSION['other_deliv_id'] = $_REQUEST['other_deliv_id'];
// パラメーター管理クラス,パラメーター情報の初期化
$objFormParam = new SC_FormParam_Ex();
SC_Helper_Customer_Ex::sfCustomerOtherDelivParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrForm = $objFormParam->getHashArray();
switch ($this->getMode()) {
// 入力は必ずedit
case 'edit':
$this->arrErr = SC_Helper_Customer_Ex::sfCustomerOtherDelivErrorCheck($objFormParam);
// 入力エラーなし
if (empty($this->arrErr)) {
// TODO ここでやるべきではない
if (in_array($_POST['ParentPage'], $this->validUrl)) {
$this->tpl_onload = "fnUpdateParent('" . $this->getLocation($_POST['ParentPage']) . "'); window.close();";
} else {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
if ($objCustomer->isLoginSuccess(true)) {
$this->lfRegistData($objFormParam, $objCustomer->getValue("customer_id"));
} else {
$this->lfRegistDataNonMember($objFormParam);
}
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
// モバイルの場合、元のページに遷移
SC_Response_Ex::sendRedirect($this->getLocation($_POST['ParentPage']));
exit;
}
}
break;
case 'multiple':
// 複数配送先用
break;
default:
if ($_GET['other_deliv_id'] != "") {
$arrOtherDeliv = $this->lfGetOtherDeliv($objCustomer->getValue("customer_id"), $_SESSION['other_deliv_id']);
//不正アクセス判定
if (!$objCustomer->isLoginSuccess(true) || count($arrOtherDeliv) == 0) {
SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
}
//別のお届け先情報取得
$this->arrForm = $arrOtherDeliv[0];
}
break;
}
if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
$this->tpl_mainpage = 'mypage/delivery_addr.tpl';
} else {
$this->setTemplate('mypage/delivery_addr.tpl');
}
}
示例12: lfSendRefusalMail
/**
* 退会手続き完了メール送信する
*
* @access private
* @param integer $customer_id 会員ID
* @return void
*/
public function lfSendRefusalMail($customer_id)
{
// 会員データの取得
if (SC_Utils_Ex::sfIsInt($customer_id)) {
$arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
}
if (SC_Utils_Ex::isBlank($arrCustomerData)) {
return false;
}
$CONF = SC_Helper_DB_Ex::sfGetBasisData();
$objMailText = new SC_SiteView_Ex();
$objMailText->setPage($this);
$objMailText->assign('CONF', $CONF);
$objMailText->assign('name01', $arrCustomerData['name01']);
$objMailText->assign('name02', $arrCustomerData['name02']);
$objMailText->assignobj($this);
$objHelperMail = new SC_Helper_Mail_Ex();
$objHelperMail->setPage($this);
$subject = $objHelperMail->sfMakeSubject('退会手続きのご完了', $objMailText);
$toCustomerMail = $objMailText->fetch('mail_templates/customer_refusal_mail.tpl');
$objMail = new SC_SendMail_Ex();
$objMail->setItem('', $subject, $toCustomerMail, $CONF['email03'], $CONF['shop_name'], $CONF['email03'], $CONF['email04'], $CONF['email04'], $CONF['email01']);
$objMail->setTo($arrCustomerData['email'], $arrCustomerData['name01'] . $arrCustomerData['name02'] . ' 様');
$objMail->sendMail();
}
示例13: lfGetOrderData
function lfGetOrderData($order_id)
{
if (SC_Utils_Ex::sfIsInt($order_id)) {
// DBから受注情報を読み込む
$objQuery = new SC_Query_Ex();
$where = "order_id = ?";
$arrRet = $objQuery->select("*", "dtb_order", $where, array($order_id));
$this->arrDisp = $arrRet[0];
list($point) = SC_Helper_Customer_Ex::sfGetCustomerPoint($order_id, $arrRet[0]['use_point'], $arrRet[0]['add_point']);
$this->arrDisp['point'] = $point;
// 受注詳細データの取得
$arrRet = $this->lfGetOrderDetail($order_id);
$arrRet = SC_Utils_Ex::sfSwapArray($arrRet);
$this->arrDisp = array_merge($this->arrDisp, $arrRet);
// その他支払い情報を表示
if ($this->arrDisp["memo02"] != "") {
$this->arrDisp["payment_info"] = unserialize($this->arrDisp["memo02"]);
}
$this->arrDisp["payment_type"] = "お支払い";
}
}
示例14: lfCheckError
/**
* 入力内容のチェックを行う.
*
* 追加の必須チェック, 相関チェックを行うため, SC_CheckError を使用する.
*
* @param SC_FormParam $objFormParam SC_FormParam インスタンス
* @return array エラー情報の配
*/
public function lfCheckError(&$objFormParam)
{
$arrParams = $objFormParam->getHashArray();
$objErr = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck($objFormParam, 'order_');
// 別のお届け先チェック
if (isset($arrParams['deliv_check']) && $arrParams['deliv_check'] == '1') {
$objErr2 = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck($objFormParam, 'shipping_');
$objErr->arrErr = array_merge((array) $objErr->arrErr, (array) $objErr2->arrErr);
} else {
// shipping系のエラーは無視
foreach ($objErr->arrErr as $key => $val) {
if (substr($key, 0, strlen('shipping_')) == 'shipping_') {
unset($objErr->arrErr[$key]);
}
}
}
// 複数項目チェック
$objErr->doFunc(array('生年月日', 'order_year', 'order_month', 'order_day'), array('CHECK_BIRTHDAY'));
$objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', 'order_email', 'order_email02'), array('EQUAL_CHECK'));
return $objErr->arrErr;
}
示例15: doContBillResult
/**
*
* @deprecated 重複決済される
* @param unknown $accountDay
*/
function doContBillResult($accountDay)
{
if ($accountDay == null) {
$accountDay = $this->getAccountDay();
}
$objQuery = SC_Query_Ex::getSingletonInstance();
$curl = $this->curl_init();
do {
$zip_file = CSV_TEMP_REALDIR . "auone/" . date("Y/m/d/His") . ".zip";
if (file_exists($zip_file)) {
sleep(5);
}
} while (file_exists($zip_file));
SC_Utils_Ex::recursiveMkdir(dirname($zip_file));
$fp = fopen($zip_file, "w");
// FIXME 決済認可
$curl = $this->curl_init(false, true);
// $post_history = array ();
$post = $this->getPost("ContBillResult", $this->config, compact("accountDay"));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($curl, CURLOPT_HEADER, FALSE);
curl_setopt($curl, CURLOPT_FILE, $fp);
curl_exec($curl);
$zip = new ZipArchive();
if (!$zip->open($zip_file)) {
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
}
$extr = dirname($zip_file) . "/" . basename($zip_file, ".zip") . "/";
SC_Utils_Ex::recursiveMkdir($extr);
if (!$zip->extractTo($extr)) {
SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
}
$files = glob($extr . "*.csv");
foreach ($files as $file) {
$enc_filepath = SC_Utils_Ex::sfEncodeFile($file, CHAR_CODE, dirname($file) . DIRECTORY_SEPARATOR);
$fp2 = fopen($enc_filepath, "r");
fgetcsv($fp2);
while ($arrCsv = fgetcsv($fp2)) {
if (count($arrCsv) == 0) {
// 空の列
continue;
}
if ($arrCsv[4] != $this->config["serviceId"]) {
// 別サービス・チェック
continue;
}
if ($arrCsv[8] != 'MPL01000') {
// 取消レコード
continue;
}
$pay_info_no = $arrCsv[1];
$amount_in_tax = $arrCsv[2];
$service_id = $arrCsv[4];
$au_open_id = $arrCsv[5];
$member_manage_no = $arrCsv[6];
$process_day = $arrCsv[11];
$cont_bill_regst_day = $arrCsv[13];
$continue_account_id = $arrCsv[19];
$amount = $amount_in_tax - $amount_in_tax % 100;
$add_point = $amount;
$where = "au_open_id =? AND status = 2 AND del_flg = 0";
$arrWhereVal = (array) $au_open_id;
$customer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId(null, $where, $arrWhereVal);
if (SC_Utils_Ex::isBlank($customer)) {
// ユーザー復旧は手動の方がいいかもしれない。
continue;
}
$name = "継続(" . $amount_in_tax . "円)";
$customer_id = $customer["customer_id"];
if ($add_point) {
$lost_point = 0;
// 更新後ポイント
$updatePoint = array("point" => min($customer["point"] + $add_point, AU_MAXPOINT));
// 最大ポイントへ変更している場合は失効ポイントを計算
if ($updatePoint["point"] == AU_MAXPOINT) {
$lost_point = max($customer["point"] + $add_point, AU_MAXPOINT) - AU_MAXPOINT;
}
SC_Helper_Customer_Ex::sfEditCustomerData($updatePoint, $customer_id);
$objQuery->insert("cp_dtb_point_history", array("id" => $objQuery->nextVal("cp_dtb_point_history_id"), "customer_id" => $customer_id, "add_point" => $add_point, "use_point" => 0, "lost_point" => $lost_point, "order_id" => 0, "name" => $name, "create_date" => "NOW()", "update_date" => "NOW()"));
$arrWhereVal[] = $continue_account_id;
if ($objQuery->exists("cp_dtb_customer_transaction", "au_open_id=? AND del_flg=0 AND continue_account_id =?", $arrWhereVal)) {
// 何かしらの影響で削除された場合後続処理を行う
continue;
}
$objQuery->insert("cp_dtb_customer_transaction", array("id" => $objQuery->nextVal("cp_dtb_customer_transaction_id"), "customer_id" => $customer_id, "au_open_id" => $au_open_id, "transaction_id" => "", "transaction_status" => "40", "pay_info_no" => $pay_info_no, "pay_status" => 20, "continue_account_id" => $continue_account_id, "member_manage_no" => $member_manage_no, "process_day" => $process_day, "process_time" => "000000", "cont_bill_regst_day" => $cont_bill_regst_day, "cont_bill_regst_time" => "000000", "ammount" => $amount, "ammount_in_tax" => $amount_in_tax, "del_flg" => 0, "contents_id" => sprintf("%05d%09d", $service_id, $add_point), "status" => 0));
}
}
}
}