• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP CSalePaySystemAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中CSalePaySystemAction的典型用法代码示例。如果您正苦于以下问题:PHP CSalePaySystemAction类的具体用法?PHP CSalePaySystemAction怎么用?PHP CSalePaySystemAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了CSalePaySystemAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_futubank_form

	protected function get_futubank_form() {
		return new FutubankForm(
			CSalePaySystemAction::GetParamValue('MERCHANT_ID'),
			CSalePaySystemAction::GetParamValue('SECRET_KEY'),
			CSalePaySystemAction::GetParamValue('IS_TEST') == 'Y'
		);
	}
开发者ID:ASDAFF,项目名称:bitrix-futupayments,代码行数:7,代码来源:result_rec.php


示例2: init

 function init()
 {
     $this->username = CSalePaySystemAction::GetParamValue("USER");
     $this->pwd = CSalePaySystemAction::GetParamValue("PWD");
     $this->signature = CSalePaySystemAction::GetParamValue("SIGNATURE");
     $this->currency = CSalePaySystemAction::GetParamValue("CURRENCY");
     $this->testMode = CSalePaySystemAction::GetParamValue("TEST") == "Y";
     if ($this->testMode) {
         $this->domain = "sandbox.";
     }
     if (strlen($_REQUEST["token"]) > 0) {
         $this->token = $_REQUEST["token"];
     }
     if (strlen($_REQUEST["PayerID"]) > 0) {
         $this->payerId = $_REQUEST["PayerID"];
     }
     $this->version = "98.0";
     $dbSite = CSite::GetByID(SITE_ID);
     $arSite = $dbSite->Fetch();
     $this->serverName = $arSite["SERVER_NAME"];
     if (strLen($this->serverName) <= 0) {
         if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
             $this->serverName = SITE_SERVER_NAME;
         } else {
             $this->serverName = COption::GetOptionString("main", "server_name", "www.bitrixsoft.com");
         }
     }
     $this->serverName = (CMain::IsHTTPS() ? "https" : "http") . "://" . $this->serverName;
     if (strlen($this->username) <= 0 || strlen($this->username) <= 0 || strlen($this->username) <= 0) {
         $GLOBALS["APPLICATION"]->ThrowException("CSalePaySystempaypal: init error", "CSalePaySystempaypal_init_error");
         return false;
     }
     return true;
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:34,代码来源:pre_payment.php


示例3: deletePaysysHandler

 protected function deletePaysysHandler()
 {
     $a_ps_act = explode("|", \Bitrix\Main\Config\Option::get($this->MODULE_ID, "pay_handler_ids"));
     if (!empty($a_ps_act)) {
         foreach ($a_ps_act as $id) {
             CSalePaySystemAction::Delete($id);
         }
     }
     return true;
 }
开发者ID:dimabresky,项目名称:bitrix-Erip-module,代码行数:10,代码来源:index.php


示例4: OnSaleCancelOrderHandler

 public static function OnSaleCancelOrderHandler($ID, $val) {
   if ( $val == 'Y' && self::$cancel ) {
     $arOrder = CSaleOrder::GetByID($ID);
     $resPaySystemAction = CSalePaySystemAction::GetList(array(), array('PAY_SYSTEM_ID'=>$arOrder['PAY_SYSTEM_ID'], 'PERSON_TYPE_ID'=>$arOrder['PERSON_TYPE_ID']), false, false, array());
     $arPaySystemAction = $resPaySystemAction->GetNext();
     $urlCancel = $_SERVER['DOCUMENT_ROOT'].$arPaySystemAction['ACTION_FILE'].'/cancel.php';
     if (preg_match('/\/alfabank$/', $arPaySystemAction['ACTION_FILE']) && file_exists($urlCancel)) {
       include $urlCancel;
     }
   }
 }
开发者ID:ASDAFF,项目名称:bitrix-2,代码行数:11,代码来源:handler.php


