mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-11 21:26:50 +00:00
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.
37 lines
896 B
Go
37 lines
896 B
Go
package view
|
|
|
|
import (
|
|
"github.com/a-h/templ"
|
|
"github.com/rjNemo/rentease/internal/config"
|
|
)
|
|
|
|
type BookingViewModel struct {
|
|
Id string
|
|
Name string
|
|
PhoneNumber string
|
|
CustomerNumber string
|
|
Email string
|
|
Canceled bool
|
|
From string
|
|
To string
|
|
Platform string
|
|
ExternalId string
|
|
Platforms []string
|
|
PlatformFees string
|
|
Items ItemListViewModel
|
|
ItemList []string
|
|
PaymentMethods []config.PaymentMethod
|
|
Url string
|
|
PdfUrl templ.SafeURL
|
|
PaymentUrl string
|
|
StripePaymentLinkUrl string
|
|
CancelUrl string
|
|
Total string
|
|
}
|
|
|
|
type PaymentViewModel struct {
|
|
Amount string
|
|
PaymentMethod string
|
|
PaymentUrl string
|
|
StripeStatus string
|
|
}
|