feat: show optional serivce description before payment
This commit is contained in:
@@ -542,50 +542,120 @@ def create_service(ctx: ServiceFactoryContext) -> WataService:
|
||||
|
||||
_PRESENTATION_MANIFEST = tuple(
|
||||
ProviderManifestField(
|
||||
key=key, type=type_, label=label, description=description,
|
||||
placeholder=placeholder, subsection="Wata",
|
||||
target="presentation", attr=attr,
|
||||
key=key,
|
||||
type=type_,
|
||||
label=label,
|
||||
description=description,
|
||||
placeholder=placeholder,
|
||||
subsection="Wata",
|
||||
target="presentation",
|
||||
attr=attr,
|
||||
)
|
||||
for key, type_, label, description, placeholder, attr in (
|
||||
("PAYMENT_WATA_WEBAPP_LABEL_RU", "string", "WebApp button text (RU)",
|
||||
"Custom Russian text shown in the Web App payment method button.", "", "WEBAPP_LABEL_RU"),
|
||||
("PAYMENT_WATA_WEBAPP_LABEL_EN", "string", "WebApp button text (EN)",
|
||||
"Custom English text shown in the Web App payment method button.", "", "WEBAPP_LABEL_EN"),
|
||||
("PAYMENT_WATA_WEBAPP_ICON", "icon", "WebApp button icon",
|
||||
"Lucide icon name rendered inside the Web App payment method button.",
|
||||
"WalletCards", "WEBAPP_ICON"),
|
||||
("PAYMENT_WATA_TELEGRAM_LABEL_RU", "string", "Telegram button text (RU)",
|
||||
"Custom Russian text shown in Telegram bot payment buttons.", "", "TELEGRAM_LABEL_RU"),
|
||||
("PAYMENT_WATA_TELEGRAM_LABEL_EN", "string", "Telegram button text (EN)",
|
||||
"Custom English text shown in Telegram bot payment buttons.", "", "TELEGRAM_LABEL_EN"),
|
||||
("PAYMENT_WATA_TELEGRAM_EMOJI", "string", "Telegram button emoji",
|
||||
"Emoji prepended to the Telegram bot payment button when customized.",
|
||||
"💳", "TELEGRAM_EMOJI"),
|
||||
(
|
||||
"PAYMENT_WATA_WEBAPP_LABEL_RU",
|
||||
"string",
|
||||
"WebApp button text (RU)",
|
||||
"Custom Russian text shown in the Web App payment method button.",
|
||||
"",
|
||||
"WEBAPP_LABEL_RU",
|
||||
),
|
||||
(
|
||||
"PAYMENT_WATA_WEBAPP_LABEL_EN",
|
||||
"string",
|
||||
"WebApp button text (EN)",
|
||||
"Custom English text shown in the Web App payment method button.",
|
||||
"",
|
||||
"WEBAPP_LABEL_EN",
|
||||
),
|
||||
(
|
||||
"PAYMENT_WATA_WEBAPP_ICON",
|
||||
"icon",
|
||||
"WebApp button icon",
|
||||
"Lucide icon name rendered inside the Web App payment method button.",
|
||||
"WalletCards",
|
||||
"WEBAPP_ICON",
|
||||
),
|
||||
(
|
||||
"PAYMENT_WATA_TELEGRAM_LABEL_RU",
|
||||
"string",
|
||||
"Telegram button text (RU)",
|
||||
"Custom Russian text shown in Telegram bot payment buttons.",
|
||||
"",
|
||||
"TELEGRAM_LABEL_RU",
|
||||
),
|
||||
(
|
||||
"PAYMENT_WATA_TELEGRAM_LABEL_EN",
|
||||
"string",
|
||||
"Telegram button text (EN)",
|
||||
"Custom English text shown in Telegram bot payment buttons.",
|
||||
"",
|
||||
"TELEGRAM_LABEL_EN",
|
||||
),
|
||||
(
|
||||
"PAYMENT_WATA_TELEGRAM_EMOJI",
|
||||
"string",
|
||||
"Telegram button emoji",
|
||||
"Emoji prepended to the Telegram bot payment button when customized.",
|
||||
"💳",
|
||||
"TELEGRAM_EMOJI",
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
_CONFIG_MANIFEST = (
|
||||
ProviderManifestField("WATA_ENABLED", "bool", "Enabled", subsection="Wata", attr="ENABLED"),
|
||||
ProviderManifestField("WATA_API_TOKEN", "string", "API token", subsection="Wata",
|
||||
secret=True, attr="API_TOKEN"),
|
||||
ProviderManifestField("WATA_BASE_URL", "url", "Base URL",
|
||||
placeholder="https://api.wata.pro/api/h2h",
|
||||
subsection="Wata", attr="BASE_URL"),
|
||||
ProviderManifestField("WATA_RETURN_URL", "url", "Return URL",
|
||||
subsection="Wata", attr="RETURN_URL"),
|
||||
ProviderManifestField("WATA_FAILED_URL", "url", "Failed URL",
|
||||
subsection="Wata", attr="FAILED_URL"),
|
||||
ProviderManifestField("WATA_PAYMENT_LINK_TTL_DAYS", "int", "Payment link lifetime (days)",
|
||||
description="1..30; Wata defaults to 3 days and allows up to 30 days.",
|
||||
subsection="Wata", min=1, max=30, attr="PAYMENT_LINK_TTL_DAYS"),
|
||||
ProviderManifestField("WATA_WEBHOOK_VERIFY_SIGNATURE", "bool", "Verify webhook signature",
|
||||
subsection="Wata", attr="WEBHOOK_VERIFY_SIGNATURE"),
|
||||
ProviderManifestField("WATA_PUBLIC_KEY", "text", "Webhook public key",
|
||||
description="Optional. If empty, the backend fetches it from Wata.",
|
||||
subsection="Wata", secret=True, attr="PUBLIC_KEY"),
|
||||
ProviderManifestField("WATA_TRUSTED_IPS", "string", "Trusted IPs",
|
||||
description="Comma-separated IP addresses accepted for Wata webhooks.",
|
||||
subsection="Wata", attr="TRUSTED_IPS"),
|
||||
ProviderManifestField(
|
||||
"WATA_API_TOKEN", "string", "API token", subsection="Wata", secret=True, attr="API_TOKEN"
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_BASE_URL",
|
||||
"url",
|
||||
"Base URL",
|
||||
placeholder="https://api.wata.pro/api/h2h",
|
||||
subsection="Wata",
|
||||
attr="BASE_URL",
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_RETURN_URL", "url", "Return URL", subsection="Wata", attr="RETURN_URL"
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_FAILED_URL", "url", "Failed URL", subsection="Wata", attr="FAILED_URL"
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_PAYMENT_LINK_TTL_DAYS",
|
||||
"int",
|
||||
"Payment link lifetime (days)",
|
||||
description="1..30; Wata defaults to 3 days and allows up to 30 days.",
|
||||
subsection="Wata",
|
||||
min=1,
|
||||
max=30,
|
||||
attr="PAYMENT_LINK_TTL_DAYS",
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_WEBHOOK_VERIFY_SIGNATURE",
|
||||
"bool",
|
||||
"Verify webhook signature",
|
||||
subsection="Wata",
|
||||
attr="WEBHOOK_VERIFY_SIGNATURE",
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_PUBLIC_KEY",
|
||||
"text",
|
||||
"Webhook public key",
|
||||
description="Optional. If empty, the backend fetches it from Wata.",
|
||||
subsection="Wata",
|
||||
secret=True,
|
||||
attr="PUBLIC_KEY",
|
||||
),
|
||||
ProviderManifestField(
|
||||
"WATA_TRUSTED_IPS",
|
||||
"string",
|
||||
"Trusted IPs",
|
||||
description="Comma-separated IP addresses accepted for Wata webhooks.",
|
||||
subsection="Wata",
|
||||
attr="TRUSTED_IPS",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user