feat: add online payment management and checkout
Some checks failed
Check / delivery-static (push) Has been cancelled
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
2026-10-15 09:26:40 +08:00
parent 5353a4a128
commit dc2efcde08
41 changed files with 4855 additions and 21 deletions

View File

@@ -3,6 +3,14 @@ $ErrorActionPreference = 'Stop'
$root = Split-Path $PSScriptRoot -Parent
Set-Location $root
$localPaymentKey = Join-Path $root 'secrets/payment-config.key'
if (-not $env:PAYMENT_CONFIG_ENCRYPTION_KEY_FILE) {
if (-not (Test-Path -LiteralPath $localPaymentKey)) {
throw "Missing local payment config key: $localPaymentKey"
}
$env:PAYMENT_CONFIG_ENCRYPTION_KEY_FILE = $localPaymentKey
}
if ($Mode -eq 'Api') {
Set-Location (Join-Path $root 'backend')
& go run ./cmd/server
@@ -114,6 +122,7 @@ try {
$password = $null
$env:HTTP_ADDR = '127.0.0.1:18081'
$env:SESSION_COOKIE_SECURE = 'false'
$env:PAYMENT_CONFIG_ENCRYPTION_KEY_FILE = $localPaymentKey
$env:ENTRY_LIMIT_MODE = 'local-dev'
$env:METRICS_ADDR = ''
# Preserve explicitly supplied protected signing key and keyring paths.