update payment method, remove stripe, paypal, amanapay
Build & Push / Pipeline Tests (push) Failing after 59s
Build & Push / Build & Push Docker Image (push) Has been skipped
Test / Type Check (all packages) (push) Failing after 48s
Test / API Unit Tests (push) Has been skipped
Test / Homepage Unit Tests (push) Has been skipped
Test / Carplace Unit Tests (push) Has been skipped
Test / Admin Unit Tests (push) Has been skipped
Test / Dashboard Unit Tests (push) Has been skipped
Test / API Integration Tests (push) Has been skipped

This commit is contained in:
root
2026-08-17 21:05:29 -04:00
parent c9915a8315
commit fe8ffbeb9f
109 changed files with 568 additions and 2662 deletions
-8
View File
@@ -68,14 +68,6 @@ describe_value() {
printf '%s: missing\n' "${key}"
elif [[ "${value}" == placeholder || "${value}" == replace-with-* || "${value}" == *changeme* || "${value}" == *change-me* ]]; then
printf '%s: placeholder\n' "${key}"
elif [[ "${key}" == STRIPE_BILLING_REQUIRED && ( "${value}" == "true" || "${value}" == "1" || "${value}" == "yes" ) ]]; then
printf '%s: enabled\n' "${key}"
elif [[ "${key}" == STRIPE_BILLING_REQUIRED && ( "${value}" == "false" || "${value}" == "0" || "${value}" == "no" ) ]]; then
printf '%s: disabled\n' "${key}"
elif [[ "${key}" == STRIPE_API_KEY && ( "${value}" == sk_live_* || "${value}" == rk_live_* ) ]]; then
printf '%s: valid live prefix\n' "${key}"
elif [[ "${key}" == STRIPE_WEBHOOK_SECRET && "${value}" == whsec_* ]]; then
printf '%s: valid webhook prefix\n' "${key}"
else
printf '%s: invalid prefix\n' "${key}"
fi
+1 -26
View File
@@ -181,7 +181,7 @@ EOF
}
validate_prod_env_file() {
local acme_email api_domain public_site_domain cors_origins portainer_domain postgres_password redis_password jwt_secret stripe_api_key stripe_webhook_secret stripe_billing_required
local acme_email api_domain public_site_domain cors_origins portainer_domain postgres_password redis_password jwt_secret
acme_email="$(read_env_value ACME_EMAIL)"
api_domain="$(read_env_value API_DOMAIN)"
@@ -191,9 +191,6 @@ validate_prod_env_file() {
postgres_password="$(read_env_value POSTGRES_PASSWORD)"
redis_password="$(read_env_value REDIS_PASSWORD)"
jwt_secret="$(read_env_value JWT_SECRET)"
stripe_api_key="$(read_env_value STRIPE_API_KEY)"
stripe_webhook_secret="$(read_env_value STRIPE_WEBHOOK_SECRET)"
stripe_billing_required="$(read_env_value STRIPE_BILLING_REQUIRED)"
if [[ -z "${acme_email}" || "${acme_email}" != *@* || "${acme_email}" == *example.com* ]]; then
echo "Invalid ACME_EMAIL in ${ENV_FILE}. Set it to a real contact email for Let's Encrypt, not example.com." >&2
@@ -224,28 +221,6 @@ validate_prod_env_file() {
fi
done
if [[ "${stripe_billing_required}" == "false" || "${stripe_billing_required}" == "0" || "${stripe_billing_required}" == "no" ]]; then
echo "Stripe billing validation skipped because STRIPE_BILLING_REQUIRED=${stripe_billing_required}." >&2
echo "Stripe checkout and Stripe webhooks will remain unavailable until STRIPE_API_KEY and STRIPE_WEBHOOK_SECRET are configured." >&2
elif [[ -z "${stripe_api_key}" || "${stripe_api_key}" == placeholder || "${stripe_api_key}" == replace-with-* || "${stripe_api_key}" == *changeme* || "${stripe_api_key}" == *change-me* ]]; then
echo "Invalid STRIPE_API_KEY in ${ENV_FILE}. Set a real Stripe secret or restricted API key for production billing." >&2
echo "Set STRIPE_API_KEY as a Gitea Actions secret, or include STRIPE_API_KEY=sk_live_.../rk_live_... in ENV_DOCKER_PRODUCTION_B64." >&2
echo "If you need to deploy before Stripe is ready, set STRIPE_BILLING_REQUIRED=false in the production env file." >&2
exit 1
elif [[ "${stripe_api_key}" != sk_live_* && "${stripe_api_key}" != rk_live_* ]]; then
echo "Invalid STRIPE_API_KEY in ${ENV_FILE}. It must start with sk_live_ or rk_live_ for production billing." >&2
echo "Use a live Stripe secret key or, preferably, a live restricted key with the required billing permissions." >&2
exit 1
elif [[ -z "${stripe_webhook_secret}" || "${stripe_webhook_secret}" == placeholder || "${stripe_webhook_secret}" == replace-with-* || "${stripe_webhook_secret}" == *changeme* || "${stripe_webhook_secret}" == *change-me* ]]; then
echo "Invalid STRIPE_WEBHOOK_SECRET in ${ENV_FILE}. Set the Stripe webhook signing secret for /api/v1/subscriptions/webhooks/stripe." >&2
echo "Set STRIPE_WEBHOOK_SECRET as a Gitea Actions secret, or include STRIPE_WEBHOOK_SECRET=whsec_... in ENV_DOCKER_PRODUCTION_B64." >&2
exit 1
elif [[ "${stripe_webhook_secret}" != whsec_* ]]; then
echo "Invalid STRIPE_WEBHOOK_SECRET in ${ENV_FILE}. It must start with whsec_." >&2
echo "Use the webhook signing secret from the Stripe webhook endpoint, not the Stripe API key." >&2
exit 1
fi
if [[ -n "${portainer_domain}" && "${portainer_domain}" == *example.com* ]]; then
echo "Invalid PORTAINER_DOMAIN in ${ENV_FILE}. Set a real hostname or disable the portainer router." >&2
exit 1