示例5: getValuesByPSAId

 /**
  * getByPaySystemId
  * returns saved tarif's values
  * @return array
  */
 protected static function getValuesByPSAId($psaId)
 {
     $arResult = array();
     if (isset(self::$arItems[$psaId])) {
         $arResult = self::$arItems[$psaId];
     } else {
         $psa = CSalePaySystemAction::GetByID($psaId);
         if (is_array($psa) && isset($psa['TARIF']) && is_array($psa['TARIF'])) {
             $arResult = self::$arItems[$psaId] = unserialize($psa['TARIF']);
         }
     }
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:pay_system_tarif.php


示例6: ensureQuotePaySystemsCreated

 public static function ensureQuotePaySystemsCreated()
 {
     if (!Loader::includeModule('sale')) {
         return;
     }
     $siteID = '';
     $languageID = '';
     $dbSites = \CSite::GetList($by = 'sort', $order = 'desc', array('DEFAULT' => 'Y', 'ACTIVE' => 'Y'));
     $defaultSite = is_object($dbSites) ? $dbSites->Fetch() : null;
     if (is_array($defaultSite)) {
         $siteID = $defaultSite['LID'];
         $languageID = $defaultSite['LANGUAGE_ID'];
     }
     if ($siteID === '') {
         $siteID = 's1';
     }
     if ($languageID === '') {
         $languageID = 'ru';
     }
     $paySysName = "quote_{$languageID}";
     $paySystems = array();
     $customPaySystemPath = \COption::GetOptionString('sale', 'path2user_ps_files', '');
     if ($customPaySystemPath === '') {
         $customPaySystemPath = BX_ROOT . '/php_interface/include/sale_payment/';
     }
     $personTypeIDs = \CCrmPaySystem::getPersonTypeIDs();
     if (isset($personTypeIDs['COMPANY'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'SORT' => 200, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['COMPANY'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_COMPANY', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'COMPANY_ADR'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FAX'), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'CONTACT_PERSON'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     if (isset($personTypeIDs['CONTACT'])) {
         $paySystems[] = array('NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'SORT' => 300, 'DESCRIPTION' => '', 'CODE_TEMP' => $paySysName, 'ACTION' => array(array('PERSON_TYPE_ID' => $personTypeIDs['CONTACT'], 'NAME' => Loc::getMessage('CRM_PS_QUOTE_CONTACT', null, $languageID), 'ACTION_FILE' => "{$customPaySystemPath}{$paySysName}", 'RESULT_FILE' => '', 'NEW_WINDOW' => 'Y', 'PARAMS' => serialize(array('DATE_INSERT' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_BILL_DATE'), 'DATE_PAY_BEFORE' => array('TYPE' => 'ORDER', 'VALUE' => 'DATE_PAY_BEFORE'), 'BUYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'BUYER_INN' => array('TYPE' => 'PROPERTY', 'VALUE' => 'INN'), 'BUYER_ADDRESS' => array('TYPE' => 'PROPERTY', 'VALUE' => 'ADDRESS'), 'BUYER_PHONE' => array('TYPE' => 'PROPERTY', 'VALUE' => 'PHONE'), 'BUYER_FAX' => array('TYPE' => '', 'VALUE' => ''), 'BUYER_PAYER_NAME' => array('TYPE' => 'PROPERTY', 'VALUE' => 'FIO'), 'COMMENT1' => array('TYPE' => 'ORDER', 'VALUE' => 'USER_DESCRIPTION'))), 'HAVE_PAYMENT' => 'Y', 'HAVE_ACTION' => 'N', 'HAVE_RESULT' => 'N', 'HAVE_PREPAY' => 'N', 'HAVE_RESULT_RECEIVE' => 'N')));
     }
     $currencyID = \CCrmCurrency::GetBaseCurrencyID();
     foreach ($paySystems as $paySystem) {
         $dbSalePaySystem = \CSalePaySystem::GetList(array(), array('LID' => $siteID, 'NAME' => $paySystem['NAME']), false, false, array('ID'));
         if (!$dbSalePaySystem->Fetch()) {
             $paySystemID = \CSalePaySystem::Add(array('NAME' => $paySystem['NAME'], 'DESCRIPTION' => $paySystem['DESCRIPTION'], 'SORT' => $paySystem['SORT'], 'LID' => $siteID, 'CURRENCY' => $currencyID, 'ACTIVE' => 'Y'));
             if ($paySystemID > 0) {
                 foreach ($paySystem['ACTION'] as &$action) {
                     $action['PAY_SYSTEM_ID'] = $paySystemID;
                     \CSalePaySystemAction::Add($action);
                 }
                 unset($action);
             }
         }
     }
     unset($paySystem);
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:48,代码来源:salemanager.php


示例7: getValues

 public static function getValues($psId = false, $persId = false)
 {
     $arResult = array();
     //get saved
     if (intval($psId) > 0) {
         $dbPSAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $psId, "PERSON_TYPE_ID" => $persId));
         if ($arPSAction = $dbPSAction->Fetch()) {
             $arResult = self::extractFromField($arPSAction["TARIF"]);
         }
     }
     //or get default
     if (empty($arResult)) {
         $arResult = CSaleHelper::getOptionOrImportValues('ps_payment_forward_calc_tarifs', array('CSalePaySystemTarifPFC', 'getAllCMTarifsFromCsv'));
     }
     return $arResult;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:16,代码来源:tarif.php


示例8: foreach

            ?>
';
						var param_<?php 
            echo $val;
            ?>
_value_<?php 
            echo $arPersonType["ID"];
            ?>
 = '<?php 
            echo CUtil::JSEscape($valueTmp);
            ?>
';
						<?php 
        }
    } else {
        $arCorrespondence = CSalePaySystemAction::UnSerializeParams($arPaySystemAction["PARAMS"]);
        foreach ($arCorrespondence as $key => $value) {
            ?>
						var param_<?php 
            echo $key;
            ?>
_type_<?php 
            echo $arPersonType["ID"];
            ?>
 = '<?php 
            echo CUtil::JSEscape($value["TYPE"]);
            ?>
';
						var param_<?php 
            echo $key;
            ?>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:pay_system_edit.php


示例9:

			</tr>
		</table>
	</td>
</tr>
</table>
<br />
<h1>Внимание! В стоимость заказа не включена комиссия банка.</h1>

<!-- Условия поставки -->
<h1><b>Метод оплаты:</b></h1>
<ol>
	<li>Распечатайте квитанцию. Если у вас нет принтера, перепишите верхнюю часть квитанции и заполните по этому образцу стандартный бланк квитанции в вашем банке.</li>
	<li>Вырежьте по контуру квитанцию.</li>
	<li>Оплатите квитанцию в любом отделении банка, принимающего платежи от частных лиц.</li>
	<li>Сохраните квитанцию до подтверждения исполнения заказа.</li>
</ol>

<h1><b>Условия поставки:</b> </h1>
<ul>
	<li>Отгрузка оплаченного товара производится после подтверждения факта платежа.</li>
	<li>Идентификация платежа производится по квитанции, поступившей в наш банк.</li>
</ul>


<p><b>Примечание:</b>
<?php 
echo CSalePaySystemAction::GetParamValue("COMPANY_NAME");
?>
	не может гарантировать конкретные сроки проведения вашего платежа. За дополнительной информацией о сроках доставки квитанции в банк получателя, обращайтесь в свой банк.</p>
</body>
</html>
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:payment.php


示例10: IntVal

?>
">
<INPUT TYPE="HIDDEN" NAME="YMPayment" VALUE="<?php 
echo IntVal(CSalePaySystemAction::GetParamValue("PAYMENT_YMPayment")) == 1 ? 1 : 0;
?>
">
<INPUT TYPE="HIDDEN" NAME="QIWIPayment" VALUE="<?php 
echo IntVal(CSalePaySystemAction::GetParamValue("PAYMENT_QIWIPayment")) == 1 ? 1 : 0;
?>
">
<INPUT TYPE="HIDDEN" NAME="WMPayment" VALUE="<?php 
echo IntVal(CSalePaySystemAction::GetParamValue("PAYMENT_WebMoneyPayment")) == 1 ? 1 : 0;
?>
">
<INPUT TYPE="HIDDEN" NAME="AssistIDPayment" VALUE="<?php 
echo IntVal(CSalePaySystemAction::GetParamValue("PAYMENT_AssistIDCCPayment")) == 1 ? 1 : 0;
?>
">

<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="<?php 
echo GetMessage("SASP_ACTION");
?>
">
</form>

<p align="justify"><b><?php 
echo GetMessage("SASP_NOTES_TITLE");
?>
</b></p>
<p align="justify"><?php 
echo GetMessage("SASP_NOTES");
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:payment.php


示例11:

				</tr>
				<?php 
        }
        ?>
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td><nobr><?php 
        echo CSalePaySystemAction::GetParamValue("SELLER_ACC_POS", false);
        ?>
</nobr></td>
					<td style="border-bottom: 1pt solid #000000; text-align: center; ">
						<?php 
        if (!$blank && CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN", false)) {
            ?>
						<span style="position: relative; ">&nbsp;<?php 
            echo CFile::ShowImage(CSalePaySystemAction::GetParamValue("SELLER_ACC_SIGN", false), 200, 50, 'style="position: absolute; margin-left: -75pt; bottom: 0pt; "');
            ?>
</span>
						<?php 
        }
        ?>
					</td>
				</tr>
				<?php 
    }
    ?>
				<?php 
}
?>
			</table>
开发者ID:webgksupport,项目名称:alpina,代码行数:30,代码来源:html.php


示例12: getBasketItems


//.........这里部分代码省略.........
         $DISCOUNT_PRICE_ALL += $arOneItem["DISCOUNT_PRICE"] * $arOneItem["QUANTITY"];
     }
     unset($arOneItem);
     $arResult["ITEMS"]["AnDelCanBuy"] = $arOrder["BASKET_ITEMS"];
     // fill grid data (for new templates with custom columns)
     foreach ($arResult["ITEMS"] as $type => $arItems) {
         foreach ($arItems as $k => $arItem) {
             $arResult["GRID"]["ROWS"][$arItem["ID"]] = $arItem;
         }
     }
     $arResult["allSum"] = roundEx($allSum, SALE_VALUE_PRECISION);
     $arResult["allWeight"] = $allWeight;
     $arResult["allWeight_FORMATED"] = roundEx(doubleval($allWeight / $this->weightKoef), SALE_WEIGHT_PRECISION) . " " . $this->weightUnit;
     $arResult["allSum_FORMATED"] = CCurrencyLang::CurrencyFormat($allSum, $allCurrency, true);
     $arResult["DISCOUNT_PRICE_FORMATED"] = CCurrencyLang::CurrencyFormat($arResult["DISCOUNT_PRICE"], $allCurrency, true);
     $arResult["PRICE_WITHOUT_DISCOUNT"] = CCurrencyLang::CurrencyFormat($allSum + $DISCOUNT_PRICE_ALL, $allCurrency, true);
     if ($this->priceVatShowValue == 'Y') {
         $arResult["allVATSum"] = roundEx($allVATSum, SALE_VALUE_PRECISION);
         $arResult["allVATSum_FORMATED"] = CCurrencyLang::CurrencyFormat($allVATSum, $allCurrency, true);
         $arResult["allSum_wVAT_FORMATED"] = CCurrencyLang::CurrencyFormat(doubleval($arResult["allSum"] - $allVATSum), $allCurrency, true);
     }
     $arResult['COUPON_LIST'] = array();
     $arResult['COUPON'] = '';
     if ($this->hideCoupon != "Y") {
         $arCoupons = DiscountCouponsManager::get(true, array(), true, true);
         if (!empty($arCoupons)) {
             foreach ($arCoupons as &$oneCoupon) {
                 if ($arResult['COUPON'] == '') {
                     $arResult['COUPON'] = $oneCoupon['COUPON'];
                 }
                 if ($oneCoupon['STATUS'] == DiscountCouponsManager::STATUS_NOT_FOUND || $oneCoupon['STATUS'] == DiscountCouponsManager::STATUS_FREEZE) {
                     $oneCoupon['JS_STATUS'] = 'BAD';
                 } elseif ($oneCoupon['STATUS'] == DiscountCouponsManager::STATUS_NOT_APPLYED || $oneCoupon['STATUS'] == DiscountCouponsManager::STATUS_ENTERED) {
                     $oneCoupon['JS_STATUS'] = 'ENTERED';
                 } else {
                     $oneCoupon['JS_STATUS'] = 'APPLYED';
                 }
                 $oneCoupon['JS_CHECK_CODE'] = '';
                 if (isset($oneCoupon['CHECK_CODE_TEXT'])) {
                     $oneCoupon['JS_CHECK_CODE'] = is_array($oneCoupon['CHECK_CODE_TEXT']) ? implode('<br>', $oneCoupon['CHECK_CODE_TEXT']) : $oneCoupon['CHECK_CODE_TEXT'];
                 }
                 $arResult['COUPON_LIST'][] = $oneCoupon;
             }
             unset($oneCoupon);
             $arResult['COUPON_LIST'] = array_values($arCoupons);
         }
         unset($arCoupons);
     }
     if (empty($arBasketItems)) {
         $arResult["ERROR_MESSAGE"] = Loc::getMessage("SALE_EMPTY_BASKET");
     }
     $arResult["DISCOUNT_PRICE_ALL"] = $DISCOUNT_PRICE_ALL;
     $arResult["DISCOUNT_PRICE_ALL_FORMATED"] = CCurrencyLang::CurrencyFormat($DISCOUNT_PRICE_ALL, $allCurrency, true);
     if ($this->usePrepayment == "Y") {
         if (doubleval($arResult["allSum"]) > 0) {
             $personType = array();
             $dbPersonType = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("LID" => SITE_ID, "ACTIVE" => "Y"));
             while ($arPersonType = $dbPersonType->Fetch()) {
                 $personType[] = $arPersonType["ID"];
             }
             if (!empty($personType)) {
                 $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PS_ACTIVE" => "Y", "HAVE_PREPAY" => "Y", "PERSON_TYPE_ID" => $personType), false, false, array("ID", "PAY_SYSTEM_ID", "PERSON_TYPE_ID", "NAME", "ACTION_FILE", "RESULT_FILE", "NEW_WINDOW", "PARAMS", "ENCODING", "LOGOTIP"));
                 if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                     CSalePaySystemAction::InitParamarrays(false, false, $arPaySysAction["PARAMS"]);
                     $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                     $pathToAction = str_replace("\\", "/", $pathToAction);
                     while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
                         $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
                     }
                     if (file_exists($pathToAction)) {
                         if (is_dir($pathToAction) && file_exists($pathToAction . "/pre_payment.php")) {
                             $pathToAction .= "/pre_payment.php";
                         }
                         try {
                             include_once $pathToAction;
                         } catch (\Bitrix\Main\SystemException $e) {
                             if ($e->getCode() == CSalePaySystemAction::GET_PARAM_VALUE) {
                                 $message = Loc::getMessage("SOA_TEMPL_ORDER_PS_ERROR");
                             } else {
                                 $message = $e->getMessage();
                             }
                             $arResult["ERROR_MESSAGE"] = $message;
                         }
                         $psPreAction = new CSalePaySystemPrePayment();
                         if ($psPreAction->init()) {
                             $orderData = array("PATH_TO_ORDER" => $this->pathToOrder, "AMOUNT" => $arResult["allSum"], "BASKET_ITEMS" => $arResult["ITEMS"]["AnDelCanBuy"]);
                             if (!$psPreAction->BasketButtonAction($orderData)) {
                                 if ($e = $APPLICATION->GetException()) {
                                     $arResult["WARNING_MESSAGE"][] = $e->GetString();
                                 }
                             }
                             $arResult["PREPAY_BUTTON"] = $psPreAction->BasketButtonShow();
                         }
                     }
                 }
             }
         }
     }
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:class.php


