123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- // @codingStandardsIgnoreFile
- /** @var \Magento\Payment\Block\Transparent\Form $block */
- $code = $block->escapeHtml($block->getMethodCode());
- $ccExpMonth = $block->getInfoData('cc_exp_month');
- $ccExpYear = $block->getInfoData('cc_exp_year');
- $ccType = $block->getInfoData('cc_type');
- $content = '<img src=\"' . $block->getViewFileUrl('Magento_Checkout::cvv.png') . '\" alt=\"' .
- $block->escapeHtml(__('Card Verification Number Visual Reference')) . '\" title=\"' .
- $block->escapeHtml(__('Card Verification Number Visual Reference')) . '\" />';
- ?>
- <!-- IFRAME for request to Payment Gateway -->
- <iframe width="0" height="0" id="<?= /* @noescape */ $code ?>-transparent-iframe"
- data-container="<?= /* @noEscape */ $code ?>-transparent-iframe" allowtransparency="true"
- frameborder="0" name="iframeTransparent" style="display:none;width:100%;background-color:transparent"
- src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>"></iframe>
- <form class="form" id="co-transparent-form" action="#" method="post" data-mage-init='{
- "transparent":{
- "controller":"<?= $block->escapeHtml($block->getRequest()->getControllerName()) ?>",
- "gateway":"<?= /* @noEscape */ $code ?>",
- "orderSaveUrl":"<?= $block->escapeUrl($block->getOrderUrl()) ?>",
- "cgiUrl":"<?= $block->escapeUrl($block->getCgiUrl()) ?>",
- "dateDelim":"<?= $block->escapeHtml($block->getDateDelim()) ?>",
- "cardFieldsMap":<?= $block->escapeHtml($block->getCardFieldsMap()) ?>,
- "nativeAction":"<?= $block->escapeUrl($block->getUrl('checkout/onepage/saveOrder', ['_secure' => $block->getRequest()->isSecure()])) ?>"
- }, "validation":[]}'>
- <fieldset class="fieldset ccard <?= /* @noEscape */ $code ?>" id="payment_form_<?= /* @noEscape */ $code ?>">
- <legend class="legend">
- <span><?= $block->escapeHtml(__('Credit Card Information')) ?></span>\
- </legend><br />
- <div class="field required type">
- <label for="<?= /* @noEscape */ $code ?>_cc_type" class="label">
- <span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
- </label>
- <div class="control">
- <select id="<?= /* @noEscape */ $code ?>_cc_type" data-container="<?= /* @noEscape */ $code ?>-cc-type"
- name="payment[cc_type]"
- data-validate='{
- required:true,
- "validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"
- }'>
- <option value=""><?= $block->escapeHtml(__('--Please Select--')) ?></option>
- <?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
- <option value="<?= $block->escapeHtml($typeCode) ?>"
- <?php if ($typeCode == $ccType): ?> selected="selected"<?php endif; ?>>
- <?= $block->escapeHtml($typeName) ?></option>
- <?php endforeach ?>
- </select>
- </div>
- </div>
- <div class="field required number">
- <label for="<?= /* @noEscape */ $code ?>_cc_number" class="label">
- <span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
- </label>
- <div class="control">
- <input type="number" id="<?= /* @noEscape */ $code ?>_cc_number"
- data-container="<?= /* @noEscape */ $code ?>-cc-number" name="payment[cc_number]"
- title="<?= $block->escapeHtml(__('Credit Card Number')) ?>" class="input-text" value=""
- data-validate='{
- "required-number":true,
- "validate-cc-number":"#<?= /* @noEscape */ $code ?>_cc_type",
- "validate-cc-type":"#<?= /* @noEscape */ $code ?>_cc_type"
- }'
- autocomplete="off"/>
- </div>
- </div>
- <div class="field required date" id="<?= /* @noEscape */ $code ?>_cc_type_exp_div">
- <label for="<?= /* @noEscape */ $code ?>_expiration" class="label">
- <span><?= $block->escapeHtml(__('Expiration Date')) ?></span>
- </label>
- <div class="control">
- <div class="fields group group-2">
- <div class="field no-label month">
- <div class="control">
- <select id="<?= /* @noEscape */ $code ?>_expiration" name="payment[cc_exp_month]"
- data-container="<?= /* @noEscape */ $code ?>-cc-month" class="month"
- data-validate='{
- required:true,
- "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"
- }'>
- <?php foreach ($block->getCcMonths() as $k => $v): ?>
- <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
- <?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
- <?= $block->escapeHtml($v) ?>
- </option>
- <?php endforeach ?>
- </select>
- </div>
- </div>
- <div class="field no-label year">
- <div class="control">
- <select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
- class="year" data-container="<?= /* @noEscape */ $code ?>-cc-year"
- data-validate='{required:true}'>
- <?php foreach ($block->getCcYears() as $k => $v): ?>
- <option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
- <?php if ($k == $ccExpYear): ?> selected="selected"<?php endif; ?>>
- <?= $block->escapeHtml($v) ?>
- </option>
- <?php endforeach ?>
- </select>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php if ($block->hasVerification()): ?>
- <div class="field required cvv" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
- <label for="<?= /* @noEscape */ $code ?>_cc_cid" class="label">
- <span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
- </label>
- <div class="control">
- <input type="number" title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
- data-container="<?= /* @noEscape */ $code ?>-cc-cvv" class="input-text cvv"
- id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]" value=""
- data-validate='{
- "required-number":true,
- "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"
- }' autocomplete="off"/>
- <div class="note">
- <a href="#" id="<?= /* @noEscape */ $code ?>-cvv-what-is-this" class="action cvv"
- title="<?= $block->escapeHtml(__('What is this?')) ?>" data-mage-init='{
- "tooltip": {"content": "<?= /* @noEscape */ $content ?>"}
- }'>
- <span><?= $block->escapeHtml(__('What is this?')) ?></span>
- </a>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?= $block->getChildHtml() ?>
- </fieldset>
- </form>
|