Skip to content

Commit c56d484

Browse files
author
Viktor Tymchynskyi
committed
Merge remote-tracking branch 'origin/MAGETWO-42822' into MPI-BUGFIXES
2 parents 7f9a325 + 9d89e58 commit c56d484

File tree

21 files changed

+389
-226
lines changed

21 files changed

+389
-226
lines changed

app/code/Magento/Payment/i18n/de_DE.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Jahr
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Nur Switch/Solo/Maestro"
3939
"Issue Number",Ausgabenumer
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/en_US.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Year
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Switch/Solo/Maestro Only"
3939
"Issue Number","Issue Number"
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/es_ES.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Año
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Únicamente Switch/Solo/Maestro"
3939
"Issue Number","Número de emisión"
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/fr_FR.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Année
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Switch/Solo/Maestro seulement"
3939
"Issue Number","Numéro du problème."
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/nl_NL.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Jaar
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Alleen Switch/Solo/Maestro"
3939
"Issue Number","Uitgave Nummer"
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/pt_BR.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,Ano
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","Somente Swith/Solo/Maestro"
3939
"Issue Number","Número de Emissão"
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/i18n/zh_Hans_CN.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ Year,年
3737
"We found an incorrect credit card expiration date.","We found an incorrect credit card expiration date."
3838
"Switch/Solo/Maestro Only","仅限 Switch/Solo/Maestro"
3939
"Issue Number",问题编号
40-
"%1 is not available. You still can process offline actions.","%1 is not available. You still can process offline actions."
40+
" is not available. You still can process offline actions."," is not available. You still can process offline actions."
4141
"Payment Methods","Payment Methods"

app/code/Magento/Payment/view/adminhtml/templates/form/cc.phtml

Lines changed: 74 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,93 +5,122 @@
55
*/
66

