pixelarraythirdparty 1.3.6__tar.gz → 1.3.8__tar.gz

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.
Files changed (32) hide show
  1. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/PKG-INFO +2 -1
  2. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/__init__.py +1 -1
  3. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/order/order.py +51 -0
  4. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/project/project.py +1 -1
  5. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty.egg-info/PKG-INFO +2 -1
  6. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pyproject.toml +2 -1
  7. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/LICENSE +0 -0
  8. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/MANIFEST.in +0 -0
  9. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/client.py +0 -0
  10. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/cron/__init__.py +0 -0
  11. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/cron/cron.py +0 -0
  12. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/custom_events/__init__.py +0 -0
  13. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/custom_events/custom_events.py +0 -0
  14. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/feedback/__init__.py +0 -0
  15. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/feedback/feedback.py +0 -0
  16. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/order/__init__.py +0 -0
  17. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/product/__init__.py +0 -0
  18. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/product/product.py +0 -0
  19. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/project/__init__.py +0 -0
  20. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/project_dashboard/__init__.py +0 -0
  21. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/project_dashboard/project_dashboard.py +0 -0
  22. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/support_chat/__init__.py +0 -0
  23. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/support_chat/support_chat.py +0 -0
  24. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/unified_login/__init__.py +0 -0
  25. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/unified_login/unified_login.py +0 -0
  26. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/user/__init__.py +0 -0
  27. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty/user/user.py +0 -0
  28. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty.egg-info/SOURCES.txt +0 -0
  29. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty.egg-info/dependency_links.txt +0 -0
  30. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty.egg-info/requires.txt +0 -0
  31. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/pixelarraythirdparty.egg-info/top_level.txt +0 -0
  32. {pixelarraythirdparty-1.3.6 → pixelarraythirdparty-1.3.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pixelarraythirdparty
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: PixelArray 第三方微服务客户端
5
5
  Author-email: Lu qi <qi.lu@pixelarrayai.com>
6
6
  License-Expression: MIT
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
20
  Classifier: Topic :: Utilities
20
21
  Requires-Python: >=3.8
@@ -24,7 +24,7 @@ from .support_chat.support_chat import (
24
24
  from .custom_events.custom_events import CustomEventsManagerAsync
25
25
  from .project_dashboard.project_dashboard import ProjectDashboardManagerAsync
26
26
 
27
- __version__ = "1.3.6"
27
+ __version__ = "1.3.8"
28
28
  __author__ = "Lu qi"
29
29
  __email__ = "qi.lu@pixelarrayai.com"
30
30
 
@@ -1,3 +1,34 @@
1
+ """
2
+ 订单与支付客户端。
3
+
4
+ 商户业务回调(callback_url)
5
+ --------------------------------
6
+ 创建订单时传入 ``callback_url``(http/https)后,支付成功或退款成功时,
7
+ 本服务会向该地址 **POST** ``Content-Type: application/json``,Body 结构如下。
8
+
9
+ 公共字段(两种事件均包含)::
10
+
11
+ event (str): "order.paid" 或 "order.refunded"
12
+ out_trade_no (str): 商户订单号
13
+ payment_status (str): "PAID" 或 "REFUNDED"
14
+ payment_channel (str): "WECHAT" | "ALIPAY" | "PAYPAL"
15
+ product_id (str|None): 产品 ID
16
+ amount (float|None): 订单金额(元)
17
+ total_fee (int|None): 订单金额(分)
18
+ transaction_id (str|None): 渠道交易号
19
+ timestamp (str): 回调发送时刻,ISO 8601 UTC
20
+
21
+ 支付成功(event="order.paid")额外字段::
22
+
23
+ paid_at (str|None): 支付时间
24
+
25
+ 退款成功(event="order.refunded")额外字段::
26
+
27
+ refunded_at (str|None): 退款时间
28
+
29
+ 幂等:同一状态重复通知不会重复回调。失败时服务端最多重试 2 次(间隔 1 秒)。
30
+ 业务方接口应返回 HTTP 2xx 表示接收成功。
31
+ """
1
32
  from pixelarraythirdparty.client import AsyncClient
2
33
 
3
34
 
@@ -8,6 +39,8 @@ class OrderManagerAsync(AsyncClient):
8
39
  body: str = None,
9
40
  remark: str = None,
10
41
  payment_channel: str = "WECHAT",
42
+ amount_yuan: float = None,
43
+ callback_url: str = None,
11
44
  ):
12
45
  """
13
46
  description:
@@ -17,6 +50,10 @@ class OrderManagerAsync(AsyncClient):
17
50
  body(str): 商品描述
18
51
  remark(str): 订单备注
19
52
  payment_channel(str): 支付渠道,可选值:"WECHAT"(微信支付)、"ALIPAY"(支付宝支付)
53
+ amount_yuan(float, optional): 订单金额(元),可变金额产品必填
54
+ callback_url(str, optional): 支付/退款结果业务回调地址(http/https)。
55
+ 支付/退款成功后服务端 POST JSON 至该地址,Body 字段见本模块顶部
56
+ 「商户业务回调(callback_url)」说明。
20
57
  return:
21
58
  data(dict): 订单信息
22
59
  - id(int): 订单ID
@@ -28,6 +65,7 @@ class OrderManagerAsync(AsyncClient):
28
65
  - total_fee(int): 订单金额(分),用于支付接口
29
66
  - body(str): 商品描述
30
67
  - remark(str): 订单备注
68
+ - callback_url(str, optional): 商户业务回调地址
31
69
  - created_at(str): 订单创建时间
32
70
  - updated_at(str): 订单更新时间
33
71
  success(bool): 操作是否成功
@@ -38,6 +76,10 @@ class OrderManagerAsync(AsyncClient):
38
76
  "remark": remark,
39
77
  "payment_channel": payment_channel,
40
78
  }
79
+ if amount_yuan is not None:
80
+ data["amount_yuan"] = amount_yuan
81
+ if callback_url is not None:
82
+ data["callback_url"] = callback_url
41
83
  data, success = await self._request("POST", "/api/orders/create", json=data)
42
84
  if not success:
43
85
  return data, False
@@ -49,6 +91,8 @@ class OrderManagerAsync(AsyncClient):
49
91
  body: str = None,
50
92
  remark: str = None,
51
93
  payment_channel: str = "WECHAT",
94
+ amount_yuan: float = None,
95
+ callback_url: str = None,
52
96
  ):
53
97
  """
54
98
  description:
@@ -59,6 +103,9 @@ class OrderManagerAsync(AsyncClient):
59
103
  body(str): 商品描述
60
104
  remark(str): 订单备注
61
105
  payment_channel(str): 支付渠道,可选值:"WECHAT"、"ALIPAY"、"PAYPAL"
106
+ amount_yuan(float, optional): 订单金额(元),可变金额产品必填
107
+ callback_url(str, optional): 支付/退款结果业务回调地址(http/https)。
108
+ 回调 POST Body 结构见本模块顶部「商户业务回调(callback_url)」说明。
62
109
  return:
63
110
  data(dict): 返回数据
64
111
  - order(dict): 订单信息(字段同 create_order 返回)
@@ -71,6 +118,10 @@ class OrderManagerAsync(AsyncClient):
71
118
  "remark": remark,
72
119
  "payment_channel": payment_channel,
73
120
  }
