7.0.0 정식 출시 커밋에서 PG 3종이 함께 제거되었으나, 그중 토스페이먼츠만 번들로 되돌린다. 삭제 직전 트리를 기준으로 플러그인 40개 파일과 일본어 언어팩 6개 파일을 복원하고, 삭제에 연동되어 변경되었던 README 목록·언어팩 빌드 스크립트 엔트리·이커머스 편집기 샘플의 PG provider 를 함께 되살렸다. 복원된 코드는 삭제 시점에 멈춰 있어 현행 코드베이스와 어긋나는 지점이 있어 함께 정합화했다. - PluginTestCase 가 활성 디렉토리 경로를 참조해 _bundled 단독 실행 시 라우트가 등록되지 않던 문제를 자기 기준 경로로 교체 - SettingsServiceProvider 의 site_url override 로 app.url 이 오염되어 assertRedirect 가 간헐 실패하던 문제를 APP_URL 명시 리셋으로 차단 - 환경설정 레이아웃의 시맨틱 클래스가 한 칸씩 밀려 순환 배치되어 2열 폼이 무너지고 섹션 제목이 에러 색으로 표시되던 결함을 정정 (회귀 테스트 신설) - 편집기 저장 시 silent drop 되던 미표준 root 키 제거, Icon 을 size prop 으로 전환
731 lines
40 KiB
JSON
731 lines
40 KiB
JSON
{
|
|
"version": "1.0.0",
|
|
"layout_name": "plugin_settings",
|
|
"permissions": [
|
|
"core.plugins.update"
|
|
],
|
|
"extends": "_admin_base",
|
|
"meta": {
|
|
"title": "$t:sirsoft-tosspayments.settings.title",
|
|
"description": "$t:sirsoft-tosspayments.settings.description"
|
|
},
|
|
"data_sources": [
|
|
{
|
|
"id": "settings",
|
|
"label_key": "$t:sirsoft-tosspayments.editor.data_source.settings",
|
|
"type": "api",
|
|
"endpoint": "/api/admin/plugins/{{route.identifier}}/settings",
|
|
"method": "GET",
|
|
"auto_fetch": true,
|
|
"auth_required": true,
|
|
"initLocal": "form",
|
|
"refetchOnMount": true
|
|
}
|
|
],
|
|
"slots": {
|
|
"content": [
|
|
{
|
|
"id": "plugin_settings_content",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"dataKey": "form",
|
|
"trackChanges": true,
|
|
"props": {
|
|
"className": "admin-page-content-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "page_header",
|
|
"type": "composite",
|
|
"name": "PageHeader",
|
|
"props": {
|
|
"title": "$t:sirsoft-tosspayments.settings.title",
|
|
"description": "$t:sirsoft-tosspayments.settings.description",
|
|
"backPath": "/admin/plugins",
|
|
"backLabel": "$t:admin.plugins.back_to_list"
|
|
}
|
|
},
|
|
{
|
|
"id": "validation_error",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"if": "{{_local.errors}}",
|
|
"props": {
|
|
"className": "alert-danger"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "flex gap-3"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"props": {
|
|
"name": "triangle-exclamation",
|
|
"size": "md",
|
|
"className": "text-red-600 dark:text-red-400 flex-shrink-0 mt-0.5"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "H3",
|
|
"props": {
|
|
"className": "text-error-strong"
|
|
},
|
|
"text": "$t:admin.plugins.settings.validation_error"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Ul",
|
|
"if": "{{typeof _local.errors === 'object' && Object.keys(_local.errors).length > 0}}",
|
|
"props": {
|
|
"className": "mt-2 list-disc list-inside space-y-1"
|
|
},
|
|
"iteration": {
|
|
"source": "Object.entries(_local.errors ?? {}).flatMap(([field, messages]) => Array.isArray(messages) ? messages : [messages])",
|
|
"item_var": "message"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Li",
|
|
"props": {
|
|
"className": "text-error-soft"
|
|
},
|
|
"text": "{{message}}"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "test_mode_card",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "p-6"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "field_test_mode",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "flex-between"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_mode"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_mode_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "composite",
|
|
"name": "Toggle",
|
|
"props": {
|
|
"name": "is_test_mode"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "test_keys_section",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "panel-header-row"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "H3",
|
|
"props": {
|
|
"className": "section-heading-md"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.section_test_keys"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "p-6 space-y-6"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "field_test_client_key",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_client_key"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_client_key_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "text",
|
|
"name": "test_client_key",
|
|
"placeholder": "test_ck_...",
|
|
"className": "focus:border-transparent font-mono"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "field_test_secret_key",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_secret_key"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.test_secret_key_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "password",
|
|
"name": "test_secret_key",
|
|
"placeholder": "test_sk_...",
|
|
"className": "focus:border-transparent font-mono"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "live_keys_section",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "panel-header-row"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "H3",
|
|
"props": {
|
|
"className": "section-heading-md"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.section_live_keys"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "p-6 space-y-6"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "field_live_client_key",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.live_client_key"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "text",
|
|
"name": "live_client_key",
|
|
"placeholder": "live_ck_...",
|
|
"className": "focus:border-transparent font-mono"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "field_live_secret_key",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.live_secret_key"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.live_secret_key_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "password",
|
|
"name": "live_secret_key",
|
|
"placeholder": "live_sk_...",
|
|
"className": "focus:border-transparent font-mono"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "redirect_section",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "mt-6 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "panel-header-row"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "H3",
|
|
"props": {
|
|
"className": "section-heading-md"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.section_redirect"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "p-6 space-y-6"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "field_redirect_success_url",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.redirect_success_url"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.redirect_success_url_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "text",
|
|
"name": "redirect_success_url",
|
|
"placeholder": "/shop/orders/{orderId}/complete",
|
|
"className": "focus:border-transparent"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "field_redirect_fail_url",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "grid-3col-responsive"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-1"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Label",
|
|
"props": {
|
|
"className": "form-label"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.redirect_fail_url"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "P",
|
|
"props": {
|
|
"className": "form-hint"
|
|
},
|
|
"text": "$t:sirsoft-tosspayments.settings.redirect_fail_url_hint"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "lg:col-span-2"
|
|
},
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Input",
|
|
"props": {
|
|
"type": "text",
|
|
"name": "redirect_fail_url",
|
|
"placeholder": "/shop/checkout",
|
|
"className": "focus:border-transparent"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "footer_buttons",
|
|
"type": "basic",
|
|
"name": "Div",
|
|
"props": {
|
|
"className": "sticky-footer-buttons"
|
|
},
|
|
"children": [
|
|
{
|
|
"id": "cancel_button",
|
|
"type": "basic",
|
|
"name": "Button",
|
|
"props": {
|
|
"className": "btn btn-secondary"
|
|
},
|
|
"actions": [
|
|
{
|
|
"type": "click",
|
|
"handler": "navigate",
|
|
"params": {
|
|
"path": "/admin/plugins"
|
|
}
|
|
}
|
|
],
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"text": "$t:common.cancel"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "save_button",
|
|
"type": "basic",
|
|
"name": "Button",
|
|
"props": {
|
|
"disabled": "{{!_local.hasChanges || _local.isSaving}}",
|
|
"className": "btn btn-primary flex-center gap-1.5"
|
|
},
|
|
"actions": [
|
|
{
|
|
"type": "click",
|
|
"handler": "sequence",
|
|
"actions": [
|
|
{
|
|
"handler": "setState",
|
|
"params": {
|
|
"target": "local",
|
|
"isSaving": true,
|
|
"errors": null
|
|
}
|
|
},
|
|
{
|
|
"handler": "apiCall",
|
|
"auth_required": true,
|
|
"target": "/api/admin/plugins/{{route.identifier}}/settings",
|
|
"params": {
|
|
"method": "PUT",
|
|
"body": "{{_local.form}}"
|
|
},
|
|
"onSuccess": [
|
|
{
|
|
"handler": "setState",
|
|
"params": {
|
|
"target": "local",
|
|
"isSaving": false,
|
|
"hasChanges": false
|
|
}
|
|
},
|
|
{
|
|
"handler": "toast",
|
|
"params": {
|
|
"type": "success",
|
|
"message": "$t:admin.plugins.settings.save_success"
|
|
}
|
|
},
|
|
{
|
|
"handler": "refetchDataSource",
|
|
"params": {
|
|
"dataSourceId": "settings"
|
|
}
|
|
}
|
|
],
|
|
"onError": [
|
|
{
|
|
"handler": "setState",
|
|
"params": {
|
|
"target": "local",
|
|
"isSaving": false,
|
|
"errors": "{{$error.errors}}"
|
|
}
|
|
},
|
|
{
|
|
"handler": "toast",
|
|
"params": {
|
|
"type": "error",
|
|
"message": "$t:admin.plugins.settings.save_error"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"children": [
|
|
{
|
|
"type": "basic",
|
|
"name": "Icon",
|
|
"if": "{{_local.isSaving}}",
|
|
"props": {
|
|
"name": "spinner",
|
|
"className": "spinner-sm"
|
|
}
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"if": "{{!_local.isSaving}}",
|
|
"text": "$t:common.save"
|
|
},
|
|
{
|
|
"type": "basic",
|
|
"name": "Span",
|
|
"if": "{{_local.isSaving}}",
|
|
"text": "$t:common.saving"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|