PayPal processing 页面事件数据与 Denied 取消订单 (2026-07-01)

接口变更

user

  • POST /api/worktask_page_event_list/list

    • 功能:获取用户侧 work task 页面事件列表。
    • 变更:type=paypal_processing 事件的 data 不再是 null,现在返回当前支付 order 的 busable_info,包含 pay_type / work_task_id / price_change_id
  • POST /api/work_tasks/paying_order

    • 功能:查询 work task 当前是否存在支付中的订单。
    • 变更:当 PayPal capture 最终进入 DENIED / DECLINED / FAILED 后,后端会取消本地 order;此接口不再返回该订单作为 paying_order
  • GET /api/work_tasks/info

    • 功能:获取 work task 详情。
    • 变更:当 PayPal capture denied 后,当前支付 order 已取消,data.paying_order 会变为 null
  • POST /api/product_licenses/info

    • 功能:获取 product license 详情。
    • 变更:当 PayPal capture denied 后,本地 order 会取消,关联 license 也会进入 cancelled;不再返回支付中的 paying_order

artist_center

  • POST /api/artist_center/worktask_page_event_list/list
    • 功能:获取 artist 侧 work task 页面事件列表。
    • 变更:type=paypal_processing 事件的 data 不再是 null,现在返回当前支付 order 的 busable_info,包含 pay_type / work_task_id / price_change_id

状态语义

PayPal capture denied

PayPal capture 进入 DENIED / DECLINED / FAILED 时,后端现在统一取消到 order 层级:

层级字段
PayPal checkout sessionstatusfailed
本地 orderorders.statuscancelled
Work task paying orderdata.paying_ordernull
Product licensestatuscancelled
paypal_processing 页面事件is_closetrue

Work task 场景下,用户再次支付会创建新的 order,可以重新选择支付渠道。Product license 场景下,license 已取消,需要重新购买/创建新的支付流程。

PayPal processing 页面事件 data

PayPal capture 进入 PENDING 并映射为本地 processing 时,后端会为 user 和 artist 各创建一条 paypal_processing 页面事件。

事件字段:

字段
typepaypal_processing
data_idnull
data当前 order 的 busable_info
data.pay_typestage_pay / full_pay / price_change
data.work_task_idwork task id
data.price_change_id改价支付时为 price change id,否则为 null

接口示例

user

POST /api/worktask_page_event_list/list

  • 功能说明:获取用户侧 work task 页面事件列表。
  • 变更说明:paypal_processing 事件返回 data.pay_type,前端可用它区分支付类型。

请求参数

字段类型必填说明
work_task_idnumberwork task id

请求示例

{
  "work_task_id": 123
}

响应示例

{
  "data": [
    {
      "id": 9001,
      "work_task_id": 123,
      "type": "paypal_processing",
      "data_id": null,
      "to": "user",
      "is_close": false,
      "data": {
        "pay_type": "stage_pay",
        "work_task_id": 123,
        "price_change_id": null
      },
      "created_at": "2026-07-01T08:00:00.000000Z",
      "updated_at": "2026-07-01T08:00:00.000000Z"
    }
  ]
}

错误响应

无新增,沿用原有错误语义。

POST /api/work_tasks/paying_order

  • 功能说明:查询 work task 当前支付中订单。
  • 变更说明:PayPal capture denied 后,本地 order 已取消,因此不会继续作为 paying order 返回。

响应示例:PayPal denied 后

{
  "data": {
    "has_paying_order": false,
    "paying_order": null,
    "payment": null,
    "pre_calc": null
  }
}

错误响应

无新增,沿用原有错误语义。

artist_center

POST /api/artist_center/worktask_page_event_list/list

  • 功能说明:获取 artist 侧 work task 页面事件列表。
  • 变更说明:paypal_processing 事件返回 data.pay_type,前端可用它区分支付类型。

请求参数

字段类型必填说明
work_task_idnumberwork task id

请求示例

{
  "work_task_id": 123
}

响应示例

{
  "data": [
    {
      "id": 9002,
      "work_task_id": 123,
      "type": "paypal_processing",
      "data_id": null,
      "to": "artist",
      "is_close": false,
      "data": {
        "pay_type": "stage_pay",
        "work_task_id": 123,
        "price_change_id": null
      },
      "created_at": "2026-07-01T08:00:00.000000Z",
      "updated_at": "2026-07-01T08:00:00.000000Z"
    }
  ]
}

错误响应

无新增,沿用原有错误语义。

兼容性说明

  • paypal_processing.datanull 变为对象,前端应按可选对象读取。
  • 前端可直接使用 event.data.pay_type 区分 stage_pay / full_pay / price_change
  • PAYMENT.CAPTURE.DENIED 后不再让用户继续使用原 PayPal order;work task 重新支付会创建新的本地 order,并允许重新选择支付渠道。
  • paypal_processing 事件关闭后不会从列表接口返回;前端收到 worktask.refresh 后应重新拉取 work task 详情或 page event list。