### Install go-cmb Source: https://github.com/ahkevinxy/go-cmb/blob/master/README.md Installs the go-cmb package using the go get command. ```bash go get -u github.com/ahKevinXy/go-cmb ``` -------------------------------- ### Install go-cmb Source: https://github.com/ahkevinxy/go-cmb/blob/master/docs/index.md Installs the go-cmb library using the go get command. This is the primary method to include the library in your Go project. ```bash go get -u github.com/ahKevinXy/go-cmb ``` -------------------------------- ### Generate Test Data Configuration Source: https://github.com/ahkevinxy/go-cmb/blob/master/docs/index.md Commands to create and populate the testdata directory for local testing. It involves creating the directory and copying a template file. ```bash # 创建 testdata目录 mkdir testdata # 生成 testdata.go 文件 cp -rf testdata.go.template testdata/testdata.go ``` -------------------------------- ### Generate testdata.go Source: https://github.com/ahkevinxy/go-cmb/blob/master/README.md Creates the testdata.go file by copying and renaming a template file. This is used for local testing and debugging. ```bash # 创建 testdata目录 mkdir testdata # 生成 testdata.go 文件 cp -rf testdata.go.template testdata/testdata.go ``` -------------------------------- ### Local Test Data Configuration Source: https://github.com/ahkevinxy/go-cmb/blob/master/docs/index.md Defines constants for merchant and Sass platform configurations used in local testing. Includes fields for user IDs, keys, and API endpoints. ```go package testdata // 商户配置 const ( UserId = "" // 用户ID Account = "" //账户 UserKey = "" // 用户秘钥 AseKey = "" // 对称秘钥 BankLinkNo = "" // 分行号 ) // Sass平台配置 const ( CmbSassName = "" // Sass 名称 CmbSassPrivateKey = "" // 平台私钥 CmbSigdatDefault = "" // 默认值 CmbUrl = "" // 银企直联地址 ) const IsDebug = true // 判断是否是debug 模式 打印相关请求参数 ``` -------------------------------- ### Google Analytics Initialization Source: https://github.com/ahkevinxy/go-cmb/blob/master/docs/_includes/head.html This snippet initializes the Google Analytics data layer and configures the tracking ID. It ensures that analytics events can be sent to Google Analytics. ```javascript window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-B24LDL7T4W'); ``` -------------------------------- ### Local Test Data Configuration Source: https://github.com/ahkevinxy/go-cmb/blob/master/README.md Defines constants for configuring merchant and Sass platform details for local testing. Includes user ID, account, keys, and API endpoint. ```go package testdata // 商户配置 const ( UserId = "" // 用户ID Account = "" //账户 UserKey = "" // 用户秘钥 AseKey = "" // 对称秘钥 BankLinkNo = "" // 分行号 ) // Sass平台配置 const ( CmbSassName = "" // Sass 名称 CmbSassPrivateKey = "" // 平台私钥 CmbSigdatDefault = "" // 默认值 CmbUrl = "" // 银企直联地址 ) const IsDebug = true // 判断是否是debug 模式 打印相关请求参数 ``` -------------------------------- ### CMB Direct Connect API Endpoints Source: https://github.com/ahkevinxy/go-cmb/blob/master/docs/index.md Lists various API endpoints provided by China Merchants Bank for direct connect services. These cover operations like account inquiries, transaction details, and batch processing. ```APIDOC 可经办业务模式查询: DCLISMOD 账户详细信息查询: NTQACINF 查询交易概要信息: NTAGCINN 电子回单查询: DCAGPPDF 批量查询余额: NTQADINF 新增记账子单元: NTDMAADD 查询记账子单元当天交易: NTDMTQRD 查询记账子单元历史交易: NTDMTHLS 查询记账子单元余额: NTDMABAL 记账子单元内部转账: NTDMITRX 超网代发其他: NTAGCAPI 查询交易明细信息: NTAGDINF 代发明细对账单处理结果查询请求: DCTASKID 查询记账子单元信息: NTDMALST 关闭子单元: NTDMADLT 设置记账子单元关联付款方信息: NTDMARLT 删除记账子单元关联付款方信息: NTDMARLD 修改记账子单元关联付款方信息: NTDMATMN 查询记账子单元关联付款信息: NTDMARLQ ``` -------------------------------- ### China Merchants Bank API Operations Source: https://github.com/ahkevinxy/go-cmb/blob/master/README.md Lists various API operations available for interacting with China Merchants Bank's direct banking services. These include account inquiries, transaction processing, and more. ```APIDOC 可经办业务模式查询 `DCLISMOD` 账户详细信息查询 `NTQACINF` 查询交易概要信息 `NTAGCINN` 电子回单查询 `DCAGPPDF` 批量查询余额 `NTQADINF` 新增记账子单元 `NTDMAADD` 查询记账子单元当天交易 `NTDMTQRD` 查询记账子单元历史交易 `NTDMTHLS` 查询记账子单元余额 `NTDMABAL` 记账子单元内部转账 `NTDMITRX` 超网代发其他 `NTAGCAPI` 查询交易明细信息 `NTAGDINF` 代发明细对账单处理结果查询请求 `DCTASKID` 查询记账子单元信息 `NTDMALST` 关闭子单元 `NTDMADLT` 设置记账子单元关联付款方信息 `NTDMARLT` 删除记账子单元关联付款方信息 `NTDMARLD` 修改记账子单元关联付款方信息 `NTDMATMN` 查询记账子单元关联付款信息 `NTDMARLQ` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.