@itpay/cli 2.0.20 → 2.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,6 +23,18 @@ function refundStateEnvelope(refund, status) {
|
|
|
23
23
|
instruction = "退款已成功;交付永久关闭。";
|
|
24
24
|
if (refund.status === "cancelled" || refund.status === "rejected")
|
|
25
25
|
instruction = "退款未执行,交付资格可恢复;旧 grant 不会复活,需要用户重新授权。";
|
|
26
|
+
if (refund.status === "failed") {
|
|
27
|
+
if (refund.failure_class === "known_no_effect")
|
|
28
|
+
instruction = "退款渠道请求确认未发送;不要自行重试。请用户联系平台管理员决定是否重新执行。";
|
|
29
|
+
else if (refund.failure_class === "retryable")
|
|
30
|
+
instruction = "退款渠道明确返回可重试失败;不要自行重试。请用户等待平台管理员处理。";
|
|
31
|
+
else if (refund.failure_class === "outcome_unknown")
|
|
32
|
+
instruction = "退款请求结果未知,交付继续锁定;必须先由平台对账,禁止重试或重复申请。";
|
|
33
|
+
else if (refund.failure_class === "permanent")
|
|
34
|
+
instruction = "退款渠道明确拒绝本次退款;不要重试。请用户联系平台支持。";
|
|
35
|
+
else
|
|
36
|
+
instruction = "退款执行失败;不要重试或重复申请,请用户联系平台支持。";
|
|
37
|
+
}
|
|
26
38
|
return {
|
|
27
39
|
status,
|
|
28
40
|
result: {
|
package/dist/src/state/config.js
CHANGED
|
@@ -12,7 +12,7 @@ import { DeviceAuthority } from "./device_authority.js";
|
|
|
12
12
|
import { OperationJournal } from "./operation_journal.js";
|
|
13
13
|
export const DEFAULT_BASE_URL = "https://app.itpay.ai";
|
|
14
14
|
export const DEV_BASE_URL = "https://dev.itpay.ai";
|
|
15
|
-
export const CLI_VERSION = "2.0.
|
|
15
|
+
export const CLI_VERSION = "2.0.21";
|
|
16
16
|
export const API_CONTRACT_REVISION = "sha256:ab3e76d7eee227c9192d41023c5bdf0e0e793bcad294287c75de6ac606f8caf7";
|
|
17
17
|
const CART_SESSION_DEFAULT_DIR = ".itpay-v3";
|
|
18
18
|
const CART_SESSION_FILENAME = "cart.json";
|
|
@@ -49,7 +49,12 @@ itpay refund get <refund_request_id> [--json]
|
|
|
49
49
|
|
|
50
50
|
- `succeeded`:instruction 明确“退款已成功;交付永久关闭”,`next=null`。
|
|
51
51
|
- `cancelled/rejected`:说明交付资格可恢复,但旧 grant 不复活,需要用户重新授权,`next=null`。
|
|
52
|
-
- `failed
|
|
52
|
+
- `failed + known_no_effect`:渠道请求确认未发送;Agent 不重试,由平台管理员决定是否重新执行,`next=null`。
|
|
53
|
+
- `failed + retryable`:渠道明确返回可重试失败;Agent 不重试,等待平台管理员处理,`next=null`。
|
|
54
|
+
- `failed + outcome_unknown`:渠道可能已受理;交付继续锁定,必须先对账,禁止重试或重复申请,`next=null`。
|
|
55
|
+
- `failed + permanent`:渠道明确拒绝;停止并联系平台支持,`next=null`。
|
|
56
|
+
|
|
57
|
+
`decision_mode=manual` 只说明该退款采用人工裁定,不得覆盖上述失败终态的 instruction。CLI 永远不向 Agent 暴露 Provider 原始响应、签名、URL、支付标识或内部错误文本。
|
|
53
58
|
|
|
54
59
|
CLI 不因为退款终态自行修改订单或 grant。
|
|
55
60
|
|
|
@@ -44,7 +44,7 @@ itpay refund watch <refund_request_id> [--interval <seconds>] [--timeout <second
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
其他终态使用与 `refund get` 相同的锁、恢复资格和旧 grant
|
|
47
|
+
其他终态使用与 `refund get` 相同的锁、恢复资格和旧 grant 规则。特别是 `failed` 必须按 `failure_class` 区分 `known_no_effect`、`retryable`、`outcome_unknown` 和 `permanent`;任何一种都不向 Agent 返回重试命令。
|
|
48
48
|
|
|
49
49
|
## Timeout 输出
|
|
50
50
|
|