Remove AOPP

This commit is contained in:
Kukks
2023-11-02 10:13:42 +01:00
parent 09a8e4fe00
commit 9e8d694209
12 changed files with 0 additions and 263 deletions

View File

@@ -33,8 +33,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.Ticket
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.Wabisabi", "Plugins\BTCPayServer.Plugins.Wabisabi\BTCPayServer.Plugins.Wabisabi.csproj", "{0D438B7D-F996-4BF3-8F54-02CB9DF120D8}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.Wabisabi", "Plugins\BTCPayServer.Plugins.Wabisabi\BTCPayServer.Plugins.Wabisabi.csproj", "{0D438B7D-F996-4BF3-8F54-02CB9DF120D8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.AOPP", "Plugins\BTCPayServer.Plugins.AOPP\BTCPayServer.Plugins.AOPP.csproj", "{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.LSP", "Plugins\BTCPayServer.Plugins.LSP\BTCPayServer.Plugins.LSP.csproj", "{304E4860-8420-4D71-B95A-3E2F75BEE9F6}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.Plugins.LSP", "Plugins\BTCPayServer.Plugins.LSP\BTCPayServer.Plugins.LSP.csproj", "{304E4860-8420-4D71-B95A-3E2F75BEE9F6}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.PluginPacker", "submodules\btcpayserver\BTCPayServer.PluginPacker\BTCPayServer.PluginPacker.csproj", "{2FDF2D41-8E75-49F6-9F4D-9E9AECE7922F}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BTCPayServer.PluginPacker", "submodules\btcpayserver\BTCPayServer.PluginPacker\BTCPayServer.PluginPacker.csproj", "{2FDF2D41-8E75-49F6-9F4D-9E9AECE7922F}"
@@ -173,14 +171,6 @@ Global
{0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Debug|Any CPU.Build.0 = Debug|Any CPU {0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Debug|Any CPU.Build.0 = Debug|Any CPU
{0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Release|Any CPU.ActiveCfg = Release|Any CPU {0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Release|Any CPU.ActiveCfg = Release|Any CPU
{0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Release|Any CPU.Build.0 = Release|Any CPU {0D438B7D-F996-4BF3-8F54-02CB9DF120D8}.Altcoins-Release|Any CPU.Build.0 = Release|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Release|Any CPU.Build.0 = Release|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Altcoins-Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Altcoins-Debug|Any CPU.Build.0 = Debug|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Altcoins-Release|Any CPU.ActiveCfg = Release|Any CPU
{A02B61F6-C1B6-404E-865D-5ADD6AEC3E76}.Altcoins-Release|Any CPU.Build.0 = Release|Any CPU
{304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {304E4860-8420-4D71-B95A-3E2F75BEE9F6}.Release|Any CPU.ActiveCfg = Release|Any CPU

View File

@@ -1,41 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
</PropertyGroup>
<!-- Plugin specific properties -->
<PropertyGroup>
<Product>AOPP</Product>
<Description>Allows you to support the AOPP protocol in invoices to allow customers to bypass stupid KYC rules.</Description>
<Version>1.0.1</Version>
</PropertyGroup>
<!-- Plugin development properties -->
<PropertyGroup>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PreserveCompilationContext>false</PreserveCompilationContext>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<!-- This will make sure that referencing BTCPayServer doesn't put any artifact in the published directory -->
<ItemDefinitionGroup>
<ProjectReference>
<Properties>StaticWebAssetsEnabled=false</Properties>
<Private>false</Private>
<ExcludeAssets>runtime;native;build;buildTransitive;contentFiles</ExcludeAssets>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\**"/>
<ProjectReference Include="..\..\submodules\btcpayserver\BTCPayServer\BTCPayServer.csproj"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Resources"/>
</ItemGroup>
</Project>

View File

@@ -1,2 +0,0 @@
dotnet publish -c Altcoins-Release -o bin/publish/BTCPayServer.Plugins.AOPP
dotnet run -p ../../BTCPayServer.PluginPacker bin/publish/BTCPayServer.Plugins.AOPP BTCPayServer.Plugins.AOPP ../packed

View File

@@ -1,36 +0,0 @@
Vue.component("AOPP", {
props: ["srvModel"],
methods: {
onaoppChange: function(){
this.aoppAddressInputDirty = true;
this.aoppAddressInputInvalid = false;
},
onSubmit : function(){
var self = this;
if (this.aoppAddressInput && this.aoppAddressInput.startsWith("aopp:?")) {
this.aoppAddressFormSubmitting = true;
// Push the email to a server, once the reception is confirmed move on
$.ajax({
url: "/plugins/"+this.srvModel.storeId+"/AOPP/" +this.srvModel.invoiceId,
type: "POST",
data: JSON.stringify({ aopp: this.aoppAddressInput }),
contentType: "application/json; charset=utf-8"
})
.done(function () {
}).always(function () {
self.aoppAddressFormSubmitting = false;
});
} else {
this.aoppAddressInputInvalid = true;
}
}
},
data: function () {
return {
aoppAddressInput: "",
aoppAddressInputDirty: false,
aoppAddressInputInvalid: false,
aoppAddressFormSubmitting: false
}
}
});

View File

@@ -1,8 +0,0 @@
namespace BTCPayServer.Plugins.AOPP
{
public class UpdateAOPPSettingsViewModel
{
public bool Enabled { get; set; }
public string StoreName { get; set; }
}
}

View File

@@ -1,23 +0,0 @@
@model BTCPayServer.Plugins.AOPP.UpdateAOPPSettingsViewModel
@{
Layout = "../Shared/_NavLayout.cshtml";
ViewData["NavPartialName"] = "../UIStores/_Nav";
}
<h2 class="mb-4">@ViewData["PageTitle"]</h2>
<div class="row">
<div class="col-md-10">
<form method="post">
<div class="form-group form-check">
<label asp-for="Enabled" class="form-check-label"></label>
<input asp-for="Enabled" type="checkbox" class="form-check-input"/>
</div>
<button name="command" type="submit" value="save" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
@section PageFootContent {
<partial name="_ValidationScriptsPartial" />
}

View File

@@ -1,18 +0,0 @@
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Plugins.AOPP
@inject IScopeProvider ScopeProvider
@{
var storeId = ScopeProvider.GetCurrentStoreId();
var isActive = !string.IsNullOrEmpty(storeId) && ViewContext.RouteData.Values.TryGetValue("Controller", out var controller) && controller is not null &&
nameof(AOPPController).StartsWith(controller.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
@if (!string.IsNullOrEmpty(storeId))
{
<li class="nav-item">
<a asp-area="" asp-controller="AOPP" asp-action="UpdateAOPPSettings" asp-route-storeId="@storeId" class="nav-link js-scroll-trigger @(isActive? "active": string.Empty)">
<svg role="img" class="icon">
</svg>
<span>AOPP</span>
</a>
</li>
}

View File

@@ -1,40 +0,0 @@
@using BTCPayServer.Plugins.AOPP
@using Newtonsoft.Json
@using Newtonsoft.Json.Linq
@inject AOPPService AOPPService
@{
var storeId = ((JObject)JObject.Parse(JsonConvert.SerializeObject(Model)))["StoreId"].Value<string>();
var settings = await AOPPService.GetAOPPForStore(storeId);
if (settings?.Enabled is true)
{
<div id="AOPP" class="bp-view payment manual-flow" v-bind:class="{ 'active': currentTab == 'AOPP'}">
<AOPP inline-template v-if="currentTab == 'AOPP'" v-bind:srv-model="srvModel">
<form class="manual__step-one refund-address-form contact-email-form aopp-form" id="aopp-form" name="aopp-form" novalidate="" v-on:submit.prevent="onSubmit">
<div class="manual__step-one__header">
<span>{{$t("AOPP")}}</span>
</div>
<div class="manual__step-one__instructions">
<span class="initial-label" v-show="!aoppAddressInputInvalid">
<span>If you are sending funds from an exchange that requiores that you "verify" the withdrawal access, you can use this tool to bypass this madness. You even earn bonus points if they try to pass that data over to a chain surveillance service, by poisoning their clusters. </span>
</span>
<span class="submission-error-label" v-show="aoppAddressInputInvalid">{{$t("Please enter a valid aopp address")}}</span>
</div>
<div class="input-wrapper">
<input class="bp-input email-input"
v-bind:class="{ 'ng-pristine ng-submitted ng-touched': !aoppAddressInputDirty, 'ng-invalid form-input-invalid': aoppAddressInputInvalid }" id="aoppAddressFormInput"
v-bind:placeholder="$t('AOPP url')" type="url" v-model="aoppAddressInput"
v-on:change="onaoppChange">
<bp-loading-button>
<button type="submit" class="action-button" style="margin-top: 15px;" v-bind:disabled="aoppAddressFormSubmitting" v-bind:class="{ 'loading': aoppAddressFormSubmitting }">
<span class="button-text">{{$t("Submit")}}</span>
<div class="loader-wrapper">
<partial name="Checkout-Spinner" />
</div>
</button>
</bp-loading-button>
</div>
</form>
</AOPP>
</div>
}
}

View File

@@ -1,13 +0,0 @@
@using BTCPayServer.Plugins.AOPP
@using Newtonsoft.Json
@using Newtonsoft.Json.Linq
@inject AOPPService AOPPService
@{
var storeId = ((JObject)JObject.Parse(JsonConvert.SerializeObject(Model)))["StoreId"].Value<string>();
var settings = await AOPPService.GetAOPPForStore(storeId);
if (settings?.Enabled is true)
{
<script src="~/Resources/js/aoppComponent.js"></script>
}
}

View File

@@ -1,14 +0,0 @@
@using BTCPayServer.Plugins.AOPP
@using Newtonsoft.Json
@using Newtonsoft.Json.Linq
@inject AOPPService AOPPService
@{
var storeId = ((JObject)JObject.Parse(JsonConvert.SerializeObject(Model)))["StoreId"].Value<string>();
var settings = await AOPPService.GetAOPPForStore(storeId);
if (settings?.Enabled is true)
{
<div class="payment-tabs__tab" id="AOPP-tab" v-on:click="switchTab('AOPP')" v-bind:class="{ 'active': currentTab == 'AOPP'}" v-if="srvModel.paymentMethodId.indexOf('_') === -1">
<span>{{$t("AOPP")}}</span>
</div>
}
}

View File

@@ -1,57 +0,0 @@
@using BTCPayServer.Abstractions.Contracts
@using BTCPayServer.Plugins.AOPP
@using Microsoft.AspNetCore.Mvc.TagHelpers
@inject AOPPService AOPPService
@inject IScopeProvider ScopeProvider
@{
var storeId = ScopeProvider.GetCurrentStoreId();
AOPPSettings settings = null;
if (!string.IsNullOrEmpty(storeId))
{
try
{
settings = await AOPPService.GetAOPPForStore(storeId);
}
catch (Exception)
{
}
}
}
@if (!string.IsNullOrEmpty(storeId))
{
<li class="list-group-item bg-tile ">
<div class="d-flex align-items-center">
<span class="d-flex flex-wrap flex-fill flex-column flex-sm-row">
<strong class="me-3">
AOPP
</strong>
<span title="" class="d-flex me-3">
<span class="text-secondary">Allows your customers to pay with altcoins that are not supported by BTCPay Server.</span>
</span>
</span>
<span class="d-flex align-items-center fw-semibold">
@if (settings?.Enabled is true)
{
<span class="d-flex align-items-center text-success">
<span class="me-2 btcpay-status btcpay-status--enabled"></span>
Enabled
</span>
<span class="text-light ms-3 me-2">|</span>
<a lass="btn btn-link px-1 py-1 fw-semibold" asp-controller="AOPP" asp-action="UpdateAOPPSettings" asp-route-storeId="@storeId">
Modify
</a>
}
else
{
<span class="d-flex align-items-center text-danger">
<span class="me-2 btcpay-status btcpay-status--disabled"></span>
Disabled
</span>
<a class="btn btn-primary btn-sm ms-4 px-3 py-1 fw-semibold" asp-controller="AOPP" asp-action="UpdateAOPPSettings" asp-route-storeId="@storeId">
Setup
</a>
}
</span>
</div>
</li>
}

View File

@@ -1 +0,0 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers