<commit_before>@model IntegrationsViewModel
@{
    var shopify = Model.Shopify;
    var shopifyCredsSet = shopify?.IntegratedAt.HasValue is true;
}
<form method="post" id="shopifyForm">
    <h4 class="mb-3">
        Shopify
        <a href="https://docs.btcpayserver.org/Shopify" target="_blank">
            <span class="fa fa-question-circle-o" title="More information..."></span>
        </a>
    </h4>
    @if (!shopifyCredsSet)
    {
        <p class="alert alert-info">Create a Shopify Private App with the permissions "Orders - Read and write"</p>

        <div class="form-group">
            <label for="exampleUrl">Example Url from Shopify Private App</label>
            <input class="form-control" id="exampleUrl" name="exampleUrl">
        </div>

        <button name="command" type="submit" class="btn btn-primary" value="ShopifySaveCredentials">Connect to Shopify</button>
    }
    else
    {
        <div class="form-group">
            <label asp-for="Shopify.ShopName"></label>
            <div class="input-group">
                @if (!Model.Shopify?.ShopName?.Contains(".") is true)
                {
                    <div class="input-group-prepend">
                        <span class="input-group-text">https://</span>
                    </div>
                }
                <input asp-for="Shopify.ShopName" class="form-control" readonly="@shopifyCredsSet" />

                @if (!Model.Shopify?.ShopName?.Contains(".") is true)
                {
                    <div class="input-group-append">
                        <span class="input-group-text">.myshopify.com</span>
                    </div>
                }
            </div>
            <span asp-validation-for="Shopify.ShopName" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="Shopify.ApiKey"></label>
            <input asp-for="Shopify.ApiKey" class="form-control" readonly="@shopifyCredsSet" />
            <span asp-validation-for="Shopify.ApiKey" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="Shopify.Password"></label>
            <input asp-for="Shopify.Password" class="form-control" type="password" value="@Model.Shopify?.Password" readonly="@shopifyCredsSet" />
            <span asp-validation-for="Shopify.Password" class="text-danger"></span>
        </div>
        @if (string.IsNullOrEmpty(shopify.ScriptId))
        {
            <div class="alert alert-warning">
                <p>
                    In Shopify please paste following script at <a href="https://satoshis-bakery.myshopify.com/admin/settings/checkout#PolarisTextField1" target="_blank" class="font-weight-bold"> Settings &gt; Checkout &gt; Order Processing &gt; Additional Scripts</a>
                </p>
                <kbd style="display: block; word-break: break-all;">
                    &lt;script src='https://btcpay151676.lndyn.com/stores/4mWitQRd4pdw4SRai6xRZnZB3Y4LbR953duK1kK58Hgh/integrations/shopify/shopify.js'&gt;&lt;/script&gt;
                </kbd>
            </div>
        }
        else
        {
            <p class="alert alert-success">Checkout scripts should be automatically added to the order status page to display the BTCPay payment option.</p>
        }
        <p class="alert alert-warning">
            In Shopify please add a payment method at <a target="_blank" href="https://satoshis-bakery.myshopify.com/admin/settings/payments" class="font-weight-bold"> Settings &gt; Payments &gt; Manual Payment Methods</a> with the name <kbd>Bitcoin with BTCPay Server</kbd>
        </p>

        <p class="alert alert-success">
            Orders on <b>@shopify.ShopName</b>.myshopify.com will be marked as paid on successful invoice payment.
            Started: @shopify.IntegratedAt.Value.ToBrowserDate()
        </p>
<commit_msg>Bugfixing references to shop, correcting them to be dynamic<commit_after>@model IntegrationsViewModel
@{
    var shopify = Model.Shopify;
    var shopifyCredsSet = shopify?.IntegratedAt.HasValue is true;
}
<form method="post" id="shopifyForm">
    <h4 class="mb-3">
        Shopify
        <a href="https://docs.btcpayserver.org/Shopify" target="_blank">
            <span class="fa fa-question-circle-o" title="More information..."></span>
        </a>
    </h4>
    @if (!shopifyCredsSet)
    {
        <p class="alert alert-info">Create a Shopify Private App with the permissions "Orders - Read and write"</p>

        <div class="form-group">
            <label for="exampleUrl">Example Url from Shopify Private App</label>
            <input class="form-control" id="exampleUrl" name="exampleUrl">
        </div>

        <button name="command" type="submit" class="btn btn-primary" value="ShopifySaveCredentials">Connect to Shopify</button>
    }
    else
    {
        <div class="form-group">
            <label asp-for="Shopify.ShopName"></label>
            <div class="input-group">
                @if (!Model.Shopify?.ShopName?.Contains(".") is true)
                {
                    <div class="input-group-prepend">
                        <span class="input-group-text">https://</span>
                    </div>
                }
                <input asp-for="Shopify.ShopName" class="form-control" readonly="@shopifyCredsSet" />

                @if (!Model.Shopify?.ShopName?.Contains(".") is true)
                {
                    <div class="input-group-append">
                        <span class="input-group-text">.myshopify.com</span>
                    </div>
                }
            </div>
            <span asp-validation-for="Shopify.ShopName" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="Shopify.ApiKey"></label>
            <input asp-for="Shopify.ApiKey" class="form-control" readonly="@shopifyCredsSet" />
            <span asp-validation-for="Shopify.ApiKey" class="text-danger"></span>
        </div>

        <div class="form-group">
            <label asp-for="Shopify.Password"></label>
            <input asp-for="Shopify.Password" class="form-control" type="password" value="@Model.Shopify?.Password" readonly="@shopifyCredsSet" />
            <span asp-validation-for="Shopify.Password" class="text-danger"></span>
        </div>
        @if (string.IsNullOrEmpty(shopify.ScriptId))
        {
            <div class="alert alert-warning">
                <p>
                    In Shopify please paste following script at <a href="https://@(shopify.ShopName).myshopify.com/admin/settings/checkout#PolarisTextField1" target="_blank" class="font-weight-bold"> Settings &gt; Checkout &gt; Order Processing &gt; Additional Scripts</a>
                </p>
                <kbd style="display: block; word-break: break-all;">
                    @($"<script src='{Url.Action("ShopifyJavascript", "Stores", new {storeId = Context.GetRouteValue("storeId")}, Context.Request.Scheme)}'></script>")
                </kbd>
            </div>
        }
        else
        {
            <p class="alert alert-success">Checkout scripts should be automatically added to the order status page to display the BTCPay payment option.</p>
        }
        <p class="alert alert-warning">
            In Shopify please add a payment method at <a target="_blank" href="https://@(shopify.ShopName).myshopify.com/admin/settings/payments" class="font-weight-bold"> Settings &gt; Payments &gt; Manual Payment Methods</a> with the name <kbd>Bitcoin with BTCPay Server</kbd>
        </p>

        <p class="alert alert-success">
            Orders on <b>@shopify.ShopName</b>.myshopify.com will be marked as paid on successful invoice payment.
            Started: @shopify.IntegratedAt.Value.ToBrowserDate()
        </p>

{'fraction_non_alphanumeric': 0.1440862976756132, 'fraction_numerical': 0.00333889816360601, 'mean_word_length': 2.2355629414208558, 'pattern_counts': {'":': 0, '<': 139, '<?xml version=': 0, '>': 139, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1558314', 'n_tokens_mistral': 2294, 'n_tokens_neox': 2214, 'n_words': 469}