[{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 == 'VISAELECTRON'}]<img src="[{$sImageUrl}]logo_visaelectron.jpg" alt="VisaElectron" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'MAESTRO'}]<img src="[{$sImageUrl}]logo_maestro.jpg" alt="Maestro" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'CARTEBLEUE'}]<img src="[{$sImageUrl}]logo_cartebleue.jpg" alt="CarteBleue" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'SOLO'}]<img src="[{$sImageUrl}]logo_solo.jpg" alt="Solo" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'POSTEPAY'}]<img src="[{$sImageUrl}]logo_postepay.jpg" alt="Postepay" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'EURO6000'}]<img src="[{$sImageUrl}]logo_euro6000.jpg" alt="Euro6000" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'SERVIRED'}]<img src="[{$sImageUrl}]logo_servired.jpg" alt="ServiRed" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == '4B'}]<img src="[{$sImageUrl}]logo_4b.jpg" alt="4B" style="vertical-align: middle;">[{/if}]
                [{if $sBrandIdent == 'DANKORT'}]<img src="[{$sImageUrl}]logo_dankort.jpg" alt="Dankort" 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" class="js-oxValidate js-oxValidate_notEmpty">
                        <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>

                    <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_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"}]
                    </div>

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

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