From 2b6faa8d20f625b631748c8a5a919f9d6069b73c Mon Sep 17 00:00:00 2001 From: rockstardev Date: Wed, 22 Aug 2018 14:05:12 +0200 Subject: [PATCH] Migrating generator to work on store path --- BTCPayServer/Views/Stores/PayButton.cshtml | 245 +++++++++--------- .../Views/Stores/PayButtonTest.cshtml | 2 +- BTCPayServer/wwwroot/paybutton/paybutton.js | 2 +- 3 files changed, 120 insertions(+), 129 deletions(-) diff --git a/BTCPayServer/Views/Stores/PayButton.cshtml b/BTCPayServer/Views/Stores/PayButton.cshtml index abc03c0ee..82ae527f0 100644 --- a/BTCPayServer/Views/Stores/PayButton.cshtml +++ b/BTCPayServer/Views/Stores/PayButton.cshtml @@ -1,139 +1,130 @@ @model PayButtonViewModel @{ - ViewData["Title"] = "Pay Button"; + Layout = "../Shared/_NavLayout.cshtml"; ViewData.SetActivePageAndTitle(StoreNavPages.PayButton, "Pay Button"); } -
-
-
-
-

@ViewData["Title"]

-
+
+
+
+
+
+ + + {{ errors.first('price') }} +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + + {{ errors.first('payButtonImageUrl') }} +
+
+ +
+ + + +
-
-
-
-
-
- - - {{ errors.first('price') }} -
-
- - -
-
-
- - -
-
- - -
-
- - - {{ errors.first('payButtonImageUrl') }} -
-
- -
- - - -
-
-
-
-
- Define parameters that define the purchase: price, currency and then optional description of purchase. -

- Generated HTML will be displayed at the bottom of this page and all you need is to paste that HTML into your final page. - Clicking on the button will redirect customer to checkout. -
+
+
+ Define parameters that define the purchase: price, currency and then optional description of purchase. +

+ Generated HTML will be displayed at the bottom of this page and all you need is to paste that HTML into your final page. + Clicking on the button will redirect customer to checkout.
-
-

Payment Notifications

-
-
-
-
- - - {{ errors.first('serverIpn') }} -
-
- - - {{ errors.first('notifyEmail') }} - -
-
- - - {{ errors.first('browserRedirect') }} -
-
-
-
- These parameters allow you to influence process after purchase. Server IPN is location we'll query with details. - We can also deliver email notification to specified addres. -

- Finally Browser Redirect defines where BtcPayServer will redirect customer after puchase is completed. -
-
-
-

Generated code

-
-
-
- - -
-
- -
-
-
-
- Please fix errors shown in order for code generation to successfully execute. -
-
-
-
+
+

Payment Notifications

+
+
+
+
+ + + {{ errors.first('serverIpn') }} +
+
+ + + {{ errors.first('notifyEmail') }} + +
+
+ + + {{ errors.first('browserRedirect') }} +
+
+
+
+ These parameters allow you to influence process after purchase. Server IPN is location we'll query with details. + We can also deliver email notification to specified addres. +

+ Finally Browser Redirect defines where BtcPayServer will redirect customer after puchase is completed. +
+
+
+

Generated code

+
+
+
+ + +
+
+ +
+
+
+
+ Please fix errors shown in order for code generation to successfully execute. +
+
+
+ @section HeadScripts { diff --git a/BTCPayServer/Views/Stores/PayButtonTest.cshtml b/BTCPayServer/Views/Stores/PayButtonTest.cshtml index 1bc28280a..c7eb1b307 100644 --- a/BTCPayServer/Views/Stores/PayButtonTest.cshtml +++ b/BTCPayServer/Views/Stores/PayButtonTest.cshtml @@ -3,7 +3,7 @@
-
+ diff --git a/BTCPayServer/wwwroot/paybutton/paybutton.js b/BTCPayServer/wwwroot/paybutton/paybutton.js index 624f90f7a..e4bfadbe2 100644 --- a/BTCPayServer/wwwroot/paybutton/paybutton.js +++ b/BTCPayServer/wwwroot/paybutton/paybutton.js @@ -27,7 +27,7 @@ function inputChanges(event, buttonSize) { srvModel.buttonSize = buttonSize; } - var html = '<form method="POST" action="' + srvModel.urlRoot + '/apps/'+ srvModel.appId +'/pay">'; + var html = '<form method="POST" action="' + srvModel.urlRoot + '/stores/'+ srvModel.storeId +'/pay">'; html += addinput("price", srvModel.price); if (srvModel.currency) { html += addinput("currency", srvModel.currency);