[{d3modcfgcheck modid="d3heidelpay"}]
[{/d3modcfgcheck}]

[{if $mod_d3heidelpay}]
    [{if $oHeidelpayViewConfig && $oHeidelpayViewConfig->getPaymentError() == -99}]
        [{assign var="hppayerror" value=$oHeidelpayViewConfig->getHeidelpayErrorText()}]

        [{if $oView->d3CheckForMobileTheme() == false}]
            <div class="status error">
                <div>[{oxmultilang ident="D3PAYMENT_EXT_ERROR"}]</div>
                [{if $hppayerror.OXCODE}]
                    [{assign var="langident" value=$hppayerror.OXCODE}]
                    <h3 style="color:#AA0000;">[{oxmultilang ident="d3heidelpay_$langident"}]</h3>
                [{else}]
                    <h3 style="color:#AA0000;">[{oxmultilang ident="D3PAYMENT_EXT_NOTEXT"}]</h3>
                [{/if}]

                [{if $hppayerror.OXTYPE == "1"}]    [{* Fehlerkategorie: Eingabefehler *}]
                    <div>[{oxmultilang ident="D3PAYMENT_EXT_CHECK"}]</div>
                [{elseif $hppayerror.OXTYPE == "2"}]    [{* Fehlerkategorie: Technischer Fehler *}]
                    <div>[{oxmultilang ident="D3PAYMENT_EXT_TRYLATER"}]</div>
                [{elseif $hppayerror.OXTYPE == "3"}]    [{* Fehlerkategorie: Betrugsversuch? *}]
                    <div>[{oxmultilang ident="D3PAYMENT_EXT_CHANGEPAYMENT"}]</div>
                [{/if}]
            </div>

        [{else}]
            [{assign var="iPayError" value=$oView->getPaymentError()}]
            <div class="payment-row">
                [{assign var="sPayErrorClass" value='alert alert-error'}]
                [{if $hppayerror.OXCODE}]
                    [{assign var="langident" value=$hppayerror.OXCODE}]
                    <div class="[{$sPayErrorClass}]">[{oxmultilang ident="d3heidelpay_$langident"}]</div>
                [{else}]
                    <div class="[{$sPayErrorClass}]">[{oxmultilang ident="D3PAYMENT_EXT_NOTEXT"}]</div>
                [{/if}]

                [{if $hppayerror.OXTYPE == "1"}]    [{* Fehlerkategorie: Eingabefehler *}]
                    <div class="[{$sPayErrorClass}]">[{oxmultilang ident="D3PAYMENT_EXT_CHECK"}]</div>
                [{elseif $hppayerror.OXTYPE == "2"}]    [{* Fehlerkategorie: Technischer Fehler *}]
                    <div class="[{$sPayErrorClass}]">[{oxmultilang ident="D3PAYMENT_EXT_TRYLATER"}]</div>
                [{elseif $hppayerror.OXTYPE == "3"}]    [{* Fehlerkategorie: Betrugsversuch? *}]
                    <div class="[{$sPayErrorClass}]">[{oxmultilang ident="D3PAYMENT_EXT_CHANGEPAYMENT"}]</div>
                [{/if}]
            </div>

        [{/if}]
    [{else}]
        [{$smarty.block.parent}]
    [{/if}]
[{else}]
    [{$smarty.block.parent}]
[{/if}]