示例13: urlencode

 $strPostQueryString .= "&x_currency_code=" . urlencode($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["CURRENCY"]);
 $strPostQueryString .= "&x_method=CC";
 $strPostQueryString .= "&x_type=AUTH_CAPTURE";
 $strPostQueryString .= "&x_recurring_billing=NO";
 $strPostQueryString .= "&x_card_num=" . urlencode($INPUT_CARD_NUM);
 $strPostQueryString .= "&x_exp_date=" . urlencode($INPUT_CARD_EXP_MONTH . $INPUT_CARD_EXP_YEAR);
 // MMYYYY
 $strPostQueryString .= "&x_card_code=" . urlencode($INPUT_CARD_CODE);
 // Level 2 Data
 $strPostQueryString .= "&x_tax=" . urlencode($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["TAX_VALUE"]);
 $strPostQueryString .= "&x_freight=" . urlencode($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["PRICE_DELIVERY"]);
 $strResult = QueryGetData("secure.authorize.net", 443, "/gateway/transact.dll", $strPostQueryString, $errno, $errstr, "POST", "ssl://");
 $mass = explode("|,|", "|," . $strResult);
 $strHashValue = CSalePaySystemAction::GetParamValue("HASH_VALUE");
 if (strlen($strHashValue) > 0) {
     if (md5($strHashValue . CSalePaySystemAction::GetParamValue("PS_LOGIN") . $mass[7] . sprintf("%.2f", $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"])) != strtolower($mass[38])) {
         $mass = array();
         $mass[1] = 3;
         $mass[4] = "MD5 transaction signature is incorrect!";
         $mass[3] = 0;
         $mass[2] = 0;
     }
 }
 $strPS_STATUS = IntVal($mass[1]) == 1 ? "Y" : "N";
 $strPS_STATUS_CODE = $mass[3];
 if ($strPS_STATUS == "Y") {
     $strPS_STATUS_DESCRIPTION = "Approval Code: " . $mass[5] . (!empty($mass[7]) ? "; Transaction ID: " . $mass[7] : "");
 } else {
     $strPS_STATUS_DESCRIPTION = (IntVal($mass[1]) == 2 ? "Declined" : "Error") . ": " . $mass[4] . " (Reason Code " . $mass[3] . " / Sub " . $mass[2] . ")";
     $strErrorMessage .= (IntVal($mass[1]) == 2 ? "Transaction was declined" : "Error while processing transaction") . ": " . $mass[4] . " (" . $mass[3] . "/" . $mass[2] . ")";
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:payment.php


示例14: md5

    $mrh_pass2 = CSalePaySystemAction::GetParamValue("ShopPassword2");
    if (strlen($mrh_pass2) <= 0) {
        $bCorrectPayment = False;
    }
    $strCheck = md5($out_summ . ":" . $inv_id . ":" . $mrh_pass2 . ':shp_payment_id=' . $paymentId);
    if ($bCorrectPayment && ToUpper($crc) != ToUpper($strCheck)) {
        $bCorrectPayment = False;
    }
    if ($bCorrectPayment) {
        $strPS_STATUS_DESCRIPTION = GetMessage('SALE_RES_NUMBER') . ": " . $inv_id;
        $strPS_STATUS_DESCRIPTION .= "; " . GetMessage('SALE_RES_DATEPAY') . ": " . date("d.m.Y H:i:s");
        if (isset($_REQUEST["IncCurrLabel"]) && strlen($_REQUEST["IncCurrLabel"]) > 0) {
            $strPS_STATUS_DESCRIPTION .= "; " . GetMessage('SASP_RES_PAY_TYPE') . ": " . $_REQUEST["IncCurrLabel"];
        }
        $strPS_STATUS_MESSAGE = GetMessage('SASP_RES_PAYED');
        $arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $out_summ, "PS_CURRENCY" => $arOrder["CURRENCY"], "PS_RESPONSE_DATE" => new \Bitrix\Main\Type\DateTime());
        if (roundEx(CSalePaySystemAction::GetParamValue("SHOULD_PAY"), 2) == roundEx($out_summ, 2) && $changePayStatus == "Y") {
            $result = $payment->setField('PAID', 'Y');
            $APPLICATION->RestartBuffer();
            if ($result->isSuccess()) {
                $result = $payment->setFields($arFields);
                if ($result->isSuccess()) {
                    $result = $order->save();
                    if ($result->isSuccess()) {
                        echo "OK" . $arOrder["ID"];
                    }
                }
            }
        }
    }
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:result_rec.php


示例15:

$lmi_secret_key = $_REQUEST['LMI_SECRET_KEY'];
if (CModule::IncludeModule("sale")) {
    $bCorrectPayment = True;
    $err = 0;
    $err_text = '';
    if ($arOrder = CSaleOrder::GetByID(IntVal($lmi_payment_no))) {
        $bCorrectPayment = False;
        $err = 1;
        $err_text = 'ERR: НЕТ ТАКОГО ЗАКАЗА';
    }
    if ($bCorrectPayment) {
        CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]);
    }
    $IdM = CSalePaySystemAction::GetParamValue("ZP_SHOP_ID");
    $sk = CSalePaySystemAction::GetParamValue("ZP_MERCHANT_KEY");
    $CruR = CSalePaySystemAction::GetParamValue("ZP_CODE_RUR");
    // Проверяем, не произошла ли подмена суммы.
    $order_amount = CCurrencyRates::ConvertCurrency($arOrder["PRICE"], $arOrder["CURRENCY"], $CruR);
    if ($order_amount != $lmi_payment_amount) {
        $err = 2;
        $err_text = 'ERR: НЕВЕРНАЯ СУММА : ' . $lmi_payment_amount;
    }
    //проверяем ID магазина
    if ($lmi_payee_purse != $IdM) {
        $err = 3;
        $err_text = 'ERR: НЕВЕРЕН ID МАГАЗИНА : ' . $lmi_payee_purse;
    }
    if ($lmi_prerequest == 1) {
        if ($err != 0) {
            echo $err_text;
        } else {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:z_payment_result.php


示例16: array

        $bVarsFromForm = true;
    }
}
$dbUserCards = CSaleUserCards::GetList(array("DATE_UPDATE" => "DESC"), array("ID" => $ID, "USER_ID" => IntVal($GLOBALS["USER"]->GetID())), false, false, array("ID", "USER_ID", "ACTIVE", "SORT", "PAY_SYSTEM_ACTION_ID", "CURRENCY", "CARD_TYPE", "CARD_NUM", "CARD_CODE", "CARD_EXP_MONTH", "CARD_EXP_YEAR", "DESCRIPTION", "SUM_MIN", "SUM_MAX", "SUM_CURRENCY", "TIMESTAMP_X", "LAST_STATUS", "LAST_STATUS_CODE", "LAST_STATUS_DESCRIPTION", "LAST_STATUS_MESSAGE", "LAST_SUM", "LAST_CURRENCY", "LAST_DATE"));
if ($arUserCards = $dbUserCards->GetNext()) {
    $arResult = $arUserCards;
    $arResult["CARD_NUM"] = CSaleUserCards::CryptData($arResult["CARD_NUM"], "D");
} else {
    $arResult["ID"] = 0;
    $arResult["ACTIVE"] = "Y";
    $arResult["SORT"] = 100;
}
if ($bVarsFromForm) {
    foreach ($_POST as $k => $v) {
        $arResult[$k] = htmlspecialcharsex($v);
        $arResult['~' . $k] = $v;
    }
}
$arResult["ERROR_MESSAGE"] = $errorMessage;
$dbPaySysActions = CSalePaySystemAction::GetList(array("PERSON_TYPE_ID" => "ASC", "NAME" => "ASC", "PT_NAME" => "ASC", "PS_NAME" => "ASC"), array("PS_LID" => SITE_ID, "HAVE_ACTION" => "Y"), false, false, array("*"));
$arResult["PAY_SYSTEM"] = array();
while ($arPaySysActions = $dbPaySysActions->GetNext()) {
    $arResult["PAY_SYSTEM"][] = $arPaySysActions;
}
$dbCurrency = CCurrency::GetList($by = "sort", $order = "asc");
$arResult["CURRENCY_INFO"] = array();
while ($arCurrency = $dbCurrency->GetNext()) {
    $arResult["CURRENCY_INFO"][] = $arCurrency;
}
$arResult["CARD_TYPE_INFO"] = array("VISA" => "Visa", "MASTERCARD" => "MasterCard", "AMEX" => "Amex", "DINERS" => "Diners", "DISCOVER" => "Discover", "JCB" => "JCB", "ENROUTE" => "Enroute");
$this->IncludeComponentTemplate();
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php


示例17: obtainDataPaySystem

 /**
  * Function gets pay system info from database, no cache is used here
  * @return void
  */
 protected function obtainDataPaySystem()
 {
     if (empty($this->dbResult["ID"])) {
         return;
     }
     if (intval($this->dbResult["PAY_SYSTEM_ID"])) {
         $this->dbResult["PAY_SYSTEM"] = CSalePaySystem::GetByID($this->dbResult["PAY_SYSTEM_ID"], $this->dbResult["PERSON_TYPE_ID"]);
     }
     if ($this->dbResult["PAYED"] != "Y" && $this->dbResult["CANCELED"] != "Y") {
         if (intval($this->dbResult["PAY_SYSTEM_ID"])) {
             $dbPaySysAction = CSalePaySystemAction::GetList(array(), array("PAY_SYSTEM_ID" => $this->dbResult["PAY_SYSTEM_ID"], "PERSON_TYPE_ID" => $this->dbResult["PERSON_TYPE_ID"]), false, false, array("NAME", "ACTION_FILE", "NEW_WINDOW", "PARAMS", "ENCODING"));
             if ($arPaySysAction = $dbPaySysAction->Fetch()) {
                 if (strlen($arPaySysAction["ACTION_FILE"])) {
                     $this->dbResult["CAN_REPAY"] = "Y";
                     if ($arPaySysAction["NEW_WINDOW"] == "Y") {
                         $this->dbResult["PAY_SYSTEM"]["PSA_ACTION_FILE"] = htmlspecialcharsbx($this->arParams["PATH_TO_PAYMENT"]) . '?ORDER_ID=' . urlencode(urlencode($this->dbResult["ACCOUNT_NUMBER"]));
                     } else {
                         CSalePaySystemAction::InitParamArrays($this->dbResult, $this->requestData["ID"], $arPaySysAction["PARAMS"]);
                         $pathToAction = $_SERVER["DOCUMENT_ROOT"] . $arPaySysAction["ACTION_FILE"];
                         $pathToAction = str_replace("\\", "/", $pathToAction);
                         while (substr($pathToAction, strlen($pathToAction) - 1, 1) == "/") {
                             $pathToAction = substr($pathToAction, 0, strlen($pathToAction) - 1);
                         }
                         if (file_exists($pathToAction)) {
                             if (is_dir($pathToAction) && file_exists($pathToAction . "/payment.php")) {
                                 $pathToAction .= "/payment.php";
                             }
                             $this->dbResult["PAY_SYSTEM"]["PSA_ACTION_FILE"] = $pathToAction;
                         }
                         if (strlen($arPaySysAction["ENCODING"])) {
                             define("BX_SALE_ENCODING", $arPaySysAction["ENCODING"]);
                             AddEventHandler("main", "OnEndBufferContent", array($this, "changeBodyEncoding"));
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:43,代码来源:class.php


示例18: die

<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();?><?
include(GetLangFileName(dirname(__FILE__)."/", "/payment.php"));

function either($a, $b)  {  if ($a != NULL) return $a; return $b;}

$TMG_PK_SERVER_ADDR = CSalePaySystemAction::GetParamValue("TMG_PK_SERVER_ADDR");

$user_id = (int)$GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_ID"];
$sum = (float)either(
    CSalePaySystemAction::GetParamValue("SHOULD_PAY"), 
    $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["SHOULD_PAY"]);
$orderid = (int)either(
    CSalePaySystemAction::GetParamValue("ORDER_ID"), 
    $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ID"]);
$email = either($GLOBALS["SALE_INPUT_PARAMS"]["PROPERTY"]["EMAIL"], $GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["USER_EMAIL"]);
$phone = htmlspecialchars($GLOBALS['SALE_INPUT_PARAMS']['PROPERTY']['PHONE']);

// --- BEGIN --- костыль для arteva
$arOrder = getOrder($orderid);
$user_id = $arOrder["ACCOUNT_NUMBER"]; // вместо пользователя передаём номер заказа (не ID)
// --- END ---

$opts = array ("sum"=>$sum, "user_id"=>$user_id);
$payment_parameters = array("clientid"=>$user_id, "orderid"=>$orderid, "sum"=>$sum, "phone"=>$phone, "email"=>$email);
$query = http_build_query($payment_parameters);
$err_num = $err_text = NULL;

$form = QueryGetData($TMG_PK_SERVER_ADDR, 80, "/external/", $query, $err_num, $err_text);

if ($form  == "")
  $form = "<h3>Произошла ошибка при инциализации платежа</h3><p>$err_num: ".htmlspecialchars($err_text)."</p>";
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:payment.php


示例19: SaleFormatCurrency

?>
<br>
<input type=hidden name=BillDescription value="Order &nbsp;<?php 
echo $ORDER_ID;
?>
&nbsp">
<input type=hidden name=BillSum value="<?php 
echo CSalePaySystemAction::GetParamValue("SHOULD_PAY");
?>
">
Сумма к оплате по счету: <?php 
echo SaleFormatCurrency(CSalePaySystemAction::GetParamValue("SHOULD_PAY"), CSalePaySystemAction::GetParamValue("CURRENCY"));
?>
<br>
<input type=hidden name=BillShopId value="<?php 
echo CSalePaySystemAction::GetParamValue("SHOP_ID");
?>
">
<input type=hidden name=BillDate value="<?php 
echo CSalePaySystemAction::GetParamValue("DATE_INSERT");
?>
">
<input type=hidden name=BillCurrency value="<?php 
echo CSalePaySystemAction::GetParamValue("CURRENCY") == "RUR" ? "руб." : "";
?>
">
<br>
<input type=submit name=sub value="Оплатить">
</font>
</form>
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:30,代码来源:payment.php


示例20: qiwiWalletXmlResponse

    } else {
        qiwiWalletXmlResponse(QIWI_WALLET_ERROR_CODE_AUTH);
    }
}
list($orderId, $paymentId) = explode(':', $_POST['bill_id']);
/** @var \Bitrix\Sale\Order $order */
$order = Order::load($orderId);
if ($order) {
    $arOrder = $order->getFieldValues();
    $payment = $order->getPaymentCollection()->getItemById($paymentId);
    $paidInfo = array("PS_STATUS" => $_POST['status'] == "paid" ? "Y" : "N", "PS_STATUS_CODE" => substr($_POST['status'], 0, 5), "PS_STATUS_MESSAGE" => Loc::getMessage("SALE_QWH_STATUS_MESSAGE_" . strtoupper($_POST['status'])), "PS_RESPONSE_DATE" => \Bitrix\Main\Type\DateTime::createFromTimestamp(time()), "PS_SUM" => (double) $_POST['amount'], "PS_CURRENCY" => $_POST['ccy'], "PS_STATUS_DESCRIPTION" => "");
    if ((int) $_POST['error']) {
        $paidInfo['PS_STATUS_DESCRIPTION'] = "Error: " . Loc::getMessage("SALE_QWH_ERROR_CODE_" . $_POST['error']);
        $payment->setFields($paidInfo);
        qiwiWalletXmlResponse(QIWI_WALLET_ERROR_CODE_OTHER);
    }
    foreach ($_POST as $key => $value) {
        $paidInfo['PS_STATUS_DESCRIPTION'] .= "{$key}:{$value}, ";
    }
    $payment->setFields($paidInfo);
    $changeStatusPay = CSalePaySystemAction::GetParamValue("CHANGE_STATUS_PAY") == "Y";
    if ($_POST['status'] == "paid" && $changeStatusPay) {
        $resPayment = $payment->setField('PAID', 'Y');
        if ($resPayment->isSuccess()) {
            qiwiWalletXmlResponse(QIWI_WALLET_ERROR_CODE_NONE);
        }
    }
    $order->save();
} else {
    qiwiWalletX 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP CSalePersonType类代码示例发布时间:2022-05-20
下一篇:
PHP CSalePaySystem类代码示例发布时间:2022-05-20
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap