{
  "pay_type_official": [
    "ali",
    "wx"
  ],
  "ali": {
    "label": "支付寶收款",
    "group": "pay",
    "slug": "ali",
    "fields": [
      {
        "label": "支付寶收款",
        "slug": "open",
        "type": "switch",
        "attrs": {
          "inactive-value": "0",
          "active-value": "1",
          "remark": {
            "1": "已開啟",
            "0": "未啟用"
          }
        }
      },
      {
        "label": "終端",
        "slug": "ali_end",
        "type": "checkbox-group",
        "group": {
          "fields": [
            {
              "label": "電腦網站支付",
              "slug": "native",
              "type": "checkbox",
              "attrs": {
                "true-value": "1",
                "false-value": "0",
                "disabled": true
              },
              "tips": "使用者訪問PC網站購買時使用支付寶APP掃描完成支付。"
            },
            {
              "label": "手機網站支付",
              "slug": "h5",
              "type": "checkbox",
              "attrs": {
                "true-value": "1",
                "false-value": "0"
              },
              "tips": "使用者手機端訪問購買時撥出支付寶APP支付。需通過支付寶產品中心開通。"
            }
          ]
        }
      },
      {
        "label": "appid",
        "slug": "appid",
        "type": "input",
        "attrs": {}
      },
      {
        "label": "支付寶公鑰",
        "slug": "alipay_key",
        "type": "textarea",
        "attrs": {
          "placeholder": ""
        }
      },
      {
        "label": "應用公鑰",
        "slug": "public_key",
        "type": "textarea"
      },
      {
        "label": "應用私鑰",
        "slug": "private_key",
        "type": "textarea"
      },
      {
        "slug": "ali_divider",
        "label": "",
        "type": "divider",
        "value": {
          "content-position": "left"
        }
      }
    ],
    "default": {
      "open": "0",
      "native": "1",
      "h5": "0",
      "appid": "",
      "alipay_key": "",
      "public_key": "",
      "private_key": ""
    }
  },
  "wx": {
    "label": "微信收款",
    "group": "pay",
    "slug": "wx",
    "fields": [
      {
        "label": "微信收款",
        "slug": "open",
        "type": "switch",
        "attrs": {
          "inactive-value": "0",
          "active-value": "1",
          "remark": {
            "1": "已開啟",
            "0": "未啟用"
          }
        }
      },
      {
        "label": "終端",
        "slug": "wx_end",
        "type": "checkbox-group",
        "group": {
          "fields": [
            {
              "label": "Native支付",
              "slug": "native",
              "type": "checkbox",
              "tips": "Native支付即使用者訪問PC網站掃描支付。需通過微信支付申請開通。",
              "attrs": {
                "true-value": "1",
                "false-value": "0",
                "disabled": true
              }
            },
            {
              "label": "H5支付",
              "slug": "h5",
              "type": "checkbox",
              "tips": "H5支付即使用者手機端訪問網站購買時撥出微信APP支付。需通過微信支付申請開通。",
              "attrs": {
                "true-value": "1",
                "false-value": "0"
              }
            }
          ]
        }
      },
      {
        "label": "公眾號appid",
        "slug": "appid",
        "type": "input",
        "attrs": {
          "placeholder": ""
        }
      },
      {
        "label": "公眾號appsecret",
        "slug": "appsecret",
        "type": "input"
      },
      {
        "label": "商戶ID",
        "slug": "merchantid",
        "type": "input"
      },
      {
        "label": "商戶支付金鑰",
        "slug": "key",
        "type": "input"
      },
      {
        "slug": "ali_divider",
        "label": "",
        "type": "divider",
        "value": {
          "content-position": "left"
        }
      }
    ],
    "default": {
      "open": "0",
      "native": "1",
      "h5": "0",
      "appid": "",
      "appsecret": "",
      "merchantid": "",
      "key": ""
    }
  },
  "paypal": {
    "label": "PayPal",
    "group": "pay",
    "slug": "paypal",
    "fields": [
      {
        "label": "PayPal",
        "slug": "open",
        "type": "switch",
        "attrs": {
          "inactive-value": "0",
          "active-value": "1",
          "remark": {
            "0": "已開啟",
            "1": "未啟用"
          }
        }
      },
      {
        "label": "Client ID",
        "slug": "paypal_client_id",
        "type": "input",
        "attrs": {
          "placeholder": "請輸入您的PayPal Client ID"
        }
      },
      {
        "label": "Client Secret",
        "slug": "paypal_client_secret",
        "type": "input",
        "attrs": {
          "placeholder": "請輸入您的PayPal金鑰"
        }
      },
      {
        "label": "貨幣型別",
        "slug": "currency",
        "type": "select",
        "attrs": {
          "placeholder": "請選擇貨幣型別",
          "items": [
            {
              "value": "USD",
              "label": "美元"
            },
            {
              "value": "TWD",
              "label": "新臺幣"
            },
            {
              "value": "HKD",
              "label": "港幣"
            },
            {
              "value": "JPY",
              "label": "日元"
            }
          ]
        }
      },
      {
        "label": "汇率",
        "slug": "ex_rate",
        "type": "input",
        "attrs": {
          "placeholder": "支付货币与系统金额汇率"
        }
      },
      {
        "label": "API用户名",
        "slug": "acct1_username",
        "type": "input",
        "attrs": {
          "placeholder": "API签名凭证 用户名"
        }
      },
      {
        "label": "API密码",
        "slug": "acct1_password",
        "type": "input",
        "attrs": {
          "placeholder": "API签名凭证 密码"
        }
      },
      {
        "label": "API签名",
        "slug": "acct1_signature",
        "type": "input",
        "attrs": {
          "placeholder": "API签名凭证 签名"
        }
      },
      {
        "label": "沙箱模式",
        "slug": "sandbox",
        "type": "switch",
        "attrs": {
          "inactive-value": "0",
          "active-value": "1",
          "remark": {
            "0": "已關閉測試模式，支付將直接到達您的PayPal賬戶",
            "1": "已啟用測試模式"
          }
        },
        "group": {
          "fields": [
            {
              "label": "Client ID",
              "slug": "paypal_id_sb",
              "type": "input",
              "show": "1",
              "attrs": {
                "placeholder": "沙箱 Client ID"
              }
            },
            {
              "label": "Client Secret",
              "slug": "paypal_secret_sb",
              "type": "input",
              "show": "1",
              "attrs": {
                "placeholder": "沙箱 PayPal金鑰"
              }
            },
            {
              "label": "API用户名",
              "slug": "sb_acct1_username",
              "type": "input",
              "show": "1",
              "attrs": {
                "placeholder": "API签名凭证 用户名"
              }
            },
            {
              "label": "API密码",
              "slug": "sb_acct1_password",
              "type": "input",
              "show": "1",
              "attrs": {
                "placeholder": "API签名凭证 密码"
              }
            },
            {
              "label": "API签名",
              "slug": "sb_acct1_signature",
              "type": "input",
              "show": "1",
              "attrs": {
                "placeholder": "API签名凭证 签名"
              }
            }
          ]
        }
      }
    ],
    "default": {
      "open": "0",
      "currency": "TWD",
      "sandbox": "0",
      "paypal_secret_sb": "",
      "paypal_id_sb": "",
      "paypal_client_secret": "",
      "paypal_client_id": ""
    }
  },
  "prompt": {
    "label": "配置說明",
    "group": "pay",
    "slug": "prompt",
    "items": [
      "官方介面 - 極力推薦企業備案網站申請官方支付介面，合法合規。",
      "<a href=\"https://www.wbolt.com/alipay-api.html\" target=\"_blank\">檢視支付寶官方API介面申請及配置教程？</a>",
      "<a href=\"https://www.wbolt.com/wechat-pay-api.html\" target=\"_blank\">檢視微信支付官方API介面申請及配置教程？</a>"
    ]
  }
}