|
@@ -17,7 +17,7 @@
|
|
|
- 每个门店独立使用 `pos_store_omg` 中已启用的 `MerchantID / HashKey / HashIV`;不修改可信凭证存储与管理代码。
|
|
- 每个门店独立使用 `pos_store_omg` 中已启用的 `MerchantID / HashKey / HashIV`;不修改可信凭证存储与管理代码。
|
|
|
- 新创建入口固定 `POST /pay/omg/create`;Controller 使用 `@RequestHeader String token`、显式 `@RequestBody` DTO,禁止 Map 入参和 Bean Validation。
|
|
- 新创建入口固定 `POST /pay/omg/create`;Controller 使用 `@RequestHeader String token`、显式 `@RequestBody` DTO,禁止 Map 入参和 Bean Validation。
|
|
|
- 客户端请求只含 `orderId`;金额、门店、网关、ReturnURL、说明、支付方式和签名全部由服务端产生。
|
|
- 客户端请求只含 `orderId`;金额、门店、网关、ReturnURL、说明、支付方式和签名全部由服务端产生。
|
|
|
-- `ChoosePayment=ALL`、`IgnorePayment=ATM#CVS#BarcodeATM`、`NeedExtraPaidInfo=Y`;优先在 OMG 官方页面保留信用卡与 Apple Pay。官方参数不能隐藏 AFTEE,stage 验收必须记录实际展示结果。所有实际发送的非 `CheckMacValue` 字段全部参加检查码计算。
|
|
|
|
|
|
|
+- `ChoosePayment=Credit`、`UnionPay=2`、`NeedExtraPaidInfo=Y`;OMG 官方页面只开放信用卡和 Apple Pay,并隐藏银联。Apple Pay 是否显示取决于门店开通状态和设备环境。所有实际发送的非 `CheckMacValue` 字段全部参加检查码计算。
|
|
|
- 回调必须对全部实际返回字段验签,包含未知额外字段与空值字段,只有 `CheckMacValue` 排除。
|
|
- 回调必须对全部实际返回字段验签,包含未知额外字段与空值字段,只有 `CheckMacValue` 排除。
|
|
|
- 网关固定 `https://payment-stage.funpoint.com.tw/Cashier/AioCheckOut/V5`,不得配置正式环境回退。
|
|
- 网关固定 `https://payment-stage.funpoint.com.tw/Cashier/AioCheckOut/V5`,不得配置正式环境回退。
|
|
|
- 同一 `ddId` 最多一条 `CREATED`;存在时返回 `PAYMENT_ATTEMPT_EXISTS`,不重放旧表单、不生成新 MerchantTradeNo。
|
|
- 同一 `ddId` 最多一条 `CREATED`;存在时返回 `PAYMENT_ATTEMPT_EXISTS`,不重放旧表单、不生成新 MerchantTradeNo。
|
|
@@ -301,8 +301,8 @@ fields.put("TradeDesc", "Foodie order " + safeOrderId);
|
|
|
fields.put("ItemName", "Order " + safeOrderId);
|
|
fields.put("ItemName", "Order " + safeOrderId);
|
|
|
fields.put("ReturnURL", properties.requireSafeReturnUrl());
|
|
fields.put("ReturnURL", properties.requireSafeReturnUrl());
|
|
|
fields.put("OrderResultURL", properties.requireSafeOrderResultUrl());
|
|
fields.put("OrderResultURL", properties.requireSafeOrderResultUrl());
|
|
|
-fields.put("ChoosePayment", "ALL");
|
|
|
|
|
-fields.put("IgnorePayment", "ATM#CVS#BarcodeATM");
|
|
|
|
|
|
|
+fields.put("ChoosePayment", "Credit");
|
|
|
|
|
+fields.put("UnionPay", "2");
|
|
|
fields.put("EncryptType", "1");
|
|
fields.put("EncryptType", "1");
|
|
|
fields.put("InvoiceMark", "N");
|
|
fields.put("InvoiceMark", "N");
|
|
|
fields.put("NeedExtraPaidInfo", "Y");
|
|
fields.put("NeedExtraPaidInfo", "Y");
|
|
@@ -1000,7 +1000,7 @@ rg -n "com\.ruoyi\.app\.pay\.OmgPayController|com\.ruoyi\.app\.utils\.omg|pos_or
|
|
|
rg -n "HashKey|HashIV|CheckMacValue|formFields|token" ruoyi-admin/src/main/java/com/ruoyi/app/omgpay
|
|
rg -n "HashKey|HashIV|CheckMacValue|formFields|token" ruoyi-admin/src/main/java/com/ruoyi/app/omgpay
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-Interpret results manually: stage URL、`OrderResultURL`、`ChoosePayment=ALL` 与 `IgnorePayment` 是预期结果;production URL、其他禁用字段、`UnionPay`、旧 import 和敏感值日志不是预期结果。
|
|
|
|
|
|
|
+Interpret results manually: stage URL、`OrderResultURL`、`ChoosePayment=Credit` 与 `UnionPay=2` 是预期结果;production URL、`ChoosePayment=ALL`、`IgnorePayment`、其他禁用字段、旧 import 和敏感值日志不是预期结果。
|
|
|
|
|
|
|
|
- [ ] **Step 4: Check comments and log statements**
|
|
- [ ] **Step 4: Check comments and log statements**
|
|
|
|
|
|
|
@@ -1130,11 +1130,11 @@ No constitution violations. The separate form factory, signer, generator and per
|
|
|
5. 两个并发 retry 即使都查到同一旧交易,也只有先取得订单锁者能替换;后取得者看到活动交易号变化后返回 `PAYMENT_RETRY_NOT_AVAILABLE`。
|
|
5. 两个并发 retry 即使都查到同一旧交易,也只有先取得订单锁者能替换;后取得者看到活动交易号变化后返回 `PAYMENT_RETRY_NOT_AVAILABLE`。
|
|
|
6. retry 成功复用 create 响应,返回新 `MerchantTradeNo` 的新表单。无需数据库结构变更,现有 `attempt_status=3` 与生成列唯一键已覆盖该流程。
|
|
6. retry 成功复用 create 响应,返回新 `MerchantTradeNo` 的新表单。无需数据库结构变更,现有 `attempt_status=3` 与生成列唯一键已覆盖该流程。
|
|
|
|
|
|
|
|
-## 2026-08-14 OMG 官方收银台渠道过滤实施计划
|
|
|
|
|
|
|
+## 2026-08-17 OMG 官方收银台严格渠道过滤实施计划
|
|
|
|
|
|
|
|
-**Goal:** 保持 App 直接进入 OMG 官方收银台,通过服务端固定表单参数优先只展示信用卡与 Apple Pay。
|
|
|
|
|
|
|
+**Goal:** 保持 App 直接进入 OMG 官方收银台,通过服务端固定表单参数严格只开放信用卡与 Apple Pay。
|
|
|
|
|
|
|
|
-**Architecture:** 不修改 `POST /pay/omg/create`、`POST /pay/omg/retry` 的请求或响应结构。两条路径继续复用 `OmgPaymentFormFactory#create(...)`;工厂将单渠道 `Credit + UnionPay=2` 改为 `ChoosePayment=ALL + IgnorePayment=ATM#CVS#BarcodeATM`,并把过滤字段纳入 `CheckMacValue`。
|
|
|
|
|
|
|
+**Architecture:** 不修改 `POST /pay/omg/create`、`POST /pay/omg/retry` 的请求或响应结构。两条路径继续复用 `OmgPaymentFormFactory#create(...)`;工厂固定发送 `ChoosePayment=Credit` 与 `UnionPay=2`,移除 `ChoosePayment=ALL` 和 `IgnorePayment`,并把两个固定渠道字段纳入 `CheckMacValue`。
|
|
|
|
|
|
|
|
**Tech Stack:** Java 21、Spring Boot、JUnit 5、Mockito、Maven、OMG AIO stage。
|
|
**Tech Stack:** Java 21、Spring Boot、JUnit 5、Mockito、Maven、OMG AIO stage。
|
|
|
|
|
|
|
@@ -1148,18 +1148,18 @@ No constitution violations. The separate form factory, signer, generator and per
|
|
|
**Interfaces:**
|
|
**Interfaces:**
|
|
|
|
|
|
|
|
- Consumes: `OmgPaymentFormFactory#create(String orderId, Integer amount, String merchantId, String hashKey, String hashIv, String merchantTradeNo)`
|
|
- Consumes: `OmgPaymentFormFactory#create(String orderId, Integer amount, String merchantId, String hashKey, String hashIv, String merchantTradeNo)`
|
|
|
-- Produces: 原接口不变;`OmgPaymentForm.fields()` 返回包含 `ChoosePayment=ALL`、`IgnorePayment=ATM#CVS#BarcodeATM` 且不含 `UnionPay` 的不可变字段集合。
|
|
|
|
|
|
|
+- Produces: 原接口不变;`OmgPaymentForm.fields()` 返回包含 `ChoosePayment=Credit`、`UnionPay=2` 且不含 `IgnorePayment` 的不可变字段集合。
|
|
|
|
|
|
|
|
-- [x] 将测试改为 `buildsSignedFormThatUsesOmgPageForCreditAndApplePay`:字段集合移除 `UnionPay`、加入 `IgnorePayment`;断言 `ChoosePayment=ALL`、`IgnorePayment=ATM#CVS#BarcodeATM`、无 `UnionPay`;签名入参仍为 14 个非 `CheckMacValue` 字段。
|
|
|
|
|
-- [x] 使用 JDK 21 运行 `OmgPaymentFormFactoryTest`,确认当前 `ChoosePayment=Credit`、缺少 `IgnorePayment` 的实现导致测试失败。
|
|
|
|
|
-- [x] 修改 `OmgPaymentFormFactory`:删除错误的 Apple Pay 注释、`ChoosePayment=Credit` 和 `UnionPay=2`,改为以下固定字段:
|
|
|
|
|
|
|
+- [x] 将测试改为 `buildsSignedFormThatUsesOmgPageForCreditAndApplePay`:字段集合移除 `IgnorePayment`、加入 `UnionPay`;断言 `ChoosePayment=Credit`、`UnionPay=2`、无 `IgnorePayment`;签名入参仍为 14 个非 `CheckMacValue` 字段。
|
|
|
|
|
+- [ ] 按项目 OMG 延后验证约束,等待统一验证阶段使用 JDK 21 运行 `OmgPaymentFormFactoryTest`,确认旧 `ChoosePayment=ALL` 实现会使新断言失败。
|
|
|
|
|
+- [x] 修改 `OmgPaymentFormFactory`,改为以下固定字段:
|
|
|
|
|
|
|
|
```java
|
|
```java
|
|
|
-fields.put("ChoosePayment", "ALL");
|
|
|
|
|
-fields.put("IgnorePayment", "ATM#CVS#BarcodeATM");
|
|
|
|
|
|
|
+fields.put("ChoosePayment", "Credit");
|
|
|
|
|
+fields.put("UnionPay", "2");
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-- [x] 再次运行 `OmgPaymentFormFactoryTest`,确认字段集合、值和签名入参全部通过。
|
|
|
|
|
|
|
+- [ ] 在统一验证阶段再次运行 `OmgPaymentFormFactoryTest`,确认字段集合、值和签名入参全部通过。
|
|
|
|
|
|
|
|
### Task 2: App 文档、回归与提交
|
|
### Task 2: App 文档、回归与提交
|
|
|
|
|
|
|
@@ -1173,8 +1173,8 @@ fields.put("IgnorePayment", "ATM#CVS#BarcodeATM");
|
|
|
- Consumes: create/retry 现有 `{status, gatewayUrl, formFields}` 响应。
|
|
- Consumes: create/retry 现有 `{status, gatewayUrl, formFields}` 响应。
|
|
|
- Produces: App 仍直接 POST 全部 `formFields`,不增加支付渠道参数、二级选择页面或原生 Apple Pay SDK。
|
|
- Produces: App 仍直接 POST 全部 `formFields`,不增加支付渠道参数、二级选择页面或原生 Apple Pay SDK。
|
|
|
|
|
|
|
|
-- [x] 更新 App 文档中的示例表单和字段说明:`ChoosePayment=ALL`、`IgnorePayment=ATM#CVS#BarcodeATM`,删除 `UnionPay`;注明 AFTEE 不在官方可隐藏值中,需要 stage 实测。
|
|
|
|
|
-- [x] 使用 JDK 21 运行全部 OMG 定向测试:
|
|
|
|
|
|
|
+- [x] 更新规格、契约、快速验收和 App 文档中的示例表单及字段说明:`ChoosePayment=Credit`、`UnionPay=2`,删除 `IgnorePayment`;注明 Apple Pay 取决于门店开通状态和设备环境。
|
|
|
|
|
+- [ ] 在统一验证阶段使用 JDK 21 运行全部 OMG 定向测试:
|
|
|
|
|
|
|
|
```powershell
|
|
```powershell
|
|
|
$env:JAVA_HOME='C:\Users\qmj\.jdks\graalvm-jdk-21.0.7'
|
|
$env:JAVA_HOME='C:\Users\qmj\.jdks\graalvm-jdk-21.0.7'
|
|
@@ -1182,15 +1182,15 @@ $env:PATH="$env:JAVA_HOME\bin;$env:PATH"
|
|
|
mvn -pl ruoyi-admin -am "-Dtest=com.ruoyi.app.omgpay.*Test,com.ruoyi.system.omgpay.*Test" "-Dsurefire.failIfNoSpecifiedTests=false" test
|
|
mvn -pl ruoyi-admin -am "-Dtest=com.ruoyi.app.omgpay.*Test,com.ruoyi.system.omgpay.*Test" "-Dsurefire.failIfNoSpecifiedTests=false" test
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-- [x] 运行模块构建:
|
|
|
|
|
|
|
+- [ ] 在统一验证阶段运行模块构建:
|
|
|
|
|
|
|
|
```powershell
|
|
```powershell
|
|
|
mvn -pl ruoyi-admin -am -DskipTests package
|
|
mvn -pl ruoyi-admin -am -DskipTests package
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-- [x] 静态检查源码中只存在预期渠道参数,`git diff --check` 无错误,暂存清单只包含本阶段源码、测试和文档;不包含 `.claude/homunculus/*`。
|
|
|
|
|
-- [x] 将 T088-T091 标记为完成;T092 保持未完成,等待部署到 OMG stage 后人工查看收银台。
|
|
|
|
|
-- [x] 使用中文提交信息提交:`修复:调整 OMG 收银台支付渠道`。
|
|
|
|
|
|
|
+- [x] 静态检查源码中只存在预期渠道参数,`git diff --check` 无错误;暂存范围在提交前单独核对,不包含 `.claude/homunculus/*`。
|
|
|
|
|
+- [ ] 部署到 OMG stage 后人工确认信用卡可用,Apple Pay 在适用环境可用,其他渠道均不显示。
|
|
|
|
|
+- [ ] 使用中文提交信息提交并推送当前分支:`修复:限制 OMG 收银台支付方式`。
|
|
|
|
|
|
|
|
## 2026-08-14 retry 查询稀疏响应修复计划
|
|
## 2026-08-14 retry 查询稀疏响应修复计划
|
|
|
|
|
|