64 lines
2.6 KiB
Smarty
64 lines
2.6 KiB
Smarty
{extends "index.tpl"}
|
|
|
|
{block "content"}
|
|
<div class="page-ordersuccess">
|
|
{if $payment.order}
|
|
<h1>{t}Objednávka č.{/t} {$payment.order.order_no}</h1>
|
|
<p>
|
|
{* nechci aby to bylo tlacitko pokud neprobehne platba, nemelo by to rozptylovat od tlacitka "prejit na plat. branu *}
|
|
<a class="{if $body.step == -2}btn btn-primary{/if}"
|
|
href="{$payment->order->getDetailUrl()}">{t}Zobrazit detail objednávky{/t}</a>
|
|
</p>
|
|
{/if}
|
|
|
|
{if $body.step >= 0 }
|
|
{* OK *}
|
|
{if $body.step == 1}
|
|
{* GoPay inline platební brána *}
|
|
<form class="text-center" action="{$payment->getGatewayUrl()}" method="post" id="gopay-payment-button">
|
|
<button name="pay" type="submit" class="btn btn-primary" id="gopay-payment-button-submit">{t}Zaplatit pomocí platební brány{/t}
|
|
</button>
|
|
<script type="text/javascript" src="{$payment->getEmbedScriptUrl()}"></script>
|
|
</form>
|
|
<div class="cleaner"></div>
|
|
{elseif $body.step == 3}
|
|
{* waiting - created payment *}
|
|
<div class="alert alert-danger" role="alert" style="margin: 20px auto;">
|
|
{t}Čekáme na potvrzení Vaší platby od platební brány{/t}.
|
|
</div>
|
|
<a href="{$payment->getPaymentUrl(4)}" class="">{t}Změnit platební metodu{/t}</a>
|
|
{else}
|
|
{* Other step, print message *}
|
|
{$body.message}
|
|
<br>
|
|
{/if}
|
|
|
|
{elseif $body.step == -1}
|
|
{* Finish Error *}
|
|
<div class="alert alert-danger" role="alert" style="margin: 20px auto;">
|
|
{t}Vyskytla se chyba při platbě{/t}: {$body.message}
|
|
</div>
|
|
<a href="{$payment->getPaymentUrl()}" class="btn btn-primary"
|
|
style="font-size: 1.5em; font-weight: 700;">{t}Přejít na platební bránu{/t}</a>
|
|
{elseif $body.step == -2}
|
|
{* Finish OK *}
|
|
<div class="alert alert-success" role="alert" style="margin: 20px auto;">
|
|
{$body.message}
|
|
</div>
|
|
{elseif $body.step == -3}
|
|
{* Finish Cancel *}
|
|
<div class="alert alert-danger" role="alert" style="margin: 20px auto;">
|
|
{t}Platba byla stornována{/t}.
|
|
</div>
|
|
<a href="{$payment->getPaymentUrl()}" class="btn btn-primary"
|
|
style="font-size: 1.5em; font-weight: 700;">{t}Přejít na platební bránu{/t}</a>
|
|
{/if}
|
|
</div>
|
|
{/block}
|
|
|
|
<script>
|
|
{block onready append}
|
|
$('#gopay-payment-button-submit').trigger('click');
|
|
{/block}
|
|
</script>
|