cgserver 6.3.2 → 6.3.5
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GAlipayTool = void 0;
|
|
3
|
+
exports.GAlipayTool = exports.AlipayCallBack = exports.AlipayResult = void 0;
|
|
4
4
|
const alipay_sdk_1 = require("alipay-sdk");
|
|
5
5
|
const aliUtil = require("alipay-sdk/lib/util");
|
|
6
6
|
const AliPayUtil_1 = require("alipay_sdk2/AliPayUtil");
|
|
@@ -8,6 +8,51 @@ const fs = require("fs");
|
|
|
8
8
|
const FrameworkConfig_1 = require("../Config/FrameworkConfig");
|
|
9
9
|
const form_1 = require("alipay-sdk/lib/form");
|
|
10
10
|
const Log_1 = require("../Logic/Log");
|
|
11
|
+
class AlipayResult {
|
|
12
|
+
alipay_trade_app_pay_response = {
|
|
13
|
+
code: "10000",
|
|
14
|
+
msg: "Success",
|
|
15
|
+
app_id: "2021003143637369",
|
|
16
|
+
auth_app_id: "2021003143637369",
|
|
17
|
+
charset: "utf-8",
|
|
18
|
+
timestamp: "2022-08-10 16:38:04",
|
|
19
|
+
out_trade_no: "62f36e657a355ecc1cb8eec2",
|
|
20
|
+
total_amount: "0.05",
|
|
21
|
+
trade_no: "2022081022001489431433911625",
|
|
22
|
+
seller_id: "2088441785429273"
|
|
23
|
+
};
|
|
24
|
+
sign = "d/Guf6QYnuk9fFlRS1EUFTY+n3/jQKp7IwQENG4WXO+qxMGglPXa3RhUHaJELTMwC4tcKhz8Z8GCiiI1Y7G84kAql1jyoekaOMWvdPRDOjkAqouP3oh5v9r23BziJUxgv/kanBRfOoTKvIT7R0L5DyfxMpEoHdssPHAtENMiniCVZlRUkAhHxjmgMrP0rzMtBvqctC5Me6UiV1yBdGWecLk9RNwMTZF8QSXKVpWXmhmimdjjFjGMcE6r7LoV9YW1Bsvjoq2kdRMX7CJZufGk1Y5Qz8Cv+E9QxTnDJMtA0XyYzte53/dSw0W3Z4Gbosn/kV4QDBRzN39NwwuoFwGuVg==";
|
|
25
|
+
sign_type = "RSA2";
|
|
26
|
+
}
|
|
27
|
+
exports.AlipayResult = AlipayResult;
|
|
28
|
+
class AlipayCallBack {
|
|
29
|
+
gmt_create = "2022-08-10 16=38=03";
|
|
30
|
+
charset = "utf-8";
|
|
31
|
+
seller_email = "zdpuke@163.com";
|
|
32
|
+
subject = "一把砖石";
|
|
33
|
+
sign = "gytkeBGeea9V05lI6Qvvut8CZnXtXJmbb0dMDd76a6fgN2k2IO0HH4wkJylMQG3EXYJQctysURDtIB0dhqaZbDVtePsM3iQVeI2jwT3YS3XGS4xi13k8foag9vCcSgojKjxJS3ihfzuyK/Pc+KDTOQftoWP2s1dPUpJNGLcZp4sUFysl0Iyzf+2vXh4OJUPQ3DvCqePnDUawq1+AUUj63WHWvdsGCP70+eTsbKxJxWBhHfMVrwkOmUI0zivcHpHLVHbfTFvaM5LAa/ivSU8jiDHqgHYFZqqzTyZ1DLxEy0Ypo3sKBs5eK/UhdsNf5tjse7PxYJwMU2ziIo9gnqv6fQ==";
|
|
34
|
+
buyer_id = 2088202482689432;
|
|
35
|
+
invoice_amount = "0.05";
|
|
36
|
+
notify_id = 2.022081000222164e+33;
|
|
37
|
+
fund_bill_list = [{ amount: "0.05", fundChannel: "PCREDIT" }];
|
|
38
|
+
notify_type = "trade_status_sync";
|
|
39
|
+
trade_status = "TRADE_SUCCESS";
|
|
40
|
+
receipt_amount = "0.05";
|
|
41
|
+
app_id = 2021003143637369;
|
|
42
|
+
buyer_pay_amount = "0.05";
|
|
43
|
+
sign_type = "RSA2";
|
|
44
|
+
seller_id = 2088441785429273;
|
|
45
|
+
gmt_payment = "2022-08-10 16:38:03";
|
|
46
|
+
notify_time = "2022-08-10 16:38:04";
|
|
47
|
+
version = 1;
|
|
48
|
+
out_trade_no = "62f36e657a355ecc1cb8eec2";
|
|
49
|
+
total_amount = "0.05";
|
|
50
|
+
trade_no = 2.0220810220014894e+27;
|
|
51
|
+
auth_app_id = 2021003143637369;
|
|
52
|
+
buyer_logon_id = "138****3531";
|
|
53
|
+
point_amount = 0;
|
|
54
|
+
}
|
|
55
|
+
exports.AlipayCallBack = AlipayCallBack;
|
|
11
56
|
exports.GAlipayTool = null;
|
|
12
57
|
class AlipayTool {
|
|
13
58
|
_alipaySdk = null;
|
|
@@ -79,14 +124,15 @@ class AlipayTool {
|
|
|
79
124
|
*/
|
|
80
125
|
_buildOrderParams(out_trade_no, total_amount, subject = "1", body = "我是测试数据", timeout_express = "30m", product_code = "QUICK_MSECURITY_PAY") {
|
|
81
126
|
let order_params = {
|
|
82
|
-
|
|
127
|
+
notifyUrl: this._cfg.notify_url,
|
|
128
|
+
bizContent: {
|
|
83
129
|
timeout_express: timeout_express,
|
|
84
130
|
product_code: product_code,
|
|
85
|
-
total_amount: total_amount
|
|
131
|
+
total_amount: total_amount,
|
|
86
132
|
subject: encodeURIComponent(subject),
|
|
87
133
|
body: encodeURIComponent(body),
|
|
88
134
|
out_trade_no: out_trade_no
|
|
89
|
-
}
|
|
135
|
+
}
|
|
90
136
|
};
|
|
91
137
|
return order_params;
|
|
92
138
|
}
|
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
import AlipaySdk from 'alipay-sdk';
|
|
2
2
|
import { AliPayUtil } from "alipay_sdk2/AliPayUtil";
|
|
3
|
+
export declare class AlipayResult {
|
|
4
|
+
alipay_trade_app_pay_response: {
|
|
5
|
+
code: string;
|
|
6
|
+
msg: string;
|
|
7
|
+
app_id: string;
|
|
8
|
+
auth_app_id: string;
|
|
9
|
+
charset: string;
|
|
10
|
+
timestamp: string;
|
|
11
|
+
out_trade_no: string;
|
|
12
|
+
total_amount: string;
|
|
13
|
+
trade_no: string;
|
|
14
|
+
seller_id: string;
|
|
15
|
+
};
|
|
16
|
+
sign: string;
|
|
17
|
+
sign_type: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class AlipayCallBack {
|
|
20
|
+
gmt_create: string;
|
|
21
|
+
charset: string;
|
|
22
|
+
seller_email: string;
|
|
23
|
+
subject: string;
|
|
24
|
+
sign: string;
|
|
25
|
+
buyer_id: number;
|
|
26
|
+
invoice_amount: string;
|
|
27
|
+
notify_id: number;
|
|
28
|
+
fund_bill_list: {
|
|
29
|
+
amount: string;
|
|
30
|
+
fundChannel: string;
|
|
31
|
+
}[];
|
|
32
|
+
notify_type: string;
|
|
33
|
+
trade_status: string;
|
|
34
|
+
receipt_amount: string;
|
|
35
|
+
app_id: number;
|
|
36
|
+
buyer_pay_amount: string;
|
|
37
|
+
sign_type: string;
|
|
38
|
+
seller_id: number;
|
|
39
|
+
gmt_payment: string;
|
|
40
|
+
notify_time: string;
|
|
41
|
+
version: number;
|
|
42
|
+
out_trade_no: string;
|
|
43
|
+
total_amount: string;
|
|
44
|
+
trade_no: number;
|
|
45
|
+
auth_app_id: number;
|
|
46
|
+
buyer_logon_id: string;
|
|
47
|
+
point_amount: number;
|
|
48
|
+
}
|
|
3
49
|
export declare let GAlipayTool: AlipayTool;
|
|
4
50
|
declare class AlipayTool {
|
|
5
51
|
protected _alipaySdk: AlipaySdk;
|
|
@@ -28,7 +74,15 @@ declare class AlipayTool {
|
|
|
28
74
|
* @returns
|
|
29
75
|
*/
|
|
30
76
|
protected _buildOrderParams(out_trade_no: string, total_amount: number, subject?: string, body?: string, timeout_express?: string, product_code?: string): {
|
|
31
|
-
|
|
77
|
+
notifyUrl: string;
|
|
78
|
+
bizContent: {
|
|
79
|
+
timeout_express: string;
|
|
80
|
+
product_code: string;
|
|
81
|
+
total_amount: number;
|
|
82
|
+
subject: string;
|
|
83
|
+
body: string;
|
|
84
|
+
out_trade_no: string;
|
|
85
|
+
};
|
|
32
86
|
};
|
|
33
87
|
protected _sign(order_params: any): any;
|
|
34
88
|
getOrderInfo(out_trade_no: string, total_amount: number, subject?: string, body?: string): string;
|