Skip to content

Commit 4d8466f

Browse files
committed
chore: wip
1 parent 76e2cd9 commit 4d8466f

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

app/Actions/Payment/UpdateCustomerAction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default new Action({
66
name: 'UpdateCustomerAction',
77
description: 'Update customer detauls',
88
method: 'POST',
9-
async handle(request: RequestInstance) {
9+
async handle() {
10+
// async handle(request: RequestInstance) {
1011
const user = await User.find(1)
1112

1213
const customer = await user?.syncStripeCustomerDetails({ address: {

app/Models/User.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import type { Model } from '@stacksjs/types'
2-
import type { UserModel } from '../../storage/framework/orm/src/models/User'
32
// soon, these will be auto-imported
43
import { faker } from '@stacksjs/faker'
5-
import { capitalize } from '@stacksjs/strings'
64
import { schema } from '@stacksjs/validation'
75

86
export default {

resources/plugins/preloader.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*/
88

99
// allows for importing .env files
10+
// eslint-disable-next-line antfu/no-top-level-await
1011
await import('bun-plugin-env')
1112

1213
// allows for importing .yaml files
14+
// eslint-disable-next-line antfu/no-top-level-await
1315
await import('bun-plugin-yml')

storage/framework/core/components/dialog/src/components/Options.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const renderedCode = computed(() => {
4040
}
4141
4242
if (currentAction.value === 'header') {
43-
dialogContent = `
43+
dialogContent = `
4444
<template #header>
4545
<h1 class="text-lg font-semibold">
4646
Greetings

storage/framework/core/components/payment/src/components/OneTimePayment.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ async function loadElements() {
5858
elements = stripe.elements({ clientSecret: clientSecret.value, appearance })
5959
6060
// Create and mount the address element
61-
const addressElement = elements.create('address', options)
62-
addressElement.mount('#address-element')
61+
// const addressElement = elements.create('address', options)
62+
// addressElement.mount('#address-element')
6363
6464
// Create and mount the payment element
6565
const paymentElement = elements.create('payment')
@@ -69,7 +69,8 @@ async function loadElements() {
6969
7070
async function handleSubmit() {
7171
if (stripe && elements) {
72-
const { error } = await stripe.confirmPayment({
72+
// const { error } = await stripe.confirmPayment({
73+
await stripe.confirmPayment({
7374
elements,
7475
confirmParams: {
7576
return_url: props.redirectUrl, // Redirect URL after payment

storage/framework/core/components/payment/src/components/Subscription.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ async function createPaymentIntent() {
5252
async function loadElements() {
5353
if (stripe) {
5454
const appearance = { /* appearance options */ }
55-
const options = { mode: 'billing' }
55+
// const options = { mode: 'billing' }
5656
5757
// Create the elements instance once
5858
elements = stripe.elements({ clientSecret: clientSecret.value, appearance })
5959
6060
// Create and mount the address element
61-
const addressElement = elements.create('address', options)
62-
addressElement.mount('#address-element')
61+
// const addressElement = elements.create('address', options)
62+
// addressElement.mount('#address-element')
6363
6464
// Create and mount the payment element
6565
const paymentElement = elements.create('payment')
@@ -69,7 +69,8 @@ async function loadElements() {
6969
7070
async function handleSubmit() {
7171
if (stripe && elements) {
72-
const { error } = await stripe.confirmPayment({ elements, redirect: 'if_required' })
72+
// const { error } = await stripe.confirmPayment({ elements, redirect: 'if_required' })
73+
await stripe.confirmPayment({ elements, redirect: 'if_required' })
7374
}
7475
}
7576
</script>
@@ -139,7 +140,7 @@ async function handleSubmit() {
139140
Items in your cart
140141
</h3>
141142
<ul role="list" class="divide-y divide-gray-200">
142-
<li v-for="product in products" class="flex px-4 py-6 sm:px-6">
143+
<li v-for="(product, index) in products" :key="index" class="flex px-4 py-6 sm:px-6">
143144
<div class="flex-shrink-0">
144145
<img :src="product?.images" alt="Front of men&#039;s Basic Tee in black." class="w-50 rounded-md">
145146
</div>

storage/framework/core/components/stepper/src/components/Example.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const stepperRef = ref(null)
1818
<div class="flex-center mt-10 w-full">
1919
<Stepper id="stepper-example" ref="stepperRef" v-model="step" :steps="steps" persist />
2020
</div>
21-
<div class="flex-center my-5 font-semibold text-lg">
21+
<div class="flex-center my-5 text-lg font-semibold">
2222
<div v-if="step === 1">
2323
<p>Welcome to Step 1: Initialization</p>
2424
<p>Here you will set up the initial parameters for your process.</p>

storage/framework/core/payments/src/drivers/stripe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Stripe from 'stripe'
2+
import process from 'process'
23

34
const apiKey = process.env.STRIPE_SECRET_KEY || ''
45

storage/framework/core/storage/build.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ const result = await Bun.build({
1111
format: 'esm',
1212
target: 'bun',
1313
plugins: [
14-
dts({
15-
root: './src',
16-
outdir: './dist',
17-
}),
14+
dts(),
1815
],
1916
})
2017

0 commit comments

Comments
 (0)