当前位置: 首页>>代码示例>>PHP>>正文


PHP CSalePaySystemAction类代码示例

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


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


注:本文中的CSalePaySystemAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。