mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Fix checkout page
This commit is contained in:
@@ -112,6 +112,7 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
var model = new PaymentModel()
|
var model = new PaymentModel()
|
||||||
{
|
{
|
||||||
|
ServerUrl = HttpContext.Request.GetAbsoluteRoot(),
|
||||||
OrderId = invoice.OrderId,
|
OrderId = invoice.OrderId,
|
||||||
InvoiceId = invoice.Id,
|
InvoiceId = invoice.Id,
|
||||||
BTCAddress = invoice.DepositAddress.ToString(),
|
BTCAddress = invoice.DepositAddress.ToString(),
|
||||||
|
|||||||
@@ -11,7 +11,10 @@ namespace BTCPayServer.Models.InvoicingModels
|
|||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
public string ServerUrl
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
public string OrderId
|
public string OrderId
|
||||||
{
|
{
|
||||||
get; set;
|
get; set;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
var serverUrl = "@Model.ServerUrl";
|
||||||
var invoiceId = "@Model.InvoiceId";
|
var invoiceId = "@Model.InvoiceId";
|
||||||
var btcAddress = "@Model.BTCAddress";
|
var btcAddress = "@Model.BTCAddress";
|
||||||
var btcDue = "@Model.BTCDue"; //must be a string
|
var btcDue = "@Model.BTCDue"; //must be a string
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ function emailForm() {
|
|||||||
// Push the email to a server, once the reception is confirmed move on
|
// Push the email to a server, once the reception is confirmed move on
|
||||||
customerEmail = emailAddress;
|
customerEmail = emailAddress;
|
||||||
|
|
||||||
var path = "i/" + invoiceId + "/UpdateCustomer";
|
var path = serverUrl + "/i/" + invoiceId + "/UpdateCustomer";
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: path,
|
url: path,
|
||||||
@@ -192,7 +192,7 @@ function updateState(status) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var watcher = setInterval(function () {
|
var watcher = setInterval(function () {
|
||||||
var path = "i/" + invoiceId + "/status";
|
var path = serverUrl + "/i/" + invoiceId + "/status";
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: path,
|
url: path,
|
||||||
type: "GET"
|
type: "GET"
|
||||||
|
|||||||
Reference in New Issue
Block a user