mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 06:21:44 +01:00
* updates * updates * updates * updates * updates * moves api key CTA to top right * updates * more updates * more updates * Fix active state when "Account" is selected * Update wording in subnav: Profile becomes Account * Fix email test * Update Emails wording * Try to fix email test * Make General first tab in store settings Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
85 lines
3.8 KiB
Text
85 lines
3.8 KiB
Text
@using BTCPayServer.Views.Stores
|
|
@using BTCPayServer.Abstractions.Extensions
|
|
@model BTCPayServer.Plugins.Shopify.Models.ShopifySettings
|
|
@{
|
|
ViewData.SetActivePage("shopify", nameof(StoreNavPages), "Shopify", Context.GetStoreData().Id);
|
|
|
|
var shopifyCredsSet = Model?.IntegratedAt.HasValue is true;
|
|
var shopifyUrl = Model?.ShopifyUrl;
|
|
}
|
|
|
|
<partial name="_StatusMessage"/>
|
|
|
|
<h2 class="mt-1 mb-4">
|
|
@ViewData["Title"]
|
|
<small>
|
|
<a href="https://docs.btcpayserver.org/Shopify" target="_blank" rel="noreferrer noopener">
|
|
<span class="fa fa-question-circle-o text-secondary" title="More information..."></span>
|
|
</a>
|
|
</small>
|
|
</h2>
|
|
<form method="post" id="shopifyForm">
|
|
@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 class="form-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 mt-3" value="ShopifySaveCredentials">Connect to Shopify</button>
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group">
|
|
<label asp-for="ShopName" class="form-label"></label>
|
|
<div class="input-group">
|
|
@if (!Model?.ShopName?.Contains(".") is true)
|
|
{
|
|
<span class="input-group-text">https://</span>
|
|
}
|
|
<input asp-for="ShopName" class="form-control" readonly="@shopifyCredsSet"/>
|
|
|
|
@if (!Model?.ShopName?.Contains(".") is true)
|
|
{
|
|
<span class="input-group-text">.myshopify.com</span>
|
|
}
|
|
</div>
|
|
<span asp-validation-for="ShopName" class="text-danger"></span>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label asp-for="ApiKey" class="form-label"></label>
|
|
<input asp-for="ApiKey" class="form-control" readonly="@shopifyCredsSet"/>
|
|
<span asp-validation-for="ApiKey" class="text-danger"></span>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label asp-for="Password" class="form-label"></label>
|
|
<input asp-for="Password" class="form-control" type="password" value="@Model?.Password" readonly="@shopifyCredsSet"/>
|
|
<span asp-validation-for="Password" class="text-danger"></span>
|
|
</div>
|
|
<div class="alert alert-warning">
|
|
<p>
|
|
In Shopify please paste following script at <a href="@shopifyUrl/admin/settings/checkout#PolarisTextField1" target="_blank" class="fw-bold" rel="noreferrer noopener"> Settings > Checkout > Order Processing > Additional Scripts</a>
|
|
</p>
|
|
<kbd style="display: block; word-break: break-all;">
|
|
@($"<script src='{Url.Action("ShopifyJavascript", "UIShopify", new { storeId = Context.GetRouteValue("storeId") }, Context.Request.Scheme)}'></script>")
|
|
</kbd>
|
|
</div>
|
|
<p class="alert alert-warning">
|
|
In Shopify please add a payment method at <a target="_blank" href="@shopifyUrl/admin/settings/payments" class="fw-bold" rel="noreferrer noopener"> Settings > Payments > Manual Payment Methods</a> with the name <kbd>Bitcoin with BTCPay Server</kbd>
|
|
</p>
|
|
|
|
<p class="alert alert-success">
|
|
Orders on <b>@Model.ShopName</b>.myshopify.com will be marked as paid on successful invoice payment.
|
|
Started: @Model.IntegratedAt.Value.ToBrowserDate()
|
|
</p>
|
|
|
|
<button name="command" type="submit" class="btn btn-danger mt-3" value="ShopifyClearCredentials">
|
|
Stop Shopify calls and clear credentials
|
|
</button>
|
|
}
|
|
|
|
</form>
|