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 bool Enabled { get; set; }
[Display(Name = "Mode, Choose how to show CoinSwitch")]
[Display(Name = "Integration Mode")]
public string Mode { get; set; } = "popup";
public List<SelectListItem> Modes { get; } = new List<SelectListItem>

View file

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

View file

@ -22,15 +22,16 @@
<input asp-for="MerchantId" class="form-control"/>
<span asp-validation-for="MerchantId" class="text-danger"></span>
</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">
<label asp-for="Enabled"></label>
<input asp-for="Enabled" type="checkbox" class="form-check"/>
</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>
</form>
</div>

View file

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