121
+ if amount_yuan is not None:
122
+ data["amount_yuan"] = amount_yuan
123
+ if callback_url is not None:
124
+ data["callback_url"] = callback_url
74
125
  data, success = await self._request("POST", "/api/orders/create_v2", json=data)
75
126
  if not success:
76
127
  return data, False
@@ -69,7 +69,7 @@ class ProjectManagerAsync(AsyncClient):
69
69
  project_id(int): 项目ID
70
70
  name(str): 新项目名称
71
71
  return:
72
- data(dict): 更新后的项目信息(含 id、name、bound_domains、created_at)
72
+ data(dict): 更新后的项目信息(含 id、name、created_at)
73
73
  success(bool): 操作是否成功
74
74
  """
75
75
  data = {"name": name}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pixelarraythirdparty
3
- Version: 1.3.6
3
+ Version: 1.3.8
4
4
  Summary: PixelArray 第三方微服务客户端
5
5
  Author-email: Lu qi <qi.lu@pixelarrayai.com>
6
6
  License-Expression: MIT
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
17
  Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
18
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
20
  Classifier: Topic :: Utilities
20
21
  Requires-Python: >=3.8
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pixelarraythirdparty"
7
- version = "1.3.6"
7
+ version = "1.3.8"
8
8
  authors = [
9
9
  {name = "Lu qi", email = "qi.lu@pixelarrayai.com"},
10
10
  ]
@@ -23,6 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.11",
24
24
  "Programming Language :: Python :: 3.12",
25
25
  "Programming Language :: Python :: 3.13",
26
+ "Programming Language :: Python :: 3.14",
26
27
  "Topic :: Software Development :: Libraries :: Python Modules",
27
28
  "Topic :: Utilities",
28
29
  ]