1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
refund.php
См. документацию.
1<?
2use \Bitrix\Main\Localization\Loc;
3use \Bitrix\Sale\PaySystem;
4
5Loc::loadMessages(__FILE__);
6
8
10
12$context = $application->getContext();
13$request = $context->getRequest();
14$shopId = (int)$request->get("shop_id");
15$companyName = $request->get("company_name");
17
18\CUtil::InitJSCore();
19
20if ($request->get("csr") === 'Y')
21{
23}
24
25if ($request->get("generate") === 'Y')
26{
27 $companyName = $request->get('company_name');
28 if ($companyName && !preg_match('/[^a-zA-Z]+/', $companyName))
29 {
31 LocalRedirect($APPLICATION->GetCurPage().'?shop_id='.$shopId.'&handler=yandex&lang='.LANG);
32 }
33 else
34 {
35 $errorMsg = Loc::getMessage('SALE_YANDEX_RETURN_ERROR_CN');
36 }
37}
38
39if (($request->getPost("Update") || $request->getPost("Apply")) && check_bitrix_sessid())
40{
41 if ($request->get('SETTINGS_CLEAR') || $request->get('SETTINGS_CLEAR_ALL'))
42 {
43 $all = $request->get('SETTINGS_CLEAR_ALL') !== null;
45 }
46
47 $certFile = $request->getFile("CERT_FILE");
48 if (file_exists($certFile['tmp_name']))
50
52 {
54 $errorMsg .= $error."<br>\n";
55 }
56
57 if ($errorMsg === '')
58 {
59 LocalRedirect($APPLICATION->GetCurPage().'?shop_id='.$shopId.'&handler=yandex&lang='.LANG);
60 }
61}
62
63if ($errorMsg !== '')
64 CAdminMessage::ShowMessage(array("DETAILS"=>$errorMsg, "TYPE"=>"ERROR", "HTML"=>true));
65
68 "PERSON_TYPE" => 0,
69 "DIV" => 0,
70 "TAB" => Loc::getMessage('SALE_YANDEX_RETURN_PT'),
71 "TITLE" => Loc::getMessage("SALE_YANDEX_RETURN_TITLE")
72);
73
74$tabRControl = new \CAdminTabControl("tabRControl", $personTypeTabs);
75$tabRControl->Begin();?>
76
77<form method="POST" enctype="multipart/form-data"
78 action="<?=$APPLICATION->GetCurPage()?>?shop_id=<?=$shopId;?>&handler=yandex&lang=<?echo LANG?>"
79 xmlns="http://www.w3.org/1999/html">
80<?
81 echo bitrix_sessid_post();
82 $tabRControl->BeginNextTab();
83
85?>
86 <tr class="heading">
87 <td colspan="2"><?=Loc::getMessage('SALE_YANDEX_RETURN_SUBTITLE');?></td>
88 </tr>
89 <tr>
90 <td width="40%" class="adm-detail-content-cell-l"><?=Loc::getMessage("SALE_YANDEX_RETURN_CERT")?>:</td>
91
92 <td width="60%" class="adm-detail-content-cell-r">
94 <input type="file" name="CERT_FILE" size="40"><br>
95 <?=Loc::getMessage('SALE_YANDEX_RETURN_TEXT_CLEAR_ALL')?>
96 <input id=SETTINGS_CLEAR_ALL' type="checkbox" name='SETTINGS_CLEAR_ALL'>
97 <?else:?>
98 <?=Loc::getMessage('SALE_YANDEX_RETURN_TEXT_SUCCESS')?><br>
99 <?=Loc::getMessage('SALE_YANDEX_RETURN_TEXT_CLEAR')?>
100 <input id='SETTINGS_CLEAR' type="checkbox" name='SETTINGS_CLEAR'>
101 <?endif;?>
102 <br>
103 </td>
104 </tr>
105 <tr>
106 <td colspan="2"><?=Loc::getMessage("SALE_YANDEX_RETURN_HELP")?></td>
107 </tr>
108 <tr class="heading">
109 <td colspan="2"><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW")?></td>
110 </tr>
111 <tr>
112 <td colspan="2">
113 <ol>
114 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM0");?></li>
115 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM1")?></li>
116 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM2")?></li>
117 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM3")?></li>
118 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM4")?></li>
119 <li><?=Loc::getMessage("SALE_YANDEX_RETURN_HOW_ITEM5")?></li>
120 </ol>
121 </td>
122 </tr>
123 <tr class="heading">
124 <td colspan="2"><?=Loc::getMessage("SALE_YANDEX_RETURN_STATEMENT")?></td>
125 </tr>
126
127 <? if ($strCN):?>
128 <tr>
129 <td class="adm-detail-valign-top adm-detail-content-cell-l"><strong><?=Loc::getMessage("SALE_YANDEX_RETURN_STATEMENT_CN")?></strong>:</td>
130 <td class="adm-detail-content-cell-r"><?=$strCN?></td>
131 </tr>
132 <tr>
133 <td class="adm-detail-valign-top adm-detail-content-cell-l"><strong><?=Loc::getMessage("SALE_YANDEX_RETURN_CSR")?></strong>:</td>
134 <td class="adm-detail-content-cell-r"><?=sprintf(Loc::getMessage("SALE_YANDEX_RETURN_CSR_DOWNLOAD"), $APPLICATION->GetCurPage()."?lang=ru&csr=Y&shop_id=".$shopId."&handler=yandex")?></td>
135 </tr>
136 <tr>
137 <td class="adm-detail-valign-top adm-detail-content-cell-l"><strong><?=Loc::getMessage("SALE_YANDEX_RETURN_STATEMENT_SIGN")?></strong>:</td>
138 <td class="adm-detail-content-cell-r">
139 <textarea cols="55" disabled="" rows="13" >
140 <?=PaySystem\YandexCert::getSign($shopId)?>
141 </textarea>
142 </td>
143 </tr>
144 <tr>
145 <td class="adm-detail-valign-top adm-detail-content-cell-l"><strong><?=Loc::getMessage("SALE_YANDEX_RETURN_STATEMENT_CAUSE")?></strong>:</td>
146 <td class="adm-detail-content-cell-r"><?=Loc::getMessage("SALE_YANDEX_RETURN_STATEMENT_CAUSE_VAL")?></td>
147 </tr>
148 <?else:?>
149 <tr align="center">
150 <td class="adm-detail-valign-top" colspan="2">
151 <?=Loc::getMessage('SALE_YANDEX_RETURN_COMPANY_NAME')?>: <input type="text" name="company_name" value="">
152 </td>
153 </tr>
154 <tr align="center">
155 <td class="adm-detail-valign-top" colspan="2">
156 <input type="submit" name="generate" value="<?=Loc::getMessage("SALE_YANDEX_RETURN_GENERATE")?>">
157 <input type="hidden" name="generate" value="Y">
158 </td>
159 </tr>
160 <?endif;?>
161
162 <?$tabRControl->EndTab();?>
163
164 <? if ($strCN):?>
165 <?$tabRControl->Buttons();?>
166 <input type="submit" name="Update" value="<?=Loc::getMessage("SALE_YANDEX_RETURN_SAVE")?>">
167 <input type="hidden" name="Update" value="Y">
168 <?endif;?>
169</form>
170
171<?$tabRControl->End();
global $APPLICATION
Определения include.php:80
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
static getInstance()
Определения application.php:98
static includeModule($moduleName)
Определения loader.php:67
static getCsr($shopId)
Определения yandexcert.php:213
static getCn($shopId)
Определения yandexcert.php:90
static setCert($file, $shopId)
Определения yandexcert.php:145
static generate($shopId, $companyName)
Определения yandexcert.php:23
static clear($shopId, $all=false)
Определения yandexcert.php:76
static isLoaded($shopId)
Определения yandexcert.php:135
static ShowMessage($message)
Определения admin_lib.php:2351
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$context
Определения csv_new_setup.php:223
$application
Определения bitrix.php:23
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
Определения tools.php:4700
check_bitrix_sessid($varname='sessid')
Определения tools.php:4686
LocalRedirect($url, $skip_security_check=false, $status="302 Found")
Определения tools.php:4005
$errorMsg
Определения refund.php:16
$personTypeTabs
Определения refund.php:66
$tabRControl
Определения refund.php:74
$strCN
Определения refund.php:84
$companyName
Определения refund.php:15
$shopId
Определения refund.php:14
font size
Определения invoice.php:442
$error
Определения subscription_card_product.php:20