mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-25 15:10:00 +01:00
* Opt-in for new checkout * Update wording * Create invoice view update * Remove jQuery from checkout testing code * Checkout v2 basics * WIP * WIP 2 * Updates and fixes * Updates * Design updates * More design updates * Cheating and JS fixes * Use checkout form id whenever invoices get created * Improve email form handling * Cleanups * Payment method exclusion cases for Lightning and LNURL TODO: Cases and implementation need to be discussed * Introduce CheckoutType in API and replace UseNewCheckout in backend Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
29 lines
1.3 KiB
Text
29 lines
1.3 KiB
Text
@using BTCPayServer.BIP78.Sender
|
|
@model BTCPayServer.Models.InvoicingModels.PaymentModel
|
|
|
|
<template id="bitcoin-method-checkout-template">
|
|
<div class="payment-box">
|
|
<small class="qr-text" id="QR_Text_@Model.PaymentMethodId">{{$t("QR_Text")}}</small>
|
|
<div class="qr-container my-3" data-clipboard-confirm-element="QR_Text_@Model.PaymentMethodId" :data-clipboard="srvModel.btcAddress">
|
|
<qrcode v-if="srvModel.invoiceBitcoinUrlQR" :value="srvModel.invoiceBitcoinUrlQR" tag="div" :options="qrOptions" />
|
|
</div>
|
|
<a v-if="srvModel.invoiceBitcoinUrl" class="btn btn-primary rounded-pill w-100" target="_top"
|
|
:href="srvModel.invoiceBitcoinUrl" :title="$t(hasPayjoin ? 'BIP21 payment link with PayJoin support' : 'BIP21 payment link')">{{$t("Pay in wallet")}}</a>
|
|
@await Component.InvokeAsync("UiExtensionPoint", new { location = "checkout-bitcoin-post-content", model = Model })
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
Vue.component('BitcoinLikeMethodCheckout', {
|
|
props: ["srvModel"],
|
|
template: "#bitcoin-method-checkout-template",
|
|
components: {
|
|
qrcode: VueQrcode
|
|
},
|
|
computed: {
|
|
hasPayjoin () {
|
|
return this.srvModel.invoiceBitcoinUrl.indexOf('@PayjoinClient.BIP21EndpointKey=') !== -1;
|
|
}
|
|
}
|
|
});
|
|
</script>
|