[{assign var="dynvalue" value=$oView->getDynValue()}]
[{assign var="sImageUrl" value=$oViewConf->getModuleUrl('d3heidelpay','out/img/')}]

[{if $oHeidelpayViewConfig->isPaymentUseInputAfterStep4($paymentmethod->getId())}]
    [{include file="payment_inc_afterstep4_info.tpl"}]
[{elseif $oView->hasUserHPStoreData($paymentmethod->getId())}]
    [{include file="payment_inc_storeduid.tpl"}]
[{else}]
    [{assign var='oHeidelPaySettings' value=$oHeidelpayViewConfig->getSettings()}]
    [{assign var='oHeidelPayment' value=$oHeidelPaySettings->getPayment($paymentmethod)}]
    [{assign var="aBrands" value=$oHeidelpayViewConfig->getHeidelpayNgwBrands($paymentmethod, $oHeidelPayment, $oxcmp_user)}]
    <dl>
        <dt>
            <input id="payment_[{$sPaymentID}]"
                   type="radio"
                   name="paymentid"
                   value="[{$sPaymentID}]"
                   [{if $oView->getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]checked[{/if}]>
            <label for="payment_[{$sPaymentID}]"><b>[{$paymentmethod->oxpayments__oxdesc->value}]</b></label>

            [{foreach from=$aBrands item='sBrandName' key='sBrandIdent'}]
                [{if $sBrandIdent == 'MASTER'}]<img src="[{$sImageUrl}]logo_master.jpg" alt="Mastercard" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'VISA'}]<img src="[{$sImageUrl}]logo_visa.jpg" alt="Visa" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'AMEX'}]<img src="[{$sImageUrl}]logo_amex.jpg" alt="AmEx" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'DINERS'}]<img src="[{$sImageUrl}]logo_diners.jpg" alt="DINERS" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'DISCOVERY'}]<img src="[{$sImageUrl}]logo_discover.jpg" alt="DISCOVERY" style="vertical-align: middle;">[{/if}]
            [{/foreach}]
        </dt>
        <dd class="[{if $oView->getCheckedPaymentId() == $paymentmethod->oxpayments__oxid->value}]activePayment[{/if}]">
            <ul class="form">
                <li>
                    <label>[{oxmultilang ident="D3HEIDELPAY_PAYMENT_INPUT_CREDITCARD"}]</label>
                    <select name="ACCOUNT.BRAND">
                        <option value="">[{oxmultilang ident="D3PAYMENT_EXT_SELECTPLEASE"}]</option>
                        [{foreach from=$aBrands item='sBrandName' key='sBrandIdent'}]
                            <option value="[{$sBrandIdent}]" [{if ($dynvalue.kktype == $sBrandIdent)}]selected[{/if}]>[{$sBrandName}]</option>
                        [{/foreach}]
                    </select>
                </li>
                <li>
                    <label>[{oxmultilang ident="D3HEIDELPAY_PAYMENT_INPUT_NUMBER"}]</label>
                    <input type="text"
                           class="js-oxValidate js-oxValidate_notEmpty"
                           size="20"
                           maxlength="64"
                           name="ACCOUNT.NUMBER"
                           value="">

                    <p class="oxValidateError">
                        <span class="js-oxError_notEmpty">[{oxmultilang ident="D3HEIDELPAY_PAYMENT_PAGE_EXCEPTION_INPUT_NOTALLFIELDS"}]</span>
                    </p>
                </li>
                <li>
                    <label>[{oxmultilang ident="D3HEIDELPAY_PAYMENT_INPUT_CARDHOLDER"}]</label>
                    <input type="text"
                           size="20"
                           class="js-oxValidate js-oxValidate_notEmpty"
                           maxlength="64"
                           name="ACCOUNT.HOLDER"
                           value="[{if $dynvalue.kkname}][{$dynvalue.kkname}][{else}][{$oxcmp_user->oxuser__oxfname->value}] [{$oxcmp_user->oxuser__oxlname->value}][{/if}]">

                    <p class="oxValidateError">
                        <span class="js-oxError_notEmpty">[{oxmultilang ident="D3HEIDELPAY_PAYMENT_PAGE_EXCEPTION_INPUT_NOTALLFIELDS"}]</span>
                    </p>
                    <br>

                    <div class="note">[{oxmultilang ident="D3HEIDELPAY_PAYMENT_IF_DIFFERENT_FROM_BILLING_ADDRESS"}]</div>
                </li>
                <li>
                    <label>[{oxmultilang ident="D3HEIDELPAY_PAYMENT_INPUT_VALID_UNTIL"}]</label>
                    <select name="ACCOUNT.EXPIRY_MONTH">
                        <option [{if $dynvalue.kkmonth == "01"}]selected[{/if}]>01</option>
                        <option [{if $dynvalue.kkmonth == "02"}]selected[{/if}]>02</option>
                        <option [{if $dynvalue.kkmonth == "03"}]selected[{/if}]>03</option>
                        <option [{if $dynvalue.kkmonth == "04"}]selected[{/if}]>04</option>
                        <option [{if $dynvalue.kkmonth == "05"}]selected[{/if}]>05</option>
                        <option [{if $dynvalue.kkmonth == "06"}]selected[{/if}]>06</option>
                        <option [{if $dynvalue.kkmonth == "07"}]selected[{/if}]>07</option>
                        <option [{if $dynvalue.kkmonth == "08"}]selected[{/if}]>08</option>
                        <option [{if $dynvalue.kkmonth == "09"}]selected[{/if}]>09</option>
                        <option [{if $dynvalue.kkmonth == "10"}]selected[{/if}]>10</option>
                        <option [{if $dynvalue.kkmonth == "11"}]selected[{/if}]>11</option>
                        <option [{if $dynvalue.kkmonth == "12"}]selected[{/if}]>12</option>
                    </select>

                    &nbsp;/&nbsp;

                    <select name="ACCOUNT.EXPIRY_YEAR">
                        [{foreach from=$oView->getCreditYears() item=year}]
                            <option [{if $dynvalue.kkyear == $year}]selected[{/if}]>[{$year}]</option>
                        [{/foreach}]
                    </select>
                </li>
                <li>
                    <label>[{oxmultilang ident="D3HEIDELPAY_PAYMENT_INPUT_CARD_SECURITY_CODE"}]</label>
                    <input type="text"
                           class="js-oxValidate js-oxValidate_notEmpty"
                           size="6"
                           maxlength="4"
                           name="ACCOUNT.VERIFICATION"
                           value="">

                    <p class="oxValidateError">
                        <span class="js-oxError_notEmpty">[{oxmultilang ident="D3HEIDELPAY_PAYMENT_PAGE_EXCEPTION_INPUT_NOTALLFIELDS"}]</span>
                    </p>
                    <br>

                    <div class="note">
                        [{oxmultilang ident="D3PAYMENT_SECURITYCODEDESCRIPTION"}]
                        [{if $aCCTypes.AMEX}]
                            [{oxmultilang ident="D3PAYMENT_SECURITYCODEDESCRIPTION_AMEX"}]
                        [{/if}]
                    </div>

                    <div class="note">
                        <img src="[{$sImageUrl}]pruefziffer_visa.jpg" alt="visa">
                        [{if $aCCTypes.AMEX}]
                            <img src="[{$sImageUrl}]pruefziffer_amex.jpg" alt="visa">
                        [{/if}]
                    </div>
                </li>
            </ul>

            [{if $paymentmethod->oxpayments__oxlongdesc->value}]
                <div class="desc">
                    [{$paymentmethod->oxpayments__oxlongdesc->value}]
                </div>
            [{/if}]
        </dd>
    </dl>
[{/if}]