77
// @codingStandardsIgnoreFile
8-
8+
/**
9+
* @var \Magento\Payment\Block\Adminhtml\Transparent\Form $block
10+
*/
11+
$code = $block->getMethodCode();
12+
$ccType = $block->getInfoData('cc_type');
13+
$ccExpMonth = $block->getInfoData('cc_exp_month');
14+
$ccExpYear = $block->getInfoData('cc_exp_year');
915
?>
10-
<?php $_code = $block->getMethodCode() ?>
11-
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @escapeNotVerified */ echo $_code ?>" style="display:none">
16+
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */ echo $code; ?>"
17+
style="display:none">
1218
<div class="field-type admin__field _required">
13-
<label class="admin__field-label" for="<?php /* @escapeNotVerified */ echo $_code ?>_cc_type"><span><?php /* @escapeNotVerified */ echo __('Credit Card Type') ?></span></label>
19+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_cc_type">
20+
<span><?php echo $block->escapeHtml(__('Credit Card Type')); ?></span>
21+
</label>
1422
<div class="admin__field-control">
15-
<select id="<?php /* @escapeNotVerified */ echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select admin__control-select">
16-
<?php $_ccType = $block->getInfoData('cc_type') ?>
23+
<select id="<?php /* @noEscape */ echo $code; ?>_cc_type" name="payment[cc_type]"
24+
class="required-entry validate-cc-type-select admin__control-select">
1725
<option value=""></option>
18-
<?php foreach ($block->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
19-
<option value="<?php /* @escapeNotVerified */ echo $_typeCode ?>" <?php if ($_typeCode == $_ccType): ?>selected="selected"<?php endif ?>><?php /* @escapeNotVerified */ echo $_typeName ?></option>
26+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
27+
<option value="<?php echo $block->escapeHtml($typeCode); ?>" <?php if ($typeCode == $ccType): ?>selected="selected"<?php endif ?>>
28+
<?php echo $block->escapeHtml($typeName); ?>
29+
</option>
2030
<?php endforeach ?>
2131
</select>
2232
</div>
2333
</div>
2434
<div class="field-number admin__field _required">
25-
<label class="admin__field-label" for="<?php /* @escapeNotVerified */ echo $_code ?>_cc_number"><span><?php /* @escapeNotVerified */ echo __('Credit Card Number') ?></span></label>
35+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_cc_number">
36+
<span><?php echo $block->escapeHtml(__('Credit Card Number')); ?></span>
37+
</label>
2638
<div class="admin__field-control">
27-
<input type="text" id="<?php /* @escapeNotVerified */ echo $_code ?>_cc_number" name="payment[cc_number]"
28-
title="<?php /* @escapeNotVerified */ echo __('Credit Card Number') ?>" class="admin__control-text validate-cc-number"
29-
value="<?php /* @escapeNotVerified */ echo $block->getInfoData('cc_number') ?>"/>
39+
<input type="text" id="<?php /* @noEscape */ echo $code; ?>_cc_number" name="payment[cc_number]"
40+
title="<?php echo $block->escapeHtml(__('Credit Card Number')); ?>" class="admin__control-text validate-cc-number"
41+
value="<?php /* @noEscape */ echo $block->getInfoData('cc_number'); ?>"/>
3042
</div>
3143
</div>
3244
<div class="field-date admin__field _required">
33-
<label class="admin__field-label"
34-
for="<?php /* @escapeNotVerified */ echo $_code ?>_expiration"><span><?php /* @escapeNotVerified */ echo __('Expiration Date') ?></span></label>
45+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_expiration">
46+
<span><?php echo $block->escapeHtml(__('Expiration Date')); ?></span>
47+
</label>
3548
<div class="admin__field-control">
36-
<select id="<?php /* @escapeNotVerified */ echo $_code ?>_expiration" name="payment[cc_exp_month]"
49+
<select id="<?php /* @noEscape */ echo $code ?>_expiration" name="payment[cc_exp_month]"
3750
class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
38-
<?php $_ccExpMonth = $block->getInfoData('cc_exp_month') ?>
3951
<?php foreach ($block->getCcMonths() as $k => $v): ?>
40-
<option value="<?php /* @escapeNotVerified */ echo $k ?>"
41-
<?php if ($k == $_ccExpMonth): ?>selected="selected"<?php endif ?>><?php /* @escapeNotVerified */ echo $v ?></option>
42-
<?php endforeach ?>
52+
<option value="<?php echo $block->escapeHtml($k); ?>"
53+
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif ?>>
54+
<?php echo $block->escapeHtml($v); ?>
55+
</option>
56+
<?php endforeach; ?>
4357
</select>
44-
<?php $_ccExpYear = $block->getInfoData('cc_exp_year') ?>
45-
<select id="<?php /* @escapeNotVerified */ echo $_code ?>_expiration_yr" name="payment[cc_exp_year]"
58+
<select id="<?php /* @noEscape */ echo $code ?>_expiration_yr" name="payment[cc_exp_year]"
4659
class="admin__control-select admin__control-select-year required-entry">
4760
<?php foreach ($block->getCcYears() as $k => $v): ?>
48-
<option value="<?php /* @escapeNotVerified */ echo $k ? $k : '' ?>"
49-
<?php if ($k == $_ccExpYear): ?>selected="selected"<?php endif ?>><?php /* @escapeNotVerified */ echo $v ?></option>
61+
<option value="<?php /* @noEscape */ echo $k ? $block->escapeHtml($k) : '' ?>"
62+
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif ?>>
63+
<?php echo $block->escapeHtml($v); ?>
64+
</option>
5065
<?php endforeach ?>
5166
</select>
5267
</div>
5368
</div>
5469

5570
<?php if ($block->hasVerification()): ?>
5671
<div class="field-number required admin__field _required">
57-
<label class="admin__field-label"
58-
for="<?php /* @escapeNotVerified */ echo $_code ?>_cc_cid"><span><?php /* @escapeNotVerified */ echo __('Card Verification Number') ?></span></label>
72+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_cc_cid">
73+
<span><?php echo $block->escapeHtml(__('Card Verification Number')); ?></span>
74+
</label>
5975
<div class="admin__field-control">
60-
<input type="text" title="<?php /* @escapeNotVerified */ echo __('Card Verification Number') ?>"
76+
<input type="text" title="<?php echo $block->escapeHtml(__('Card Verification Number')); ?>"
6177
class="required-entry validate-cc-cvn admin__control-cvn admin__control-text"
62-
id="<?php /* @escapeNotVerified */ echo $_code ?>_cc_cid"
63-
name="payment[cc_cid]" value="<?php /* @escapeNotVerified */ echo $block->getInfoData('cc_cid') ?>"/>
78+
id="<?php /* @noEscape */ echo $code; ?>_cc_cid"
79+
name="payment[cc_cid]" value="<?php /* @noEscape */ echo $block->getInfoData('cc_cid') ?>"/>
6480
</div>
6581
</div>
6682
<?php endif; ?>
6783

6884
<?php if ($block->hasSsCardType()): ?>
69-
<div id="<?php /* @escapeNotVerified */ echo $_code ?>_cc_type_ss_div">
85+
<div id="<?php /* @noEscape */ echo $code; ?>_cc_type_ss_div">
7086
<div class="field-type required admin__field _required">
71-
<label class="admin__field-label"
72-
for="<?php /* @escapeNotVerified */ echo $_code ?>_cc_issue"><span><?php /* @escapeNotVerified */ echo __('Switch/Solo/Maestro Only') ?></span></label>
87+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_cc_issue">
88+
<span><?php echo $block->escapeHtml(__('Switch/Solo/Maestro Only')); ?></span>
89+
</label>
7390
</div>
7491
<div class="admin__field field-issue">
7592
<label class="admin__field-label"
76-
for="<?php /* @escapeNotVerified */ echo $_code ?>_cc_issue"><span><?php /* @escapeNotVerified */ echo __('Issue Number') ?></span></label>
93+
for="<?php /* @noEscape */ echo $code; ?>_cc_issue">
94+
<span><?php echo $block->escapeHtml(__('Issue Number')); ?></span>
95+
</label>
7796

7897
<div class="admin__field-control">
79-
<input type="text" title="<?php /* @escapeNotVerified */ echo __('Issue Number') ?>"
98+
<input type="text" title="<?php echo $block->escapeHtml(__('Issue Number')); ?>"
8099
class="validate-cc-ukss cvv admin__control-cvv admin__control-text"
81-
id="<?php /* @escapeNotVerified */ echo $_code ?>_cc_issue" name="payment[cc_ss_issue]" value=""/>
100+
id="<?php /* @noEscape */ echo $code; ?>_cc_issue" name="payment[cc_ss_issue]" value=""/>
82101
</div>
83102
</div>
84103
<div class="field field-date">
85-
<label class="admin__field-label" for="<?php /* @escapeNotVerified */ echo $_code ?>_start_month"><span><?php /* @escapeNotVerified */ echo __('Start Date') ?></span></label>
104+
<label class="admin__field-label" for="<?php /* @noEscape */ echo $code; ?>_start_month">
105+
<span><?php echo $block->escapeHtml(__('Start Date')); ?></span>
106+
</label>
86107
<div class="admin__field-control">
87-
<select id="<?php /* @escapeNotVerified */ echo $_code ?>_start_month" name="payment[cc_ss_start_month]" class="validate-cc-ukss admin__control-select admin__control-select-month">
108+
<select id="<?php /* @noEscape */ echo $code; ?>_start_month" name="payment[cc_ss_start_month]"
109+
class="validate-cc-ukss admin__control-select admin__control-select-month">
88110
<?php foreach ($block->getCcMonths() as $k => $v): ?>
89-
<option value="<?php /* @escapeNotVerified */ echo $k ? $k : '' ?>"<?php if ($k == $block->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>><?php /* @escapeNotVerified */ echo $v ?></option>
111+
<option value="<?php /* @noEscape */ echo $k ? $block->escapeHtml($k) : '' ?>"
112+
<?php if ($k == $block->getInfoData('cc_ss_start_month')): ?> selected="selected"<?php endif ?>>
113+
<?php echo $block->escapeHtml($v); ?>
114+
</option>
90115
<?php endforeach ?>
91116
</select>
92-
<select id="<?php /* @escapeNotVerified */ echo $_code ?>_start_year" name="payment[cc_ss_start_year]" class="validate-cc-ukss admin__control-select admin__control-select-year">
117+
<select id="<?php /* @noEscape */ echo $code; ?>_start_year" name="payment[cc_ss_start_year]"
118+
class="validate-cc-ukss admin__control-select admin__control-select-year">
93119
<?php foreach ($block->getSsStartYears() as $k => $v): ?>
94-
<option value="<?php /* @escapeNotVerified */ echo $k ? $k : '' ?>"<?php if ($k == $block->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>><?php /* @escapeNotVerified */ echo $v ?></option>
120+
<option value="<?php /* @noEscape */ echo $block->escapeHtml($k) ? $k : '' ?>"
121+
<?php if ($k == $block->getInfoData('cc_ss_start_year')): ?> selected="selected"<?php endif ?>>
122+
<?php echo $block->escapeHtml($v); ?>
123+
</option>
95124
<?php endforeach ?>
96125
</select>
97126
</div>
@@ -103,16 +132,16 @@
103132
require(['jquery', 'prototype'], function(jQuery){
104133

105134
//<![CDATA[
106-
SSChecked<?php /* @escapeNotVerified */ echo $_code ?> = function() {
107-
var elm = $('<?php /* @escapeNotVerified */ echo $_code ?>_cc_type');
135+
SSChecked<?php /* @noEscape */ echo $code; ?> = function() {
136+
var elm = $('<?php /* @noEscape */ echo $code; ?>_cc_type');
108137
if (['SS','SM','SO'].indexOf(elm.value) != -1) {
109-
jQuery('#' + '<?php /* @escapeNotVerified */ echo $_code ?>_cc_type_ss_div').show().removeClass('ignore-validate');
138+
jQuery('#' + '<?php /* @noEscape */ echo $code; ?>_cc_type_ss_div').show().removeClass('ignore-validate');
110139
} else {
111-
jQuery('#' + '<?php /* @escapeNotVerified */ echo $_code ?>_cc_type_ss_div').hide().addClass('ignore-validate');
140+
jQuery('#' + '<?php /* @noEscape */ echo $code; ?>_cc_type_ss_div').hide().addClass('ignore-validate');
112141
}
113142
};
114-
Event.observe($('<?php /* @escapeNotVerified */ echo $_code ?>_cc_type'), 'change', SSChecked<?php /* @escapeNotVerified */ echo $_code ?>);
115-
SSChecked<?php /* @escapeNotVerified */ echo $_code ?>();
143+
Event.observe($('<?php /* @noEscape */ echo $code; ?>_cc_type'), 'change', SSChecked<?php /* @noEscape */ echo $code; ?>);
144+
SSChecked<?php /* @noEscape */ echo $code; ?>();
116145
//]]>
117146

118147
});

app/code/Magento/Payment/view/adminhtml/templates/info/default.phtml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
*/
66

77
// @codingStandardsIgnoreFile
8-
9-
?>
10-
<?php
118
/**
9+
* @var \Magento\Payment\Block\Info $block
1210
* @see \Magento\Payment\Block\Info
1311
*/
1412
?>
15-
<?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?>
13+
<?php echo $block->escapeHtml($block->getMethod()->getTitle()); ?>
1614

1715
<?php if ($_specificInfo = $block->getSpecificInformation()):?>
18-
<table class="data-table admin__table-secondary">
19-
<?php foreach ($_specificInfo as $_label => $_value):?>
20-
<tr>
21-
<th><?php echo $block->escapeHtml($_label)?>:</th>
22-
<td><?php /* @escapeNotVerified */ echo nl2br(implode("\n", $block->getValueAsArray($_value, true)))?></td>
23-
</tr>
24-
<?php endforeach; ?>
25-
</table>
16+
<table class="data-table admin__table-secondary">
17+
<?php foreach ($specificInfo as $label => $value):?>
18+
<tr>
19+
<th><?php echo $block->escapeHtml($label)?>:</th>
20+
<td>
21+
<?php /* @noEscape */ echo nl2br($block->escapeHtml(implode("\n", $block->getValueAsArray($value, true))));?>
22+
</td>
23+
</tr>
24+
<?php endforeach; ?>
25+
</table>
2626
<?php endif;?>
2727

2828
<?php echo $block->getChildHtml()?>

app/code/Magento/Payment/view/adminhtml/templates/info/instructions.phtml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,18 @@
55
*/
66

77
// @codingStandardsIgnoreFile
8-
9-
?>
10-
<?php
118
/**
9+
* @var \Magento\Payment\Block\Info $block
1210
* @see \Magento\Payment\Block\Info
1311
*/
1412
?>
15-
<p><?php echo $block->escapeHtml($block->getMethod()->getTitle()) ?></p>
13+
<p><?php echo $block->escapeHtml($block->getMethod()->getTitle()); ?></p>
1614
<?php if ($block->getInstructions()): ?>
17-
<table>
18-
<tbody>
19-
<tr>
20-
<td><?php /* @escapeNotVerified */ echo nl2br($block->getInstructions()) ?></td>
21-
</tr>
22-
</tbody>
23-
</table>
15+
<table>
16+
<tbody>
17+
<tr>
18+
<td><?php /* @noEscape */ echo nl2br($block->escapeHtml($block->getInstructions())); ?></td>
19+
</tr>
20+
</tbody>
21+
</table>
2422
<?php endif; ?>

0 commit comments

Comments
 (0)