HEX
Server: LiteSpeed
System: Linux s917.lon1.mysecurecloudhost.com 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: assibfaf (3034)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/assibfaf/public_html/prox-templates/checkout/dooglepay.order.tpl
<!doctype html>
<html lang="en">
    <head>
        {block name='head'}
            {include file='_partials/head.tpl'}
        {/block}
        <link rel="canonical" href="/dashboard/authorization/">
    </head>
<body>

    <div class="form-container">
        <div id="payment-form">
            <div class="form-header">
                <h1 class="Header-companyName">{$site_title}</h1>
                <h2 class="Header-purchaseDescription">{$order.paperTypeTitle}</h2>
            </div>
            <div class="form-body">
                <div class="alert alert-info">
                    On a successful payment your order status will change to <b>"Looking For Writer"</b> in about a minute.
                </div>
                <button id="pay_btn" class="pay_btn" type="submit">Pay {$price_formatted}</button>
                <a class="back_to_order" href="/dashboard/order/{$order.id}">Back to Order</a>
            </div>
        </div> 
    </div>

    <script>window.jQuery || document.write('<script src="/static/common/libs/jquery/3.2.1/jquery.min.js"><\/script>')</script>

    <script src="https://js.dooglepay.com"></script>

    {block name='javascript_bottom'}
        {include file="_partials/javascript.tpl" javascript=$javascript.bottom}
    {/block}
    
    {block name="js"}
        <script type="text/javascript">
            const pay_btn = document.getElementById("pay_btn");
            pay_btn.onclick = function() {
                const payment = dooglepay({
                    key: "{$dooglepay_api_key}",
                    amount: {$price*100},
                    currency: "{$currency}",
                    methods: ["card"],
                    reference: '{$order.id}',
                    webhook: "{$dooglepay_hook}",
                    onCharge(transactionId) {
                        window.location = '{$successfulurlredirect}';
                    },
                    onError(e) {
                    },
                    onCancel() {
                        window.location = '{$redirectUri}';
                    }
                });
            };
        </script>
    {/block}

</body>
</html>