Commit graph

44 commits

Author SHA1 Message Date
23f3ceec21
Feat/stripe integration (#50)
Some checks are pending
CI / checks (push) Waiting to run
* feat(stripe): add Stripe payment sync and webhook support

Introduce Stripe integration for automatic payment ingestion and refund
tracking. Adds new fields to the payment model for Stripe IDs and
status,
Stripe client driver, sync service, cron job, manual API endpoint, and
public webhook handler for real-time updates. Includes tests and
documentation. Manual cash entry remains supported.

* chore(stripe): upgrade to stripe-go v83

Upgrade Stripe SDK from v79 to v83 across the codebase. Update all
imports to use github.com/stripe/stripe-go/v83 and refactor client usage
to match the new API, including changes to PaymentIntents listing.
Update documentation and plans to reference the new version. Remove
references to the old version from go.mod and go.sum.

* refactor(payment): extract payment logic to new service

Moves all payment-related logic (manual payments, Stripe sync, webhook
handling) from the booking service into a dedicated payment service
(`internal/service/payment`). Updates server, cron, and handler wiring
to
inject and use the new payment service. Adjusts tests, routes, and
documentation to reflect the new separation of concerns.

This improves cohesion, clarifies responsibilities, and prepares for
future payment features. No database schema changes are introduced.

* chore(ci): add Go and templ setup to CI workflow

This update enhances the CI workflow by adding steps to set up Go using
the version specified in go.mod, add the Go bin directory to the PATH,
and install the templ code generation tool. These additions ensure that
Go-based tooling is available for subsequent CI steps.
2025-11-21 15:47:01 +01:00
a0b7672e9e
feat(payments): add Stripe dashboard links for card payments
Some checks are pending
CI / checks (push) Waiting to run
- Add `APP_STRIPE_ACCOUNT_ID` to config and README.
- Pass Stripe account ID to payment view models.
- Show "View in Stripe" badge linking to the payment in Stripe dashboard
  for card payments when account ID and payment ID are present.
- Update Makefile to run format/lint locally instead of in container.
- Update templates and generated code to support new dashboard link.
2025-11-16 18:04:35 +01:00
4bd47dc6e9
feat(deps): migrate from Echo to Chi, update Stripe/Sentry (#49)
Some checks failed
CI / checks (push) Has been cancelled
2025-11-02 21:45:37 +01:00
91a9a74750
feat(stripe): add payment link creation for bookings
Some checks are pending
CI / checks (push) Waiting to run
Introduce backend and frontend support for generating Stripe payment
links
for outstanding booking balances. Adds a new POST endpoint to create
payment
links, updates booking view to include a Stripe button, and integrates
error handling and feedback for payment link creation. Refactors view
models and templates to support the new feature.
2025-11-01 17:22:13 +01:00
aa9f46a222
feat/stripe integration (#48) 2025-10-19 15:48:59 +02:00
ac94faedb0
refactor: unify ID and API key naming conventions
This commit standardizes the naming of identifier and API key fields
across the codebase to use consistent camel case (e.g., `ID`, `APIKey`,
`DatabaseURL`). This includes updates to struct fields, method names,
function parameters, and environment variable references. The changes
improve code clarity and maintainability by reducing ambiguity and
aligning with Go naming conventions. No functional behavior is changed.
2025-10-03 19:47:41 +02:00
cf1620592a
create invoice (#39)
### TL;DR

Enhanced invoice generation with improved formatting and Euro symbol display

### What changed?

- Added Euro symbol (€) to monetary values in the invoice template
- Implemented new invoice data structure with dedicated types for lines and payments
- Created ToInvoice method to properly format booking data for invoice generation
- Added HTML template parsing and rendering functionality
- Improved date formatting for consistency
- Added new API endpoint for booking creation

### How to test?

1. Create a new booking through the API
2. Navigate to the PDF generation endpoint
3. Verify that monetary values display with Euro symbol
4. Check that dates are properly formatted
5. Confirm that payment history and totals are correctly calculated
6. Validate that the generated HTML maintains proper formatting

### Why make this change?

To improve invoice readability and consistency by standardizing monetary value display and providing better data structure for invoice generation. This change also makes the system more maintainable by separating concerns between data transformation and presentation.
2025-02-04 11:34:14 +01:00
541c813be0
Raw 34 enable payments (#35)
Closes #34
2025-01-24 17:30:35 +01:00
abfbe1ff1b
refactor authentication service 2024-09-13 17:32:18 +02:00
876d54d7bb
move pdf to driver layer 2024-09-11 11:04:34 +02:00
78ca637807
call calendar driver from the booking service 2024-09-11 09:38:22 +02:00
26c8996f0f
rename private handler 2024-09-09 22:01:43 +02:00
fefbbc2ae9
add calendars as we use them 2024-08-17 00:59:45 +02:00
ac10e65097
Refactor service (#14)
* add comments to main file

* create health check handler

health check

* use naming convention for booking handler

* use naming convention for hamndlers

naming convention

* clean up
2024-08-07 09:12:50 +02:00
0dc9bee3f7
add api_key to config 2024-06-16 16:20:55 +02:00
1ec2f5365c
update templ version 2024-06-14 22:35:20 +02:00
8c4a1554ca
make origin a config change api sync url 2024-06-02 11:59:07 +02:00
0a41989b01
cancel booking in db 2024-06-01 20:56:13 +02:00
cc621582f9
read session to login 2024-05-25 16:53:49 +02:00
e1766812c4
session login 2024-05-25 16:38:25 +02:00
8f4f1638a4
add google login 2024-05-19 21:04:05 +02:00
fee3f660ed
add login page 2024-05-10 12:45:08 +02:00
28866ac5fb
update line item 2024-03-22 21:45:57 +01:00
b89a760aa3
get line form on click edit button 2024-03-22 15:19:55 +01:00
8db9e6ebb8
mark line item as paid 2024-03-22 12:13:22 +01:00
0215361e43
update booking form 2024-03-21 22:05:01 +01:00
f3e266e502
replace unused constants with config values 2024-03-17 17:50:48 +01:00
07f91e8f85
store booking request in D 2024-03-10 20:34:29 +01:00
3cbddfa47d
validate time range 2024-03-10 15:30:49 +01:00
56704a4062
improve landing page 2024-03-03 15:04:19 +01:00
575dc5ad7b
create report pdf 2024-03-03 14:03:23 +01:00
d5654f808c
invoice number in place of db id 2024-02-26 17:17:29 +01:00
37cadd8b20
add customer number seed 2024-02-22 22:08:46 +01:00
ec853f6b66
send data to render pdf 2024-02-18 14:01:33 +01:00
b237484b58
add links to useful websites 2024-02-17 13:37:23 +01:00
032df19805
refactor server config 2024-02-16 20:36:46 +01:00
3dd36da114
create item in service 2024-02-16 18:20:15 +01:00
f3bf9b3caf
create booking service 2024-02-16 18:08:24 +01:00
dc00eb33a8
all booking to service 2024-02-16 15:50:07 +01:00
096e7fbf71
refactor report to booking service 2024-02-16 15:28:14 +01:00
9bbd11588b
public handler 2024-02-16 13:07:18 +01:00
1f86cbf3ed
pdf service 2024-02-16 12:38:03 +01:00
172c5037b4
reports page 2024-02-10 21:10:33 +01:00
9f4af72c85
boost 2024-02-10 15:21:33 +01:00