merge: official v1.5.4 release
This commit is contained in:
Binary file not shown.
@@ -3,7 +3,7 @@ set -eu
|
||||
|
||||
root_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
repo_dir=$(CDPATH= cd -- "$root_dir/.." && pwd)
|
||||
payment_plugins="official-payment-wechat-native official-payment-alipay-page official-payment-xunhupay"
|
||||
payment_plugins="official-payment-wechat-native official-payment-alipay-page official-payment-xunhupay official-payment-zhifufm"
|
||||
payments_only=false
|
||||
default_payment_targets="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64 windows/arm64"
|
||||
|
||||
@@ -118,6 +118,7 @@ for target in $payment_targets; do
|
||||
build_payment_provider official-payment-wechat-native ./cmd/payment-wechat "$target_goos" "$target_goarch"
|
||||
build_payment_provider official-payment-alipay-page ./cmd/payment-alipay "$target_goos" "$target_goarch"
|
||||
build_payment_provider official-payment-xunhupay ./cmd/payment-xunhupay "$target_goos" "$target_goarch"
|
||||
build_payment_provider official-payment-zhifufm ./cmd/payment-zhifufm "$target_goos" "$target_goarch"
|
||||
done
|
||||
|
||||
package_plugin() {
|
||||
|
||||
Binary file not shown.
@@ -67,7 +67,7 @@
|
||||
| `response.taskId` | `{"$coalesce":[{"$ref":"response.data.task_id"},{"$ref":"response.data.taskId"},{"$ref":"response.task_id"},{"$ref":"response.taskId"},{"$ref":"response.data.id"},{"$ref":"response.id"},{"$ref":"taskId"}]}` |
|
||||
| `response.status` | `{"$coalesce":[{"$ref":"response.status"},{"$ref":"response.state"},{"$ref":"response.data.status"},"pending"]}` |
|
||||
| `response.message` | `{"$coalesce":[{"$ref":"response.error.message"},{"$ref":"response.message"},{"$ref":"response.fail_reason"}]}` |
|
||||
| `response.videos` | `{"$coalesce":[{"$ref":"response.data.result_url"},{"$ref":"response.data.video_url"},{"$ref":"response.data.output_url"},{"$ref":"response.data.url"},{"$ref":"response.data.metadata.url"},{"$ref":"response.data.data.video_url"},{"$ref":"response.data.data.output_url"},{"$ref":"response.data.data.result_url"},{"$ref":"response.data.data.url"},{"$ref":"response.data.data.metadata.url"},{"$ref":"response.video_url"},{"$ref":"response.videoUrl"},{"$ref":"response.result_url"},{"$ref":"response.output_url"},{"$ref":"response.url"},{"$ref":"response.metadata.url"},{"$ref":"response.output.url"}]}` |
|
||||
| `response.videos` | `{"$coalesce":[{"$map":{"from":{"$ref":"response.data"},"as":"item","in":{"$coalesce":[{"$ref":"item.url"},{"$ref":"item.video_url"},{"$ref":"item.videoUrl"},{"$ref":"item.output_url"},{"$ref":"item.outputUrl"}]}}},{"$ref":"response.data.result_url"},{"$ref":"response.data.video_url"},{"$ref":"response.data.output_url"},{"$ref":"response.data.url"},{"$ref":"response.data.metadata.url"},{"$ref":"response.data.data.video_url"},{"$ref":"response.data.data.output_url"},{"$ref":"response.data.data.result_url"},{"$ref":"response.data.data.url"},{"$ref":"response.data.data.metadata.url"},{"$ref":"response.video_url"},{"$ref":"response.videoUrl"},{"$ref":"response.result_url"},{"$ref":"response.output_url"},{"$ref":"response.url"},{"$ref":"response.metadata.url"},{"$ref":"response.output.url"}]}` |
|
||||
| `response.errorPaths[0]` | `"error.code"` |
|
||||
| `response.resultEphemeral` | `true` |
|
||||
|
||||
@@ -345,6 +345,33 @@
|
||||
},
|
||||
"videos": {
|
||||
"$coalesce": [
|
||||
{
|
||||
"$map": {
|
||||
"from": {
|
||||
"$ref": "response.data"
|
||||
},
|
||||
"as": "item",
|
||||
"in": {
|
||||
"$coalesce": [
|
||||
{
|
||||
"$ref": "item.url"
|
||||
},
|
||||
{
|
||||
"$ref": "item.video_url"
|
||||
},
|
||||
{
|
||||
"$ref": "item.videoUrl"
|
||||
},
|
||||
{
|
||||
"$ref": "item.output_url"
|
||||
},
|
||||
{
|
||||
"$ref": "item.outputUrl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"$ref": "response.data.result_url"
|
||||
},
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
plugin-packages/official-payment-zhifufm.yingce-plugin
Normal file
BIN
plugin-packages/official-payment-zhifufm.yingce-plugin
Normal file
Binary file not shown.
11
plugin-packages/official-payment-zhifufm/README.md
Normal file
11
plugin-packages/official-payment-zhifufm/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# 支付FM 聚合支付插件
|
||||
|
||||
支持对接支付FM免签个人收款码与签约支付通道,支持支付宝/微信扫码及收银台跳转。
|
||||
|
||||
### 插件配置参数
|
||||
- **服务器公网地址**: 本站对外公网地址,用于接收 `notifyUrl` 异步回调通知。
|
||||
- **商户号 (merchantNum)**: 支付FM商户后台【用户中心】查看的商户号。
|
||||
- **接入密钥 (secretKey)**: 支付FM商户后台【用户中心】查看的接口接入密钥。
|
||||
- **接口根地址**: 支付FM后台显示的专属根地址,例如 `https://api-5a0zvlcbi80.zhifu.fm.it88168.com/api`。
|
||||
- **默认支付通道 (payType)**: 推荐使用 `aloop` / `tloop` 或 `alipay` / `wechat`。
|
||||
- **收银方式**: 默认为 `redirect` 跳转模式。
|
||||
3
plugin-packages/official-payment-zhifufm/assets/icon.svg
Normal file
3
plugin-packages/official-payment-zhifufm/assets/icon.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 19 KiB |
BIN
plugin-packages/official-payment-zhifufm/backend/provider
Executable file
BIN
plugin-packages/official-payment-zhifufm/backend/provider
Executable file
Binary file not shown.
BIN
plugin-packages/official-payment-zhifufm/backend/provider-darwin-amd64
Executable file
BIN
plugin-packages/official-payment-zhifufm/backend/provider-darwin-amd64
Executable file
Binary file not shown.
BIN
plugin-packages/official-payment-zhifufm/backend/provider-darwin-arm64
Executable file
BIN
plugin-packages/official-payment-zhifufm/backend/provider-darwin-arm64
Executable file
Binary file not shown.
BIN
plugin-packages/official-payment-zhifufm/backend/provider-linux-amd64
Executable file
BIN
plugin-packages/official-payment-zhifufm/backend/provider-linux-amd64
Executable file
Binary file not shown.
BIN
plugin-packages/official-payment-zhifufm/backend/provider-linux-arm64
Executable file
BIN
plugin-packages/official-payment-zhifufm/backend/provider-linux-arm64
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
119
plugin-packages/official-payment-zhifufm/docs/interface.md
Normal file
119
plugin-packages/official-payment-zhifufm/docs/interface.md
Normal file
@@ -0,0 +1,119 @@
|
||||
# 支付FM 接口协议说明
|
||||
|
||||
遵循 `yingce.payment/v1` 标准,自动转换影策系统订单至支付FM `/startOrder` 接口,并在收到通知时按 MD5 规则完成异步验签。
|
||||
|
||||
<!-- YINGCE_MANIFEST_CONTRACT_START -->
|
||||
## Manifest 完整接口定义
|
||||
|
||||
以下 JSON 与插件包内实际 `manifest.json` 逐字段一致,覆盖插件身份、权限、配置、鉴权、参数、校验、创建、Agent、查询、取消、结果下载、响应和 Agent 响应映射。`documentation` 字段的值就是当前完整文档;为避免文档在自身内部无限递归,JSON 中仅用等义占位文本表示正文。
|
||||
|
||||
```json
|
||||
{
|
||||
"apiVersion": "yingce.plugin/v1",
|
||||
"id": "official-payment-zhifufm",
|
||||
"name": "支付FM",
|
||||
"version": "1.0.0",
|
||||
"author": "支付FM",
|
||||
"description": "支付FM个人免签/签约聚合支付适配器,支持微信/支付宝扫码或收银台跳转。",
|
||||
"enabled": true,
|
||||
"installable": true,
|
||||
"runtime": {
|
||||
"backend": "rpc",
|
||||
"backendEntry": "backend/provider"
|
||||
},
|
||||
"surfaces": [
|
||||
"wallet",
|
||||
"settings"
|
||||
],
|
||||
"permissions": [
|
||||
"payment.create",
|
||||
"payment.query",
|
||||
"payment.close",
|
||||
"payment.reconcile"
|
||||
],
|
||||
"configuration": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "publicBaseUrl",
|
||||
"type": "url",
|
||||
"label": "服务器公网地址",
|
||||
"required": true,
|
||||
"description": "用于生成异步通知 notifyUrl 地址,必须可被支付FM外网服务器访问回调。"
|
||||
},
|
||||
{
|
||||
"name": "merchantNum",
|
||||
"type": "string",
|
||||
"label": "商户号 (merchantNum)",
|
||||
"required": true,
|
||||
"description": "支付FM商户后台【用户中心】查看的商户号(8-18位数字)。"
|
||||
},
|
||||
{
|
||||
"name": "secretKey",
|
||||
"type": "password",
|
||||
"label": "接入密钥 (secretKey)",
|
||||
"required": true,
|
||||
"secret": true,
|
||||
"description": "支付FM商户后台【用户中心】查看的接口接入密钥。"
|
||||
},
|
||||
{
|
||||
"name": "gateway",
|
||||
"type": "url",
|
||||
"label": "接口根地址",
|
||||
"required": true,
|
||||
"default": "https://api-5a0zvlcbi80.zhifu.fm.it88168.com/api",
|
||||
"description": "支付FM分配的接口根地址,如 https://api-5a0zvlcbi80.zhifu.fm.it88168.com/api。"
|
||||
},
|
||||
{
|
||||
"name": "payType",
|
||||
"type": "string",
|
||||
"label": "默认支付通道 (payType)",
|
||||
"required": false,
|
||||
"default": "alipay",
|
||||
"description": "支付产品通道:alipay(支付宝)、wechat(微信)、aloop(支付宝轮询池)、tloop(微信轮询池)等。"
|
||||
},
|
||||
{
|
||||
"name": "checkoutMode",
|
||||
"type": "string",
|
||||
"label": "收银方式",
|
||||
"required": false,
|
||||
"default": "redirect",
|
||||
"values": [
|
||||
"redirect",
|
||||
"qr_code"
|
||||
],
|
||||
"description": "redirect 跳转支付FM收银页;qr_code 在钱包中直接将 payUrl 渲染为二维码扫码。"
|
||||
}
|
||||
]
|
||||
},
|
||||
"contributes": {
|
||||
"paymentProviders": [
|
||||
{
|
||||
"id": "zhifufm-pay",
|
||||
"label": "支付FM",
|
||||
"icon": "assets/icon.svg",
|
||||
"checkoutMode": "redirect",
|
||||
"identityFields": [
|
||||
"merchantNum"
|
||||
],
|
||||
"expiryPolicy": {
|
||||
"defaultMinutes": 10,
|
||||
"minMinutes": 3,
|
||||
"maxMinutes": 15
|
||||
},
|
||||
"notificationSuccess": {
|
||||
"status": 200,
|
||||
"contentType": "text/plain; charset=utf-8",
|
||||
"body": "success"
|
||||
},
|
||||
"notificationFailure": {
|
||||
"status": 400,
|
||||
"contentType": "text/plain; charset=utf-8",
|
||||
"body": "fail"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"documentation": "<当前插件的完整 documentation,由 README.md 与 docs/interface.md 拼接而成;为避免 JSON 递归,此处不重复展开正文。>"
|
||||
}
|
||||
```
|
||||
<!-- YINGCE_MANIFEST_CONTRACT_END -->
|
||||
107
plugin-packages/official-payment-zhifufm/manifest.json
Normal file
107
plugin-packages/official-payment-zhifufm/manifest.json
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -118,7 +118,7 @@ if [ "$require_all" = true ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
for package_id in official-payment-wechat-native official-payment-alipay-page official-payment-xunhupay; do
|
||||
for package_id in official-payment-wechat-native official-payment-alipay-page official-payment-xunhupay official-payment-zhifufm; do
|
||||
backend_dir="$root_dir/$package_id/backend"
|
||||
provider="$backend_dir/provider"
|
||||
package_file="$root_dir/$package_id.yingce-plugin"
|
||||
|
||||
Reference in New Issue
Block a user