coinswitch integration

This commit is contained in:
Kukks
2018-12-18 20:14:59 +01:00
parent b2e5415a35
commit 40c645e433
4 changed files with 9 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ namespace BTCPayServer.Models.StoreViewModels
public string MerchantId { get; set; } public string MerchantId { get; set; }
public bool Enabled { get; set; } public bool Enabled { get; set; }
[Display(Name = "Mode, Choose how to show CoinSwitch")] [Display(Name = "Integration Mode")]
public string Mode { get; set; } = "popup"; public string Mode { get; set; } = "popup";
public List<SelectListItem> Modes { get; } = new List<SelectListItem> public List<SelectListItem> Modes { get; } = new List<SelectListItem>

View File

@@ -310,8 +310,7 @@
<changelly inline-template <changelly inline-template
v-if="!srvModel.coinSwitchEnabled || selectedThirdPartyProcessor === 'changelly'" v-if="!srvModel.coinSwitchEnabled || selectedThirdPartyProcessor === 'changelly'"
:merchant-id="srvModel. :merchant-id="srvModel.changellyMerchantId"
"
:store-id="srvModel.storeId" :store-id="srvModel.storeId"
:to-currency="srvModel.paymentMethodId" :to-currency="srvModel.paymentMethodId"
:to-currency-due="srvModel.changellyAmountDue" :to-currency-due="srvModel.changellyAmountDue"

View File

@@ -22,15 +22,16 @@
<input asp-for="MerchantId" class="form-control"/> <input asp-for="MerchantId" class="form-control"/>
<span asp-validation-for="MerchantId" class="text-danger"></span> <span asp-validation-for="MerchantId" class="text-danger"></span>
</div> </div>
<div class="form-group">
<label asp-for="Mode"></label>
<select asp-for="Mode" asp-items="Model.Modes" class="form-control" >
</select>
</div>
<div class="form-group"> <div class="form-group">
<label asp-for="Enabled"></label> <label asp-for="Enabled"></label>
<input asp-for="Enabled" type="checkbox" class="form-check"/> <input asp-for="Enabled" type="checkbox" class="form-check"/>
</div> </div>
<div class="form-group">
<label asp-for="Mode"></label>
<select asp-for="Mode" asp-items="Model.Modes" >
</select>
</div>
<button name="command" type="submit" value="save" class="btn btn-primary">Submit</button> <button name="command" type="submit" value="save" class="btn btn-primary">Submit</button>
</form> </form>
</div> </div>

View File

@@ -4,6 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>CoinSwitch</title> <title>CoinSwitch</title>
<script> <script>
debugger;
var script = document.createElement('script'), var script = document.createElement('script'),
head = document.head || document.getElementsByTagName('head')[0]; head = document.head || document.getElementsByTagName('head')[0];
script.src = window.location.protocol + '//files.coinswitch.co/public/js/cs_switch.js'; script.src = window.location.protocol + '//files.coinswitch.co/public/js/cs_switch.js';