2025-05-15 17:00:20 +02:00
|
|
|
<script lang="ts">
|
2026-06-10 23:53:03 +02:00
|
|
|
import { put_user } from "lib/NovaAPI";
|
2025-05-15 17:00:20 +02:00
|
|
|
import { type CheckoutState } from "./CheckoutLib";
|
|
|
|
|
|
2025-10-13 16:05:50 +02:00
|
|
|
let { status = $bindable() }: {
|
|
|
|
|
status: CheckoutState;
|
|
|
|
|
} = $props();
|
|
|
|
|
|
|
|
|
|
let name: string = $state()
|
2025-05-15 17:00:20 +02:00
|
|
|
|
|
|
|
|
const submit = async (e: SubmitEvent) => {
|
|
|
|
|
e.preventDefault()
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await put_user({checkout_name: name})
|
|
|
|
|
} catch(err) {
|
|
|
|
|
alert("Failed to update user:"+ err)
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-13 16:05:50 +02:00
|
|
|
status.name = name
|
2025-05-15 17:00:20 +02:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-10-13 16:05:50 +02:00
|
|
|
<form class="name_form" onsubmit={submit}>
|
2025-05-15 17:00:20 +02:00
|
|
|
<div>
|
|
|
|
|
This payment provider requires a name for checkout. Please enter your
|
|
|
|
|
full name below
|
|
|
|
|
</div>
|
|
|
|
|
<input bind:value={name} type="text" autocomplete="name"/>
|
|
|
|
|
|
|
|
|
|
<button type="submit" class="button_highlight" style="align-self: end;">
|
|
|
|
|
Continue
|
|
|
|
|
<i class="icon">chevron_right</i>
|
|
|
|
|
</button>
|
|
|
|
|
</form>
|
|
|
|
|
<hr/>
|
|
|
|
|
<p style="text-align: initial;">
|
2026-06-10 23:53:03 +02:00
|
|
|
This Nova premium plan costs €1 per month, but due to processing fees we
|
|
|
|
|
can't accept payments less than €10. So your deposit will give roughly 10
|
|
|
|
|
months of premium service depending on usage. You can track your spending on
|
|
|
|
|
the <a href="/user/prepaid/transactions">transactions page</a>.
|
2025-05-15 17:00:20 +02:00
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.name_form {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
margin: auto;
|
|
|
|
|
width: 500px;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|