Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-authorizenet
view
adminhtml
templates
directpost
info.phtml
Go to the documentation of this file.
1
<?php
7
// @codingStandardsIgnoreFile
12
$code
=
$block
->escapeHtml(
$block
->getMethodCode());
13
$method
=
$block
->getMethod();
14
$controller
=
$block
->escapeHtml(
$block
->getRequest()->getControllerName());
15
$orderUrl
=
$block
->escapeUrl($this->helper(
'Magento\Authorizenet\Helper\Backend\Data'
)->getPlaceOrderAdminUrl());
16
$ccType
=
$block
->getInfoData(
'cc_type'
);
17
$ccExpMonth
=
$block
->getInfoData(
'cc_exp_month'
);
18
$ccExpYear
=
$block
->getInfoData(
'cc_exp_year'
);
19
?>
20
<!-- IFRAME
for
request to our server -->
21
<iframe
id
=
"order-directpost-iframe"
allowtransparency=
"true"
frameborder=
"0"
name
=
"iframeSubmitOrder"
22
style=
"display:none;width:100%;background-color:transparent"
23
src=
"<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"
>
24
</iframe>
25
<!-- IFRAME
for
request to Authorize.net -->
26
<iframe
id
=
"directpost-iframe"
allowtransparency=
"true"
frameborder=
"0"
name
=
"iframeDirectPost"
27
style=
"display:none;width:100%;background-color:transparent"
28
src=
"<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"
>
29
</iframe>
30
<fieldset
class
=
"admin__fieldset payment-method"
id
=
"payment_form_<?= /* @noEscape */ $code ?>"
31
style=
"display:none;"
>
32
<div
class
=
"admin__field _required"
>
33
<label
for
=
"<?= /* @noEscape */ $code ?>_cc_type"
class
=
"admin__field-label"
>
34
<span><?=
$block
->escapeHtml(
__
(
'Credit Card Type'
)) ?></span>
35
</label>
36
<div
class
=
"admin__field-control"
>
37
<select
id
=
"<?= /* @noEscape */ $code ?>_cc_type"
name
=
"payment[cc_type]"
38
class
=
"admin__control-select"
39
data-validate=
"{
40
'required':true,
41
'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
42
}"
>
43
<option
value
=
""
><?=
$block
->escapeHtml(
__
(
'Please Select'
)) ?></option>
44
<?php
foreach
(
$block
->getCcAvailableTypes() as $typeCode => $typeName): ?>
45
<option
value
=
"<?= $block->escapeHtml($typeCode) ?>"
46
<?php
if
($typeCode ==
$ccType
): ?>selected=
"selected"
<?php
endif
; ?>>
47
<?=
$block
->escapeHtml($typeName) ?>
48
</option>
49
<?php
endforeach
; ?>
50
</select>
51
</div>
52
</div>
53
54
<div
class
=
"admin__field _required"
>
55
<label
for
=
"<?= /* @noEscape */ $code ?>_cc_number"
class
=
"admin__field-label"
>
56
<span><?=
$block
->escapeHtml(
__
(
'Credit Card Number'
)) ?></span>
57
</label>
58
<div
class
=
"admin__field-control"
>
59
<input type=
"text"
id
=
"<?= /* @noEscape */ $code ?>_cc_number"
60
name
=
"payment[cc_number]"
61
data-validate=
"{
62
'required-number':true,
63
'validate-cc-number':'#<?= /* @noEscape */ $code ?>_cc_type',
64
'validate-cc-type':'#<?= /* @noEscape */ $code ?>_cc_type'
65
}"
66
class
=
"admin__control-text"
67
value
=
"<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"
/>
68
</div>
69
</div>
70
71
<div
class
=
"admin__field _required field-date"
id
=
"<?= /* @noEscape */ $code ?>_cc_type_exp_div"
>
72
<label
for
=
"<?= /* @noEscape */ $code ?>_expiration"
class
=
"admin__field-label"
>
73
<span><?=
$block
->escapeHtml(
__
(
'Expiration Date'
)) ?></span>
74
</label>
75
76
<div
class
=
"admin__field-control"
>
77
<select
id
=
"<?= /* @noEscape */ $code ?>_expiration"
78
name
=
"payment[cc_exp_month]"
79
class
=
"admin__control-select admin__control-select-month"
80
data-validate=
"{
81
'required':true,
82
'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
83
}"
>
84
<?php
foreach
(
$block
->getCcMonths() as $k => $v): ?>
85
<option
value
=
"<?= $block->escapeHtml($k) ?>"
86
<?php
if
($k ==
$ccExpMonth
): ?>selected=
"selected"
<?php
endif
; ?>>
87
<?=
$block
->escapeHtml($v) ?>
88
</option>
89
<?php
endforeach
; ?>
90
</select>
91
<select
id
=
"<?= /* @noEscape */ $code ?>_expiration_yr"
92
name
=
"payment[cc_exp_year]"
93
class
=
"admin__control-select admin__control-select-year"
94
data-container=
"<?= /* @noEscape */ $code ?>-cc-year"
95
data-validate=
"{required:true}"
>
96
<?php
foreach
(
$block
->getCcYears() as $k => $v): ?>
97
<option
value
=
"<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
98
<?php
if
($k ==
$ccExpYear
): ?>selected=
"selected"
<?php
endif
; ?>>
99
<?=
$block
->escapeHtml($v) ?>
100
</option>
101
<?php
endforeach
; ?>
102
</select>
103
</div>
104
</div>
105
106
<?php
if
(
$block
->hasVerification()): ?>
107
<div
class
=
"admin__field _required field-cvv"
>
108
<label
class
=
"admin__field-label"
109
for
=
"<?= /* @noEscape */ $code ?>_cc_cid"
110
id
=
"<?= /* @noEscape */ $code ?>_cc_type_cvv_div"
>
111
<span><?=
$block
->escapeHtml(
__
(
'Card Verification Number'
)) ?></span>
112
</label>
113
114
<div
class
=
"admin__field-control"
>
115
<input type=
"text"
116
data-container=
"<?= /* @noEscape */ $code ?>-cc-cvv"
117
title=
"<?= $block->escapeHtml(__('Card Verification Number')) ?>"
118
class
=
"admin__control-text cvv"
119
id
=
"<?= /* @noEscape */ $code ?>_cc_cid"
name
=
"payment[cc_cid]"
120
value
=
"<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"
121
data-validate=
"{
122
'required-number':true,
123
'validate-cc-cvn':'#<?= /* @noEscape */ $code ?>_cc_type'
124
}"
125
autocomplete=
"off"
/>
126
</div>
127
</div>
128
<?php
endif
; ?>
129
</fieldset>
130
<script>
131
require([
132
'prototype'
,
133
'Magento_Sales/order/create/scripts'
,
134
'Magento_Sales/order/create/form'
,
135
'Magento_Authorizenet/js/direct-post'
136
],
function
(){
137
141
order.addExcludedPaymentMethod(
'<?= /* @noEscape */ $code ?>'
);
142
143
directPostModel =
new
directPost(
144
'<?= /* @noEscape */ $code ?>'
,
145
'directpost-iframe'
,
146
'<?= /* @noEscape */ $controller ?>'
,
147
'<?= /* @noEscape */ $orderUrl ?>'
,
148
'<?= $block->escapeUrl($method->getCgiUrl()) ?>'
,
149
'<?= $block->escapeUrl($block->getUrl('
*
/*/save', [
150
'_secure' => $block->getRequest()->isSecure()
151
]));?>');
152
});
153
</script>
$orderUrl
$orderUrl
Definition:
info.phtml:15
value
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition:
block.php:9
endforeach
endforeach
Definition:
info.phtml:47
endif
foreach( $block->getCcAvailableTypes() as $typeCode=> $typeName)( $typeCode) ?>" <?php if ($typeCode endif
Definition:
info.phtml:44
$ccExpYear
$ccExpYear
Definition:
info.phtml:18
__
__()
Definition:
__.php:13
$block
$block
Definition:
block.php:8
name
$ccExpMonth
$ccExpMonth
Definition:
info.phtml:17
$method
$method
Definition:
info.phtml:13
$ccType
$ccType
Definition:
info.phtml:16
$controller
$controller
Definition:
info.phtml:14
$code
$code
Definition:
info.phtml:12