Fix checkout page

This commit is contained in:
nicolas.dorier
2017-10-19 01:33:55 +09:00
parent ff719fbe2d
commit 1a060a6c7b
4 changed files with 8 additions and 3 deletions

View File

@@ -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(),

View File

@@ -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;

View File

@@ -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

View File

@@ -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"