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()
{
ServerUrl = HttpContext.Request.GetAbsoluteRoot(),
OrderId = invoice.OrderId,
InvoiceId = invoice.Id,
BTCAddress = invoice.DepositAddress.ToString(),

View file

@ -11,7 +11,10 @@ namespace BTCPayServer.Models.InvoicingModels
{
get; set;
}
public string ServerUrl
{
get; set;
}
public string OrderId
{
get; set;

View file

@ -27,6 +27,7 @@
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>
<script type="text/javascript">
var serverUrl = "@Model.ServerUrl";
var invoiceId = "@Model.InvoiceId";
var btcAddress = "@Model.BTCAddress";
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
customerEmail = emailAddress;
var path = "i/" + invoiceId + "/UpdateCustomer";
var path = serverUrl + "/i/" + invoiceId + "/UpdateCustomer";
$.ajax({
url: path,
@ -192,7 +192,7 @@ function updateState(status) {
}
var watcher = setInterval(function () {
var path = "i/" + invoiceId + "/status";
var path = serverUrl + "/i/" + invoiceId + "/status";
$.ajax({
url: path,
type: "GET"