#30 Added tipMessage and redirect to a PaymentCompleted page
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<v-container>
|
||||
|
||||
<v-row>
|
||||
<v-text-field label="Message"
|
||||
<v-text-field label="Message" v-model="tipMessage"
|
||||
style="border-radius: 10px; margin-top: 10px; margin-bottom: 10px; color: #a30e79; background-color: #f4f4f4">
|
||||
</v-text-field>
|
||||
</v-row>
|
||||
@@ -54,6 +54,7 @@ import { onMounted, ref } from "vue";
|
||||
let stripe = null;
|
||||
const client = useClient();
|
||||
const price = ref(0);
|
||||
const tipMessage = ref("");
|
||||
const isPaymentDialogActive = ref(false);
|
||||
var checkout;
|
||||
|
||||
@@ -69,7 +70,9 @@ const fetchClientSecret = async () => {
|
||||
|
||||
async function createCheckoutSession() {
|
||||
let clientSecret = await client.post('/api/Stripe', {
|
||||
price: price.value * 100
|
||||
price: (price.value * 100).toFixed(2),
|
||||
tipMessage: tipMessage.value,
|
||||
creatorId: "96d86c20-b7d0-4433-a7fb-42e57ad1515c"
|
||||
});
|
||||
|
||||
let secret = clientSecret["data"];
|
||||
|
||||
Reference in New Issue
Block a user