Skip to content

Commit 6922a17

Browse files
chore: wip
1 parent c200191 commit 6922a17

File tree

249 files changed

+44778
-48917
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+44778
-48917
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { RequestInstance } from '@stacksjs/types'
2+
import { Action } from '@stacksjs/actions'
3+
import { manageCheckout } from '@stacksjs/payments'
4+
import { response } from '@stacksjs/router'
5+
6+
export default new Action({
7+
name: 'Checkout',
8+
description: 'Checkout Action',
9+
method: 'POST',
10+
async handle(request: RequestInstance) {
11+
const user = request.user()
12+
13+
if (!user) {
14+
return response.json({ message: 'User not found' }, 404)
15+
}
16+
17+
const params = {
18+
success_url: 'https://localhost:3000/success',
19+
cancel_url: 'https://localhost:3000/cancel',
20+
}
21+
22+
const checkout = await manageCheckout.create(user, params)
23+
24+
return response.json({ message: 'Category deleted successfully' })
25+
},
26+
})

app/Actions/Commerce/CouponDestroyAction.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/Actions/Commerce/CouponIndexAction.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

app/Actions/Commerce/CouponShowAction.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/Actions/Commerce/CouponStoreAction.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/Actions/Commerce/CouponUpdateAction.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/Actions/Commerce/CustomerDestroyAction.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/Actions/Commerce/CustomerIndexAction.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

app/Actions/Commerce/CustomerShowAction.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

app/Actions/Commerce/CustomerStoreAction.ts

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)