lesscode-pay 0.0.2__cp37-abi3-win_amd64.whl

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.
@@ -0,0 +1,5 @@
1
+ from .lesscode_pay import *
2
+
3
+ __doc__ = lesscode_pay.__doc__
4
+ if hasattr(lesscode_pay, "__all__"):
5
+ __all__ = lesscode_pay.__all__
Binary file
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: lesscode_pay
3
+ Version: 0.0.2
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: Operating System :: OS Independent
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Requires-Dist: cryptography>=44.0.2
9
+ Requires-Dist: requests>=2.31.0
10
+ Requires-Dist: xmltodict>=0.14.2
11
+ License-File: LICENSE
12
+ Summary: 统一的低代码支付SDK(微信支付 V2/V3、支付宝、银联、Stripe 等 14 大支付平台),基于 Rust+pyo3
13
+ Keywords: payment,wechat,alipay,stripe,paypal,unionpay
14
+ Author-email: navysummer <navysummer@yeah.net>
15
+ Requires-Python: >=3.7
16
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
17
+ Project-URL: Homepage, https://example.com/lesscode_pay
18
+ Project-URL: Source, https://github.com/navysummer/lesscode_pay
19
+
20
+ # lesscode_pay
21
+
22
+ 面向 Python 的 Rust+PyO3 支付 SDK,覆盖 **14 大支付平台**,参数与返回对齐官方文档。
23
+
24
+ ## 安装
25
+
26
+ ```bash
27
+ pip install lesscode_pay
28
+ ```
29
+
30
+ 或从源码构建:
31
+
32
+ ```bash
33
+ pip install maturin
34
+ maturin build --release
35
+ pip install target/wheels/lesscode_pay-*.whl
36
+ ```
37
+
38
+ ## 支持的支付平台
39
+
40
+ | 支付平台 | 类名 | 签名方式 | 方法数 |
41
+ |----------|------|----------|--------|
42
+ | 微信支付 V2 | `WeChatPayV2` | MD5 | 47 |
43
+ | 微信支付 V3 直连 | `WeChatPayV3Common` | WECHATPAY2-SHA256-RSA2048 | 100+ |
44
+ | 微信支付 V3 APP | `WeChatPayV3App` | WECHATPAY2-SHA256-RSA2048 | 8 |
45
+ | 微信支付 V3 服务商 | `WeChatPayV3Partner` | WECHATPAY2-SHA256-RSA2048 | 10+ |
46
+ | 支付宝 | `AlipayClient` | RSA2 | 22(通用 execute 可调任意接口) |
47
+ | QQ 钱包支付 | `QQPayClient` | MD5 | 24 |
48
+ | 抖音支付 | `DouyinPayClient` | RSA-SHA256 | 20 |
49
+ | 百度支付 | `BaiduPayClient` | RSA-SHA256 | 16 |
50
+ | 网易支付 | `NetEasePayClient` | MD5 | 19 |
51
+ | 银联支付 | `UnionPayClient` | RSA-SHA256 | 24 |
52
+ | 京东支付 | `JDPayClient` | RSA-SHA256 | 15 |
53
+ | 易宝支付 | `YeePayClient` | RSA-SHA256 | 17 |
54
+ | Stripe | `StripeClient` | Bearer Token | 64 |
55
+ | PayPal | `PayPalClient` | OAuth2 Bearer Token | 50 |
56
+
57
+ ## 快速开始
58
+
59
+ ```python
60
+ import lesscode_pay as pay
61
+
62
+ # 微信支付 V3 - JSAPI 下单
63
+ c = pay.WeChatPayV3Common(
64
+ mchid="1234567890",
65
+ cert_serial_no="ABCD1234",
66
+ private_key_pem="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
67
+ )
68
+ resp = c.create_order_jsapi(
69
+ out_trade_no="T20240001",
70
+ total=100,
71
+ description="测试商品",
72
+ payer_openid="oUpF8uMuAJO_M2pxb1Q9zNjWeS6o",
73
+ notify_url="https://your-domain.com/notify",
74
+ )
75
+ print(f"prepay_id: {resp['prepay_id']}")
76
+
77
+ # Stripe - 创建 PaymentIntent
78
+ stripe = pay.StripeClient(api_key="sk_test_xxx")
79
+ pi = stripe.create_payment_intent('{"amount":2000,"currency":"usd"}')
80
+
81
+ # 银联 - 消费
82
+ union = pay.UnionPayClient(
83
+ mer_id="123456",
84
+ private_key_pem="-----BEGIN PRIVATE KEY-----\n...",
85
+ public_key_pem="-----BEGIN PUBLIC KEY-----\n...",
86
+ )
87
+ form = union.consume("O20240001", "100", "https://your-domain.com/notify", "https://your-domain.com/return")
88
+ ```
89
+
90
+ ## 文档
91
+
92
+ 详细文档与用法见 `doc/` 目录:
93
+
94
+ - [全部文档索引](doc/index.md)
95
+ - [完整 API 参考](doc/api_reference.md)
96
+ - [微信支付 V2](doc/wx_v2.md)
97
+ - [微信支付 V3](doc/wx_v3.md)
98
+ - [支付宝](doc/alipay.md)
99
+ - [QQ 钱包支付](doc/qqpay.md)
100
+ - [抖音支付](doc/douyin.md)
101
+ - [百度支付](doc/baidu.md)
102
+ - [网易支付](doc/netease.md)
103
+ - [银联支付](doc/unionpay.md)
104
+ - [京东支付](doc/jdpay.md)
105
+ - [易宝支付](doc/yeepay.md)
106
+ - [Stripe](doc/stripe.md)
107
+ - [PayPal](doc/paypal.md)
108
+
109
+ ## 示例
110
+
111
+ 各平台使用示例见 `example/` 目录。
112
+
113
+ ## 设计原则
114
+
115
+ 1. **原生 API 对接**:直接对接各支付平台原始 HTTP API,无第三方支付 SDK 封装
116
+ 2. **零第三方 Rust 依赖**:仅使用 `pyo3`,所有支付逻辑通过 Rust 原生实现
117
+ 3. **统一接口风格**:所有平台采用一致的参数命名和调用方式
118
+ 4. **跨平台**:支持 Python 3.8+,macOS/Linux/Windows
119
+
@@ -0,0 +1,7 @@
1
+ lesscode_pay/__init__.py,sha256=cyrHmPmEL-nMsPlm9_PWHfNf3it9URtE7YZex9F6ztQ,131
2
+ lesscode_pay/lesscode_pay.pyd,sha256=gjSD_Z2l7fqYEUc2j_-x65m1oo-rBujhBaGILUWMx3I,7692800
3
+ lesscode_pay-0.0.2.dist-info/METADATA,sha256=dJ2W22Iu4cvExSgeMCM-rv8w61CIGnHQVpU2brRmRDk,4052
4
+ lesscode_pay-0.0.2.dist-info/WHEEL,sha256=09_vUEnfbWBrz5OR6cLtUqkXgJTBs2d7uED_QYKBCvM,95
5
+ lesscode_pay-0.0.2.dist-info/licenses/LICENSE,sha256=bhEkRfADbaNu2aqslTLDjb-mR0MweQHE3QxTzAmLBtI,81
6
+ lesscode_pay-0.0.2.dist-info/sboms/lesscode_pay.cyclonedx.json,sha256=Jili5gu88Uzf1DfUhF6nftZp6qvUzNJibMUchltOBQI,205125
7
+ lesscode_pay-0.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.1)
3
+ Root-Is-Purelib: false
4
+ Tag: cp37-abi3-win_amd64
@@ -0,0 +1,5 @@
1
+ MIT License
2
+
3
+ Copyright (c) [year] [fullname]
4
+
5
+ Permission is hereby granted...