Compare commits
1142 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
8633e1cd2d | 6 years ago |
|
|
ba85e469ac | 6 years ago |
|
|
5e6638547f | 6 years ago |
|
|
cfb13c8ef0 | 6 years ago |
|
|
b91b0c3e33 | 6 years ago |
|
|
78d09700ea | 6 years ago |
|
|
80cd95f334 | 6 years ago |
|
|
d14e8f8115 | 6 years ago |
|
|
025bbeb9d3 | 6 years ago |
|
|
bc49882353 | 6 years ago |
|
|
e3eab497ae | 6 years ago |
|
|
5645bb1b1a | 6 years ago |
|
|
18ecb3723f | 6 years ago |
|
|
a822b502b2 | 6 years ago |
|
|
af02fc0efb | 6 years ago |
|
|
fdf582dcdf | 6 years ago |
|
|
882aa266cb | 6 years ago |
|
|
d19cd32055 | 6 years ago |
|
|
62d8f8ead8 | 6 years ago |
|
|
1f87696d86 | 6 years ago |
|
|
e6a23af95f | 6 years ago |
|
|
04d20e52f6 | 6 years ago |
|
|
53e817431c | 6 years ago |
|
|
28213af6ba | 7 years ago |
|
|
d7d536c79d | 7 years ago |
|
|
8043684bf6 | 7 years ago |
|
|
deeb5ecdac | 7 years ago |
|
|
4bb967085a | 7 years ago |
|
|
f9fb905aa8 | 7 years ago |
|
|
8701e6ed2b | 7 years ago |
|
|
2c05cd08e3 | 7 years ago |
|
|
a05176d2b6 | 7 years ago |
|
|
b4c7d13296 | 7 years ago |
|
|
23014aad36 | 7 years ago |
|
|
ed481f683d | 7 years ago |
|
|
b1aa5090f6 | 7 years ago |
|
|
171c39bb87 | 7 years ago |
|
|
af2a7d2a41 | 7 years ago |
|
|
493d0232aa | 7 years ago |
|
|
0ec4414b33 | 7 years ago |
|
|
df8a2b2190 | 7 years ago |
|
|
196a8bc151 | 7 years ago |
|
|
8a56a0ba90 | 7 years ago |
|
|
69fedbcbf3 | 7 years ago |
|
|
a3f0c7ece6 | 7 years ago |
|
|
ed9c1eb7bb | 7 years ago |
|
|
1ba142cd90 | 7 years ago |
|
|
a902d4e60d | 7 years ago |
|
|
69e4d22e4a | 7 years ago |
|
|
e350d32b1a | 7 years ago |
|
|
f57ffdfb0a | 7 years ago |
|
|
c38ab82d42 | 7 years ago |
|
|
76517c9172 | 7 years ago |
|
|
8924e5fd82 | 7 years ago |
|
|
facc66d78a | 7 years ago |
|
|
787e8f16be | 7 years ago |
|
|
0185572e5c | 7 years ago |
|
|
1c455e0b3c | 7 years ago |
|
|
b547121472 | 7 years ago |
|
|
4b75975399 | 7 years ago |
|
|
b516a11f87 | 7 years ago |
|
|
d971fa429e | 7 years ago |
|
|
aa0e40e893 | 7 years ago |
|
|
79e8b40dfd | 7 years ago |
|
|
516344fa7b | 7 years ago |
|
|
7da5fae5eb | 7 years ago |
|
|
73cdeb69a9 | 7 years ago |
|
|
7e0f4fc5ce | 7 years ago |
|
|
c49fe18b2f | 7 years ago |
|
|
3de1210f39 | 7 years ago |
|
|
784c82a50d | 7 years ago |
|
|
360d09d94b | 7 years ago |
|
|
68e1a92672 | 7 years ago |
|
|
edbebf43fd | 7 years ago |
|
|
90a746a633 | 7 years ago |
|
|
0cb6c62614 | 7 years ago |
|
|
4dc562a41d | 7 years ago |
|
|
0c042b3aee | 7 years ago |
|
|
735cbc129b | 7 years ago |
|
|
5c1112b3a6 | 7 years ago |
|
|
2717862e29 | 7 years ago |
|
|
fe546e5024 | 7 years ago |
|
|
47f3813ec2 | 7 years ago |
|
|
7abed27b75 | 7 years ago |
|
|
27542ca725 | 7 years ago |
|
|
13abb867dd | 7 years ago |
|
|
9ff825c294 | 7 years ago |
|
|
bd4fc024b2 | 7 years ago |
|
|
533d1423ff | 7 years ago |
|
|
d47bd98773 | 7 years ago |
|
|
7c817b6174 | 7 years ago |
|
|
733a11048d | 7 years ago |
|
|
c010a67300 | 7 years ago |
|
|
f6a94fbdf3 | 7 years ago |
|
|
c259030c9a | 7 years ago |
|
|
7814d7ec83 | 7 years ago |
|
|
2244627804 | 7 years ago |
|
|
ac5c582b76 | 7 years ago |
|
|
5838189366 | 7 years ago |
|
|
c3daab80cb | 7 years ago |
|
|
5a8b03a106 | 7 years ago |
|
|
b3dac73008 | 7 years ago |
|
|
dd41e26a0d | 7 years ago |
|
|
01e10aeaf0 | 7 years ago |
|
|
04e4ec061b | 7 years ago |
|
|
6415da3819 | 7 years ago |
|
|
3f39e56b52 | 7 years ago |
|
|
e28ede416b | 7 years ago |
|
|
81fc72a9b5 | 7 years ago |
|
|
b2d1f1d6fe | 7 years ago |
|
|
1a99f59c6f | 7 years ago |
|
|
aacef2eaec | 7 years ago |
|
|
e12fa43ef4 | 7 years ago |
|
|
441a081724 | 7 years ago |
|
|
781c41f2ae | 7 years ago |
|
|
38ccb7960e | 7 years ago |
|
|
4326f52b8e | 7 years ago |
|
|
ef84384ecc | 7 years ago |
|
|
41dab53a8c | 7 years ago |
|
|
251f4095d1 | 7 years ago |
|
|
6d8559c78b | 7 years ago |
|
|
f59c424407 | 7 years ago |
|
|
3661829e80 | 7 years ago |
|
|
b2df72ef79 | 7 years ago |
|
|
6c863f745b | 7 years ago |
|
|
eaea2b336e | 7 years ago |
|
|
96f7a23400 | 7 years ago |
|
|
ae330b454c | 7 years ago |
|
|
ee4060f8ab | 7 years ago |
|
|
56cfbfe67d | 7 years ago |
|
|
9465a24947 | 7 years ago |
|
|
48100a0f98 | 7 years ago |
|
|
2b97a04e8f | 7 years ago |
|
|
40848af02f | 7 years ago |
|
|
d56edcf7e2 | 7 years ago |
|
|
4313d1e428 | 7 years ago |
|
|
ae6eca628b | 7 years ago |
|
|
795bfe8af5 | 7 years ago |
|
|
66274de89c | 7 years ago |
|
|
4e6db25d6a | 7 years ago |
|
|
228158c84d | 7 years ago |
|
|
134fe6cb29 | 7 years ago |
|
|
7204c32e9e | 7 years ago |
|
|
8e61ac1175 | 7 years ago |
|
|
2a6b4ba9d6 | 7 years ago |
|
|
07a6120651 | 7 years ago |
|
|
9cbf3d88db | 7 years ago |
|
|
56099ff991 | 7 years ago |
|
|
fe2fb3ae29 | 7 years ago |
|
|
05054f2910 | 7 years ago |
|
|
043ff80923 | 7 years ago |
|
|
1514e36e44 | 7 years ago |
|
|
d1c0bf6d5d | 7 years ago |
|
|
2ee42af5f5 | 7 years ago |
|
|
239e2fc6d2 | 7 years ago |
|
|
157805d495 | 7 years ago |
|
|
08eefe35e6 | 7 years ago |
|
|
b4f7bf6e55 | 7 years ago |
|
|
8fed9d184c | 7 years ago |
|
|
1723af4419 | 7 years ago |
|
|
7eaaf1addf | 7 years ago |
|
|
133918163b | 7 years ago |
|
|
3edc891722 | 7 years ago |
|
|
02fdf1e90d | 7 years ago |
|
|
049f71d913 | 7 years ago |
|
|
478339ff4f | 7 years ago |
|
|
e95205d203 | 7 years ago |
|
|
0d2b25b4e2 | 7 years ago |
|
|
4009d7d883 | 7 years ago |
|
|
12ecd51269 | 7 years ago |
|
|
758b4272ff | 7 years ago |
|
|
f20a405c0c | 7 years ago |
|
|
730a6e432a | 7 years ago |
|
|
15d9462d3e | 7 years ago |
|
|
41a44f3c12 | 7 years ago |
|
|
d7d83c2b0d | 7 years ago |
|
|
6b9d5800d3 | 7 years ago |
|
|
6d6a01b3e9 | 7 years ago |
|
|
f8b08a0bb6 | 7 years ago |
|
|
fa7933966f | 7 years ago |
|
|
06483130dd | 7 years ago |
|
|
efa11e17e3 | 7 years ago |
|
|
9079c21340 | 7 years ago |
|
|
691aef4578 | 7 years ago |
|
|
f6f1267e28 | 7 years ago |
|
|
f922d60e9d | 7 years ago |
|
|
5c5de895e8 | 7 years ago |
|
|
5873a37fed | 7 years ago |
|
|
34569c5dc2 | 7 years ago |
|
|
df9f9009a5 | 7 years ago |
|
|
a04c1755d2 | 7 years ago |
|
|
e8be1d0a39 | 7 years ago |
|
|
a709cfae54 | 7 years ago |
|
|
30b8239dd6 | 7 years ago |
|
|
cd20d8c37a | 7 years ago |
|
|
cc96e2e3b5 | 7 years ago |
|
|
73afc143cd | 7 years ago |
|
|
bc7e18e211 | 7 years ago |
|
|
b57e618ee3 | 7 years ago |
|
|
c37c12d8a4 | 7 years ago |
|
|
78b378b978 | 7 years ago |
|
|
5dff6c4ce1 | 7 years ago |
|
|
4ac06220b9 | 7 years ago |
|
|
3cd4017f37 | 7 years ago |
|
|
6bdc510cf2 | 7 years ago |
|
|
096228c6c7 | 7 years ago |
|
|
4fc6ae0db4 | 7 years ago |
|
|
438b4fe3a4 | 7 years ago |
|
|
c0fb19dbf4 | 7 years ago |
|
|
b6fc28819e | 7 years ago |
|
|
5eff0b6a01 | 7 years ago |
|
|
d1c3e9cf9c | 7 years ago |
|
|
7669cf7768 | 7 years ago |
|
|
cd529f5657 | 7 years ago |
|
|
95a437f04b | 7 years ago |
|
|
e76026a5d8 | 7 years ago |
|
|
339dfaac21 | 7 years ago |
|
|
006250ff76 | 7 years ago |
|
|
487cefb418 | 7 years ago |
|
|
dbb3bd7751 | 7 years ago |
|
|
33aeabf077 | 7 years ago |
|
|
fa6026c4c9 | 7 years ago |
|
|
952825b7d4 | 7 years ago |
|
|
e554b29711 | 7 years ago |
|
|
5061561e71 | 7 years ago |
|
|
6ab5fcd17e | 7 years ago |
|
|
086f4c5b58 | 7 years ago |
|
|
7b78b7800c | 7 years ago |
|
|
1ad8d806ac | 7 years ago |
|
|
5afc5e0ac9 | 7 years ago |
|
|
609bc6ed1c | 7 years ago |
|
|
0dabf932f9 | 7 years ago |
|
|
653e82f1c4 | 7 years ago |
|
|
ca36add3f9 | 7 years ago |
|
|
b889f2b366 | 7 years ago |
|
|
36f167c0dd | 7 years ago |
|
|
a797a8d2b3 | 7 years ago |
|
|
94d822a708 | 7 years ago |
|
|
1ca33982b2 | 7 years ago |
|
|
b2d78c0d63 | 7 years ago |
|
|
3dc8e6001a | 7 years ago |
|
|
e775d9a329 | 7 years ago |
|
|
5eee24df84 | 7 years ago |
|
|
5e7b07d256 | 7 years ago |
|
|
dd532ab945 | 7 years ago |
|
|
4c19b026a9 | 7 years ago |
|
|
9c994800cc | 7 years ago |
|
|
e704107a5d | 7 years ago |
|
|
d645c8659e | 7 years ago |
|
|
98d9f04c68 | 7 years ago |
|
|
1dc1d9e555 | 7 years ago |
|
|
545c021013 | 7 years ago |
|
|
64589d8e03 | 7 years ago |
|
|
0567e05d80 | 7 years ago |
|
|
e2773f5a2d | 7 years ago |
|
|
ff4177668b | 7 years ago |
|
|
a984e01afb | 7 years ago |
|
|
f6f88fc19a | 7 years ago |
|
|
1fd4b4a8e3 | 7 years ago |
|
|
90958f2aa1 | 7 years ago |
|
|
78a7c0ff14 | 7 years ago |
|
|
3b85685260 | 7 years ago |
|
|
e89a266572 | 7 years ago |
|
|
f02d933b8f | 7 years ago |
|
|
3150594b86 | 7 years ago |
|
|
6997a7fb0c | 7 years ago |
|
|
a116d92e00 | 7 years ago |
|
|
513697ea18 | 7 years ago |
|
|
d4ce819dc5 | 7 years ago |
|
|
14c4db9be5 | 7 years ago |
|
|
edaad4aec6 | 7 years ago |
|
|
a8f2224484 | 7 years ago |
|
|
9c6a7a6bb2 | 7 years ago |
|
|
e9df462cf6 | 7 years ago |
|
|
8f7c22a991 | 7 years ago |
|
|
083826931a | 7 years ago |
|
|
23390cd207 | 7 years ago |
|
|
6973056f12 | 7 years ago |
|
|
2911b9e7a7 | 7 years ago |
|
|
8b004688c9 | 7 years ago |
|
|
457e4277ca | 7 years ago |
|
|
96db900a6b | 7 years ago |
|
|
b57f817475 | 7 years ago |
|
|
659bc38af8 | 7 years ago |
|
|
c210019290 | 7 years ago |
|
|
894cec5373 | 7 years ago |
|
|
aa1fe9be44 | 7 years ago |
|
|
c2a09434b9 | 7 years ago |
|
|
95e96d2c99 | 7 years ago |
|
|
e5e244d0b4 | 7 years ago |
|
|
4cabe238f9 | 7 years ago |
|
|
16f003a1bb | 7 years ago |
|
|
ee6f8b86db | 7 years ago |
|
|
c9b3d22040 | 7 years ago |
|
|
57de09ea4a | 7 years ago |
|
|
ab60f5c7c8 | 7 years ago |
|
|
d68337872e | 7 years ago |
|
|
b6135efc88 | 7 years ago |
|
|
e7ac0b9562 | 7 years ago |
|
|
d809788106 | 7 years ago |
|
|
c2bf1dc952 | 7 years ago |
|
|
be32a13c9b | 7 years ago |
|
|
777c409031 | 7 years ago |
|
|
e7700ee755 | 7 years ago |
|
|
c7d2b5f614 | 7 years ago |
|
|
30654b7cd2 | 7 years ago |
|
|
a647590326 | 7 years ago |
|
|
931eb9d1d2 | 7 years ago |
|
|
7c60d3fe41 | 7 years ago |
|
|
04c0e4d7a4 | 7 years ago |
|
|
d3c1ae3f20 | 7 years ago |
|
|
3c84838193 | 7 years ago |
|
|
aded91b730 | 7 years ago |
|
|
e1127e863a | 7 years ago |
|
|
9b0cd43a2e | 7 years ago |
|
|
e9e59e4dcb | 7 years ago |
|
|
6996425e9b | 7 years ago |
|
|
67af63b052 | 7 years ago |
|
|
0449eed1fe | 7 years ago |
|
|
b8d383f8f3 | 7 years ago |
|
|
f0cb4b710a | 7 years ago |
|
|
4f312527ae | 7 years ago |
|
|
d69fb6b1b8 | 7 years ago |
|
|
000abaa4d7 | 7 years ago |
|
|
9dfd9e992a | 7 years ago |
|
|
90f11f9e50 | 7 years ago |
|
|
8bfa574c7f | 7 years ago |
|
|
ad160e46f7 | 7 years ago |
|
|
38283cf96d | 7 years ago |
|
|
67334f8abf | 7 years ago |
|
|
56ebebf928 | 7 years ago |
|
|
8546a43f9e | 7 years ago |
|
|
895410e80f | 7 years ago |
|
|
3c063f5b4b | 7 years ago |
|
|
ccac5960ff | 7 years ago |
|
|
9c905ff215 | 7 years ago |
|
|
051ffc57f9 | 7 years ago |
|
|
74e5f87b84 | 7 years ago |
|
|
d01adce482 | 7 years ago |
|
|
8d7e1f9293 | 7 years ago |
|
|
0fecd8600b | 7 years ago |
|
|
082f7c5a00 | 7 years ago |
|
|
e40e820135 | 7 years ago |
|
|
d06ebb83c4 | 7 years ago |
|
|
2dbdf2a25c | 7 years ago |
|
|
a98ff85079 | 7 years ago |
|
|
6be1abfaf1 | 7 years ago |
|
|
83db32626f | 7 years ago |
|
|
b56272fe07 | 7 years ago |
|
|
588696234e | 7 years ago |
|
|
cf12b34262 | 7 years ago |
|
|
dfa3e01157 | 7 years ago |
|
|
be379f66a9 | 7 years ago |
|
|
accd82e754 | 7 years ago |
|
|
ff2d944dbe | 7 years ago |
|
|
0a4f629226 | 7 years ago |
|
|
eed442a52b | 7 years ago |
|
|
3aabb5c58a | 7 years ago |
|
|
52b1e8ca1d | 7 years ago |
|
|
245f584a9e | 7 years ago |
|
|
273e6c39c2 | 7 years ago |
|
|
da7ca38780 | 7 years ago |
|
|
30e24b24c3 | 7 years ago |
|
|
c0eee00f74 | 7 years ago |
|
|
6d918b8c11 | 7 years ago |
|
|
1c6b49555d | 7 years ago |
|
|
04899474d3 | 7 years ago |
|
|
c358c7ae45 | 7 years ago |
|
|
fd4aa61bb9 | 7 years ago |
|
|
1279aea9cf | 7 years ago |
|
|
110229fe5a | 7 years ago |
|
|
6c2830c0db | 7 years ago |
|
|
30e7577b86 | 7 years ago |
|
|
b45874673e | 7 years ago |
|
|
279826e328 | 7 years ago |
|
|
a8e24fce50 | 7 years ago |
|
|
d0b6f0e677 | 7 years ago |
|
|
26e9dcf7d0 | 7 years ago |
|
|
6891c895f4 | 7 years ago |
|
|
9c5f3b0303 | 7 years ago |
|
|
ea69862bdb | 7 years ago |
|
|
87a191a961 | 7 years ago |
|
|
9b0005b013 | 7 years ago |
|
|
e4329a7661 | 7 years ago |
|
|
5576d97e2a | 7 years ago |
|
|
9f24cffb73 | 7 years ago |
|
|
2db61fb807 | 7 years ago |
|
|
cf4b62966c | 7 years ago |
|
|
e34671d4fd | 7 years ago |
|
|
e26a94a2b3 | 7 years ago |
|
|
51d784d52a | 7 years ago |
|
|
1a8dd4d873 | 7 years ago |
|
|
d217000ca2 | 7 years ago |
|
|
a2e471d9f9 | 7 years ago |
|
|
2782c532cc | 7 years ago |
|
|
532f2f457f | 7 years ago |
|
|
9601dd3aa6 | 7 years ago |
|
|
7911c76057 | 7 years ago |
|
|
12ccc306d8 | 7 years ago |
|
|
60e82fc07f | 7 years ago |
|
|
e9fa797b25 | 7 years ago |
|
|
b24f68098e | 7 years ago |
|
|
77c7f2e8c9 | 7 years ago |
|
|
c7140d35ad | 7 years ago |
|
|
42cf1b8749 | 7 years ago |
|
|
31b53a0052 | 7 years ago |
|
|
0e3e64b952 | 7 years ago |
|
|
2806ea97fa | 7 years ago |
|
|
f955323d3c | 7 years ago |
|
|
0a4cda9047 | 7 years ago |
|
|
764b300582 | 7 years ago |
|
|
a8470bb0a3 | 7 years ago |
|
|
7a7ec8a192 | 7 years ago |
|
|
fea0fc9580 | 7 years ago |
|
|
5bc4a557b7 | 7 years ago |
|
|
972bd1ede8 | 7 years ago |
|
|
8082ea7bb2 | 7 years ago |
|
|
093dbc3d48 | 7 years ago |
|
|
805e602d5a | 7 years ago |
|
|
a835ba415b | 7 years ago |
|
|
ae58db22ee | 7 years ago |
|
|
647efbecc7 | 7 years ago |
|
|
340ac718f6 | 7 years ago |
|
|
5c7baf7068 | 7 years ago |
|
|
51a10a31b6 | 7 years ago |
|
|
7fc7046290 | 7 years ago |
|
|
44bcbbcb6f | 7 years ago |
|
|
7a7a7d8044 | 7 years ago |
|
|
7516dfcf83 | 7 years ago |
|
|
87d178fd29 | 7 years ago |
|
|
36799fc57b | 7 years ago |
|
|
9beb73c5a0 | 7 years ago |
|
|
f4c1688f84 | 7 years ago |
|
|
c4e38e84d3 | 7 years ago |
|
|
53c9578796 | 7 years ago |
|
|
b058977406 | 7 years ago |
|
|
9cc5619fbd | 7 years ago |
|
|
46ab110c8b | 7 years ago |
|
|
c888980129 | 7 years ago |
|
|
6dab034a26 | 7 years ago |
|
|
198a29c568 | 7 years ago |
|
|
82e77f9054 | 7 years ago |
|
|
275941191f | 7 years ago |
|
|
48e06a78e4 | 7 years ago |
|
|
4d586be4a1 | 7 years ago |
|
|
0890287f1f | 7 years ago |
|
|
13277cae81 | 7 years ago |
|
|
ad88680eff | 7 years ago |
|
|
30933e9051 | 7 years ago |
|
|
9986c06833 | 7 years ago |
|
|
5d1dc6b8fc | 7 years ago |
|
|
bc9a9ca0b8 | 7 years ago |
|
|
af6aa9f7a3 | 7 years ago |
|
|
4a5b63fcfa | 7 years ago |
|
|
dd0c0b471e | 7 years ago |
|
|
c85ad3a6a2 | 7 years ago |
|
|
1b43d82320 | 7 years ago |
|
|
9486df11da | 7 years ago |
|
|
ed70ab3ed8 | 7 years ago |
|
|
9cfa7f5c79 | 7 years ago |
|
|
d747eedadd | 7 years ago |
|
|
00ba947172 | 7 years ago |
|
|
003817fc9f | 7 years ago |
|
|
e6a6bcf333 | 7 years ago |
|
|
5a3016d4b8 | 7 years ago |
|
|
202fd74361 | 7 years ago |
|
|
6e9f086a87 | 7 years ago |
|
|
576e9e5b98 | 7 years ago |
|
|
8d5b103234 | 7 years ago |
|
|
e42e5ee3e0 | 7 years ago |
|
|
e1907e3b7b | 7 years ago |
|
|
93daffbaae | 7 years ago |
|
|
8299672362 | 7 years ago |
|
|
66030bbe3c | 7 years ago |
|
|
191d1ccb57 | 7 years ago |
|
|
8916041998 | 7 years ago |
|
|
c92a52df64 | 7 years ago |
|
|
a7503a8207 | 7 years ago |
|
|
129137b773 | 7 years ago |
|
|
84ad7f2bf3 | 7 years ago |
|
|
cbd1c5b57f | 7 years ago |
|
|
e6519b4ef1 | 7 years ago |
|
|
be0cb7f93a | 7 years ago |
|
|
89ea1b75d8 | 7 years ago |
|
|
a6df534356 | 7 years ago |
|
|
797bd35f1b | 7 years ago |
|
|
189bbf9026 | 7 years ago |
|
|
91b2bf2016 | 7 years ago |
|
|
fb8bd622fb | 7 years ago |
|
|
040e987aa6 | 7 years ago |
|
|
badc98f29e | 7 years ago |
|
|
76d7d586d9 | 7 years ago |
|
|
bc05bb18ff | 7 years ago |
|
|
66f8d8bc8f | 7 years ago |
|
|
85306ae54d | 7 years ago |
|
|
8d5122c7b4 | 7 years ago |
|
|
62e229e3c6 | 7 years ago |
|
|
146de086b4 | 7 years ago |
|
|
aeaebe7b45 | 7 years ago |
|
|
d3fc79a23e | 7 years ago |
|
|
2135c4c300 | 7 years ago |
|
|
8648e42477 | 7 years ago |
|
|
5b3a57c5cc | 7 years ago |
|
|
c29c14930a | 7 years ago |
|
|
2e03e2fcba | 7 years ago |
|
|
0af4ca452a | 7 years ago |
|
|
3cc41dea63 | 7 years ago |
|
|
db63baeb47 | 7 years ago |
|
|
2373a4557a | 7 years ago |
|
|
6ecf279774 | 7 years ago |
|
|
c07d971eae | 7 years ago |
|
|
93a20db84f | 7 years ago |
|
|
123fb28cb2 | 7 years ago |
|
|
90fe6def61 | 7 years ago |
|
|
bb805d65a4 | 7 years ago |
|
|
11353c5364 | 7 years ago |
|
|
f88e4ec68c | 7 years ago |
|
|
f148bc9d90 | 7 years ago |
|
|
4e6002fcd6 | 7 years ago |
|
|
f1a7996979 | 7 years ago |
|
|
1811fc0aaa | 7 years ago |
|
|
4407015e46 | 7 years ago |
|
|
ed0d9fde04 | 7 years ago |
|
|
d5957b86c8 | 7 years ago |
|
|
0619513890 | 7 years ago |
|
|
ecf3f67d04 | 7 years ago |
|
|
ac4cba7694 | 7 years ago |
|
|
ae61a876f1 | 7 years ago |
|
|
4a6b2de019 | 7 years ago |
|
|
eca2fe37d5 | 7 years ago |
|
|
f8bcda612d | 7 years ago |
|
|
f26de621ed | 7 years ago |
|
|
adf612b328 | 7 years ago |
|
|
62453a365f | 7 years ago |
|
|
99c70fa767 | 7 years ago |
|
|
0ac57122d0 | 7 years ago |
|
|
b4ca288073 | 7 years ago |
|
|
aa064e2b7c | 7 years ago |
|
|
2b1741e001 | 7 years ago |
|
|
46a184b289 | 7 years ago |
|
|
10cc5c8764 | 7 years ago |
|
|
05218cf148 | 7 years ago |
|
|
84cf80dd79 | 7 years ago |
|
|
a555aba078 | 7 years ago |
|
|
ec5091080f | 7 years ago |
|
|
030c2986b5 | 7 years ago |
|
|
e5f760e873 | 7 years ago |
|
|
3e30834536 | 7 years ago |
|
|
1777938cd9 | 7 years ago |
|
|
fe48719b55 | 7 years ago |
|
|
6220110fae | 7 years ago |
|
|
e67bc77e83 | 7 years ago |
|
|
bc8e20ac00 | 7 years ago |
|
|
9f15cdf088 | 7 years ago |
|
|
904ff16381 | 7 years ago |
|
|
49fea06df7 | 7 years ago |
|
|
593241432b | 7 years ago |
|
|
ddcbd4fa0f | 7 years ago |
|
|
15cdb0485d | 7 years ago |
|
|
00eaeaf7b4 | 7 years ago |
|
|
39d22fc924 | 7 years ago |
|
|
175de83e40 | 7 years ago |
|
|
c764dd81cd | 7 years ago |
|
|
9fcb1efe8d | 7 years ago |
|
|
d8f829daf1 | 7 years ago |
|
|
8b7258e25a | 7 years ago |
|
|
8fbc2c8118 | 7 years ago |
|
|
0e6320c352 | 7 years ago |
|
|
b012608093 | 7 years ago |
|
|
f94a3ed357 | 7 years ago |
|
|
3c7fb9e907 | 7 years ago |
|
|
519167e065 | 7 years ago |
|
|
993be4b442 | 7 years ago |
|
|
ab53bafdee | 7 years ago |
|
|
a1181edd3d | 7 years ago |
|
|
f850afdc2a | 7 years ago |
|
|
36bd068e58 | 7 years ago |
|
|
8ff3ad2f0c | 7 years ago |
|
|
0128ee95d1 | 7 years ago |
|
|
6f06034dd4 | 7 years ago |
|
|
95142cdfdf | 7 years ago |
|
|
281c79ccd7 | 7 years ago |
|
|
a1eb884661 | 7 years ago |
|
|
992acb62de | 7 years ago |
|
|
f18ad3820f | 7 years ago |
|
|
e7ac894ef5 | 7 years ago |
|
|
270fbd0f82 | 7 years ago |
|
|
225cb47cfb | 7 years ago |
|
|
f8bee8dba0 | 7 years ago |
|
|
24c8b7d49e | 7 years ago |
|
|
92f4889a67 | 7 years ago |
|
|
0a49ed9667 | 7 years ago |
|
|
56ac260b33 | 7 years ago |
|
|
7dde4ee3f4 | 7 years ago |
|
|
af21872576 | 7 years ago |
|
|
6ab71df638 | 7 years ago |
|
|
25add275e7 | 7 years ago |
|
|
ad9fbc456a | 7 years ago |
|
|
d072da8a12 | 7 years ago |
|
|
fae633893b | 7 years ago |
|
|
0cdb8c46dc | 7 years ago |
|
|
2f69f5c405 | 7 years ago |
|
|
1893a27f75 | 7 years ago |
|
|
f21fb959f2 | 7 years ago |
|
|
a8ebbdb2ae | 7 years ago |
|
|
52a26e797c | 7 years ago |
|
|
3dd7da8260 | 7 years ago |
|
|
9ea2db2d26 | 7 years ago |
|
|
1142c08f39 | 7 years ago |
|
|
b6c5854ef6 | 7 years ago |
|
|
56f2b20f61 | 7 years ago |
|
|
6704472ebe | 7 years ago |
|
|
9ddb296a35 | 7 years ago |
|
|
d41e7bc0ff | 7 years ago |
|
|
2e0e0576c0 | 7 years ago |
|
|
559f9462cf | 7 years ago |
|
|
111267bb63 | 7 years ago |
|
|
9e549c6c20 | 7 years ago |
|
|
7d106aefd5 | 7 years ago |
|
|
cd91534f64 | 7 years ago |
|
|
db7748fe59 | 7 years ago |
|
|
b7e956079a | 7 years ago |
|
|
e67d3e8d9b | 7 years ago |
|
|
3c419aa603 | 7 years ago |
|
|
2f3ad9bd77 | 7 years ago |
|
|
1732f5047a | 7 years ago |
|
|
0026de69d0 | 7 years ago |
|
|
0b86230b15 | 7 years ago |
|
|
fe8a812a44 | 7 years ago |
|
|
8fc614700b | 7 years ago |
|
|
3ba85bff3c | 7 years ago |
|
|
d1909d1f77 | 7 years ago |
|
|
b531d16b6d | 7 years ago |
|
|
7a30b477ab | 7 years ago |
|
|
88dc5d283b | 7 years ago |
|
|
106a5e8075 | 7 years ago |
|
|
65d7b0cfa9 | 7 years ago |
|
|
4f8eaee948 | 7 years ago |
|
|
00a5298cba | 7 years ago |
|
|
9858846e43 | 7 years ago |
|
|
2d03f441a5 | 7 years ago |
|
|
5b3702a7e2 | 7 years ago |
|
|
5940b1b259 | 7 years ago |
|
|
ae99bee5a4 | 7 years ago |
|
|
5216e0ad7b | 7 years ago |
|
|
600efed7c0 | 7 years ago |
|
|
9fbf458308 | 7 years ago |
|
|
5c7a10c9d8 | 7 years ago |
|
|
1ce85858e2 | 7 years ago |
|
|
58a0ae155c | 7 years ago |
|
|
996eb575ab | 7 years ago |
|
|
4bbdd5a001 | 7 years ago |
|
|
bef9829e21 | 7 years ago |
|
|
c46c504881 | 7 years ago |
|
|
b3059febfe | 7 years ago |
|
|
5f8cdaccd6 | 7 years ago |
|
|
ab1e3c25ea | 7 years ago |
|
|
de3aff84f4 | 7 years ago |
|
|
69857e4995 | 7 years ago |
|
|
f253335ba0 | 7 years ago |
|
|
52145881e3 | 7 years ago |
|
|
0d2d95db06 | 7 years ago |
|
|
0f278e6a46 | 7 years ago |
|
|
b30c38d61d | 7 years ago |
|
|
c1462619a9 | 7 years ago |
|
|
aece4427f7 | 7 years ago |
|
|
352e78c09d | 7 years ago |
|
|
6158bb240a | 7 years ago |
|
|
a9ea4330ce | 7 years ago |
|
|
12ad7255b2 | 7 years ago |
|
|
42fcce8f8b | 7 years ago |
|
|
c0c5a8a1ae | 7 years ago |
|
|
45baaa4a21 | 7 years ago |
|
|
b7a1424eb8 | 7 years ago |
|
|
73c29bc682 | 7 years ago |
|
|
8bac50f8d2 | 7 years ago |
|
|
abcff60744 | 7 years ago |
|
|
e9db469f3f | 7 years ago |
|
|
c60ed58350 | 7 years ago |
|
|
9adda201f2 | 7 years ago |
|
|
d1eb011b87 | 7 years ago |
|
|
8d556c8c0b | 7 years ago |
|
|
91f64376d0 | 7 years ago |
|
|
e95932a590 | 7 years ago |
|
|
304a2ddf91 | 7 years ago |
|
|
b6153578ca | 7 years ago |
|
|
0c635bd0ff | 7 years ago |
|
|
435d5e7f3d | 7 years ago |
|
|
b9c15a9bd8 | 7 years ago |
|
|
2557020f02 | 7 years ago |
|
|
59401305f9 | 7 years ago |
|
|
5ff9ec151e | 7 years ago |
|
|
4f6b4c92ed | 7 years ago |
|
|
160e978db4 | 7 years ago |
|
|
146c3b67d3 | 7 years ago |
|
|
b96873308c | 7 years ago |
|
|
f4af6091cc | 7 years ago |
|
|
83425b7793 | 7 years ago |
|
|
f6d909a7d4 | 7 years ago |
|
|
073fb840e7 | 7 years ago |
|
|
6226e7f25d | 7 years ago |
|
|
64f32a9dba | 7 years ago |
|
|
a797ef7ea6 | 7 years ago |
|
|
038bd2e3a9 | 7 years ago |
|
|
c060cc65b7 | 7 years ago |
|
|
5f7ce30a33 | 7 years ago |
|
|
70f6bda903 | 7 years ago |
|
|
689c18275d | 7 years ago |
|
|
abeb384174 | 7 years ago |
|
|
5217669097 | 7 years ago |
|
|
d5af7bd77c | 7 years ago |
|
|
d68c31f668 | 7 years ago |
|
|
9e10b4f63a | 7 years ago |
|
|
18eb83dca8 | 7 years ago |
|
|
3dfcf13da2 | 7 years ago |
|
|
c70fa2da0f | 7 years ago |
|
|
4125b1cb4c | 7 years ago |
|
|
dc9ce5934a | 7 years ago |
|
|
6a9a608013 | 7 years ago |
|
|
e9c545051e | 7 years ago |
|
|
e828e87a1a | 7 years ago |
|
|
0cb00205d6 | 7 years ago |
|
|
2eef980fe5 | 7 years ago |
|
|
247897eb5a | 7 years ago |
|
|
21a0be745d | 7 years ago |
|
|
61791e58b6 | 7 years ago |
|
|
71564e4171 | 7 years ago |
|
|
4d76a7af0c | 7 years ago |
|
|
3dd1136d71 | 7 years ago |
|
|
988583b9a3 | 7 years ago |
|
|
48fc064d46 | 7 years ago |
|
|
eabe7dbfa8 | 7 years ago |
|
|
cb244fb171 | 7 years ago |
|
|
d45e7eb915 | 7 years ago |
|
|
48b0b66966 | 7 years ago |
|
|
1e572b460c | 7 years ago |
|
|
2058c1f099 | 7 years ago |
|
|
7428b2320d | 7 years ago |
|
|
24f796250b | 7 years ago |
|
|
b03cd3fb6e | 7 years ago |
|
|
2bb31ec0da | 7 years ago |
|
|
4cb7770c58 | 7 years ago |
|
|
41c37ee92c | 7 years ago |
|
|
9b4ec018a5 | 7 years ago |
|
|
2dde4b75a5 | 7 years ago |
|
|
668acbb59a | 7 years ago |
|
|
73ee6ab6f8 | 7 years ago |
|
|
bab171d777 | 7 years ago |
|
|
d8dfb8bfce | 7 years ago |
|
|
270836e631 | 7 years ago |
|
|
2cb97a0829 | 7 years ago |
|
|
3b0766832f | 7 years ago |
|
|
60b036fc29 | 7 years ago |
|
|
02c09d1b9a | 7 years ago |
|
|
043bf5c0c3 | 7 years ago |
|
|
06595e2abd | 7 years ago |
|
|
b1c2ee643d | 7 years ago |
|
|
989c06fb0c | 7 years ago |
|
|
53fd369ec9 | 7 years ago |
|
|
d37e860d45 | 7 years ago |
|
|
d4cb600d0e | 7 years ago |
|
|
a9104e94e4 | 7 years ago |
|
|
810e328691 | 7 years ago |
|
|
7666bc7a09 | 7 years ago |
|
|
b02d8ac294 | 7 years ago |
|
|
1283d01d45 | 7 years ago |
|
|
4f0a4ac912 | 7 years ago |
|
|
8438d4ef19 | 7 years ago |
|
|
028357a0d6 | 7 years ago |
|
|
6dea9519be | 7 years ago |
|
|
4e9cb83b1c | 7 years ago |
|
|
8e533e760b | 7 years ago |
|
|
158c3f679f | 7 years ago |
|
|
b1361722bd | 7 years ago |
|
|
122eb42ac4 | 7 years ago |
|
|
5217aa2031 | 7 years ago |
|
|
b48391982c | 7 years ago |
|
|
fcd1e83a32 | 7 years ago |
|
|
026b7a8d26 | 7 years ago |
|
|
b9ab1dbbab | 7 years ago |
|
|
69959ba023 | 7 years ago |
|
|
6ceb83d7b8 | 7 years ago |
|
|
a561a10c95 | 7 years ago |
|
|
075ddc9464 | 7 years ago |
|
|
b683962395 | 7 years ago |
|
|
8b306c2943 | 7 years ago |
|
|
30e4a77638 | 7 years ago |
|
|
d5e0bb0ac3 | 7 years ago |
|
|
345275681c | 7 years ago |
|
|
7a7b1e04a7 | 7 years ago |
|
|
d369d4b130 | 7 years ago |
|
|
4459d7748a | 7 years ago |
|
|
6ba1ed871a | 7 years ago |
|
|
670a94b6db | 7 years ago |
|
|
cd3be13aca | 7 years ago |
|
|
2538228244 | 7 years ago |
|
|
b9fc433d63 | 7 years ago |
|
|
66d33f50d8 | 7 years ago |
|
|
65c3d46942 | 7 years ago |
|
|
1318ccd530 | 7 years ago |
|
|
ccc0ed1d46 | 7 years ago |
|
|
cf1c00b592 | 7 years ago |
|
|
a9ed6a5461 | 7 years ago |
|
|
ee5adecfbf | 7 years ago |
|
|
0cce58cb49 | 7 years ago |
|
|
6452f68662 | 7 years ago |
|
|
9762516919 | 7 years ago |
|
|
4969d0f495 | 7 years ago |
|
|
6da23df18e | 7 years ago |
|
|
fddf8897bf | 7 years ago |
|
|
f7ba8d6c82 | 7 years ago |
|
|
b908af8df7 | 7 years ago |
|
|
0e7f7fb8e1 | 7 years ago |
|
|
47e00446df | 7 years ago |
|
|
b5689528fa | 7 years ago |
|
|
5ac653c63e | 7 years ago |
|
|
d4d36d1af2 | 7 years ago |
|
|
e8340fd039 | 7 years ago |
|
|
bfd0fe93a8 | 7 years ago |
|
|
89e8611f51 | 7 years ago |
|
|
53835fb793 | 7 years ago |
|
|
a034138945 | 7 years ago |
|
|
768ff6cb60 | 7 years ago |
|
|
771e0ccbd4 | 7 years ago |
|
|
08484f9aac | 7 years ago |
|
|
ea9e0fcc57 | 7 years ago |
|
|
c02568371b | 7 years ago |
|
|
3f2e38eb75 | 7 years ago |
|
|
c4788c969e | 7 years ago |
|
|
7411225038 | 7 years ago |
|
|
8276ac627b | 7 years ago |
|
|
a91ce6190b | 7 years ago |
|
|
3567c49626 | 7 years ago |
|
|
4f1650e574 | 7 years ago |
|
|
a7fde8d67f | 7 years ago |
|
|
419a0dd7f3 | 7 years ago |
|
|
0d45487c3e | 8 years ago |
|
|
24e4cbdd5e | 8 years ago |
|
|
aeae454acb | 8 years ago |
|
|
96896839d6 | 8 years ago |
|
|
0a350999ad | 8 years ago |
|
|
2b05de1963 | 8 years ago |
|
|
a17223aed7 | 8 years ago |
|
|
b9cd64341c | 8 years ago |
|
|
0f1ea0698b | 8 years ago |
|
|
7041de630b | 8 years ago |
|
|
e234bf56a5 | 8 years ago |
|
|
626576e0e2 | 8 years ago |
|
|
2fda57b291 | 8 years ago |
|
|
c19ffcf57b | 8 years ago |
|
|
87c76ab575 | 8 years ago |
|
|
f5b8887457 | 8 years ago |
|
|
e4bb1d905b | 8 years ago |
|
|
f902f21d74 | 8 years ago |
|
|
d4259c747d | 8 years ago |
|
|
56efadeab9 | 8 years ago |
|
|
7dba302403 | 8 years ago |
|
|
3af14b7e45 | 8 years ago |
|
|
1413c3ea99 | 8 years ago |
|
|
b70b06919e | 8 years ago |
|
|
ccba1508e4 | 8 years ago |
|
|
c2c1ba9923 | 8 years ago |
|
|
0ef22cd766 | 8 years ago |
|
|
c82b4ddd43 | 8 years ago |
|
|
26dcd1fadc | 8 years ago |
|
|
4ccc344d41 | 8 years ago |
|
|
6620b0bf51 | 8 years ago |
|
|
d36e1fdf00 | 8 years ago |
|
|
bf2be4034c | 8 years ago |
|
|
75caeab0df | 8 years ago |
|
|
4d1bc0447d | 8 years ago |
|
|
37dba52f5d | 8 years ago |
|
|
f872f414ab | 8 years ago |
|
|
4bd67f0218 | 8 years ago |
|
|
7b30b6da59 | 8 years ago |
|
|
4aef671252 | 8 years ago |
|
|
17c359ffdb | 8 years ago |
|
|
08fa92de9d | 8 years ago |
|
|
59db2c4d24 | 8 years ago |
|
|
7ec059d0d5 | 8 years ago |
|
|
ac20d3c515 | 8 years ago |
|
|
e3bade965f | 8 years ago |
|
|
97140bf279 | 8 years ago |
|
|
dae12ba7b2 | 8 years ago |
|
|
e645d1de71 | 8 years ago |
|
|
f3fbd0bc24 | 8 years ago |
|
|
840c6c331f | 8 years ago |
|
|
f016cb66d2 | 8 years ago |
|
|
0f5f4920ca | 8 years ago |
|
|
29823b794f | 8 years ago |
|
|
51ab3689d9 | 8 years ago |
|
|
d011bbdb2a | 8 years ago |
|
|
49d3a1607e | 8 years ago |
|
|
0a94ae0778 | 8 years ago |
|
|
f201f3f2d1 | 8 years ago |
|
|
c9b0573f43 | 8 years ago |
|
|
7b1e789cd0 | 8 years ago |
|
|
7219d6a2db | 8 years ago |
|
|
390de49768 | 8 years ago |
|
|
957d0a5a39 | 8 years ago |
|
|
a7ce812f8a | 8 years ago |
|
|
59a5fbfdbc | 8 years ago |
|
|
7f1dc71403 | 8 years ago |
|
|
3aaf83cbd4 | 8 years ago |
|
|
b8b6d8b823 | 8 years ago |
|
|
e2db566240 | 8 years ago |
|
|
1f508548ca | 8 years ago |
|
|
91f0653b1c | 8 years ago |
|
|
75286ec582 | 8 years ago |
|
|
325ca64c14 | 8 years ago |
|
|
8f94685a46 | 8 years ago |
|
|
45ed0a8fd5 | 8 years ago |
|
|
b4e926560f | 8 years ago |
|
|
3e4102d3ef | 8 years ago |
|
|
36670677cb | 8 years ago |
|
|
ed46405017 | 8 years ago |
|
|
57786798e2 | 8 years ago |
|
|
e23072d3d8 | 8 years ago |
|
|
3c2a0700f1 | 8 years ago |
|
|
f57dff8ec6 | 8 years ago |
|
|
d15850302d | 8 years ago |
|
|
8f5c6d9d6f | 8 years ago |
|
|
83028efd22 | 8 years ago |
|
|
039934513b | 8 years ago |
|
|
67b8c487de | 8 years ago |
|
|
e6e67d8b97 | 8 years ago |
|
|
e93a180a48 | 8 years ago |
|
|
c57c1be6c2 | 8 years ago |
|
|
15739f4057 | 8 years ago |
|
|
18b0e97c08 | 8 years ago |
|
|
7b922d791c | 8 years ago |
|
|
d8c5160a61 | 8 years ago |
|
|
311a4d46c3 | 8 years ago |
|
|
8c49a0cbcc | 8 years ago |
|
|
24c741f404 | 8 years ago |
|
|
64c15cbf9c | 8 years ago |
|
|
b5137f1f46 | 8 years ago |
|
|
ba1f4dff04 | 8 years ago |
|
|
88c15f87bc | 8 years ago |
|
|
0180a58892 | 8 years ago |
|
|
b8ae004f8f | 8 years ago |
|
|
3d086d3679 | 8 years ago |
|
|
c5c28bbb15 | 8 years ago |
|
|
eed5502427 | 8 years ago |
|
|
9dd7121318 | 8 years ago |
|
|
03bd9d77d6 | 8 years ago |
|
|
8b1cd924b7 | 8 years ago |
|
|
1dcbbf54e9 | 8 years ago |
|
|
f9839183ec | 8 years ago |
|
|
394d7d87e7 | 8 years ago |
|
|
ce09980d19 | 8 years ago |
|
|
7df036ab24 | 8 years ago |
|
|
64b239ee86 | 8 years ago |
|
|
9022899efc | 8 years ago |
|
|
2878c0a16f | 8 years ago |
|
|
7535eba114 | 8 years ago |
|
|
23c27c1ed9 | 8 years ago |
|
|
a48ec0290a | 8 years ago |
|
|
973bed49fb | 8 years ago |
|
|
99beccef07 | 8 years ago |
|
|
8fb7d952b1 | 8 years ago |
|
|
e8a45491a1 | 8 years ago |
|
|
1e95468860 | 8 years ago |
|
|
959ce76021 | 8 years ago |
|
|
1ab551c81d | 8 years ago |
|
|
628aa4ee24 | 8 years ago |
|
|
3036497f0f | 8 years ago |
|
|
050ea4c784 | 8 years ago |
|
|
640c73f9f5 | 8 years ago |
|
|
54710c60ac | 8 years ago |
|
|
df9bdfb56c | 8 years ago |
|
|
f01405182b | 8 years ago |
|
|
4295dead69 | 8 years ago |
|
|
c20b63c571 | 8 years ago |
|
|
6931a05b7f | 8 years ago |
|
|
97203afb4d | 8 years ago |
|
|
dcd09b9607 | 8 years ago |
|
|
b21ca25501 | 8 years ago |
|
|
191e3d19d8 | 8 years ago |
|
|
e2029b055e | 8 years ago |
|
|
156cbcbf4e | 8 years ago |
|
|
d4a790b44d | 8 years ago |
|
|
feff60fbc7 | 8 years ago |
|
|
a6e39a784e | 8 years ago |
|
|
67fb5512f3 | 8 years ago |
|
|
9654c419ea | 8 years ago |
|
|
899597011e | 8 years ago |
|
|
205076f62f | 8 years ago |
|
|
a75f665923 | 8 years ago |
|
|
68686ef31f | 8 years ago |
|
|
7654c4f428 | 8 years ago |
|
|
9d3790d705 | 8 years ago |
|
|
85c17b606d | 8 years ago |
|
|
dee3e5a94f | 8 years ago |
|
|
f630e40305 | 8 years ago |
|
|
3584d95d2a | 8 years ago |
|
|
b9ace12177 | 8 years ago |
|
|
5ff854ed1d | 8 years ago |
|
|
b6962cb8a0 | 8 years ago |
|
|
5765cad5de | 8 years ago |
|
|
0b63054d60 | 8 years ago |
|
|
98eced52fd | 8 years ago |
|
|
4392715a2f | 8 years ago |
|
|
eb87a162f3 | 8 years ago |
|
|
3d03d1b5f8 | 8 years ago |
|
|
c35a42d11c | 8 years ago |
|
|
49efc532cb | 8 years ago |
|
|
8266caf023 | 8 years ago |
|
|
2ce018b32b | 8 years ago |
|
|
a705e50003 | 8 years ago |
|
|
d65905ceeb | 8 years ago |
|
|
0c060eebc4 | 8 years ago |
|
|
1b7096811b | 8 years ago |
|
|
0d0884a2c2 | 8 years ago |
|
|
1233712f7b | 8 years ago |
|
|
2de6520bcb | 8 years ago |
|
|
e45cd77666 | 8 years ago |
|
|
e779438ba1 | 8 years ago |
|
|
8f686a71a6 | 8 years ago |
|
|
44a97c2d2d | 8 years ago |
|
|
40352a78b1 | 8 years ago |
|
|
66da172baf | 8 years ago |
|
|
99cfe349b3 | 8 years ago |
|
|
5a9e298a1f | 8 years ago |
|
|
7254567432 | 8 years ago |
|
|
8d0396c0f7 | 8 years ago |
|
|
6358b2a624 | 8 years ago |
|
|
a4ab934aeb | 8 years ago |
|
|
48b8b7b55d | 8 years ago |
|
|
4e243f6ec7 | 8 years ago |
|
|
9041ef8a8a | 8 years ago |
|
|
400e416cb1 | 8 years ago |
|
|
45c6cc86ca | 8 years ago |
|
|
7d0f7f9329 | 8 years ago |
|
|
cab77cff36 | 8 years ago |
|
|
0469e56fe4 | 8 years ago |
|
|
b49f996731 | 8 years ago |
|
|
8a0331248f | 8 years ago |
|
|
b9ba2c4214 | 8 years ago |
|
|
5ff6dca03a | 8 years ago |
|
|
b48eb0c9e9 | 8 years ago |
|
|
d914a4c6dc | 8 years ago |
|
|
9ddfa1ac5f | 8 years ago |
|
|
6ea6493a2b | 8 years ago |
|
|
75f72c8f9d | 8 years ago |
|
|
00fc041dd5 | 8 years ago |
|
|
55df0719bf | 8 years ago |
|
|
06874d03aa | 8 years ago |
|
|
7e8cb79859 | 8 years ago |
|
|
8c80679383 | 8 years ago |
|
|
a325e3a021 | 8 years ago |
|
|
d63163cfac | 8 years ago |
|
|
32212752a3 | 8 years ago |
|
|
b1784ed021 | 8 years ago |
|
|
7b959de95a | 8 years ago |
|
|
31ca966f2c | 8 years ago |
|
|
677f29ef05 | 8 years ago |
|
|
5668c17b6a | 8 years ago |
|
|
46b29a5b65 | 8 years ago |
|
|
7999ae0129 | 8 years ago |
|
|
aed740d56e | 8 years ago |
|
|
dcd6d5dfd1 | 8 years ago |
|
|
d3c023000d | 8 years ago |
|
|
4f958270e9 | 8 years ago |
|
|
6fd4e6e7f5 | 8 years ago |
|
|
bab87fd422 | 8 years ago |
|
|
be74ec1f79 | 8 years ago |
|
|
f6d381685f | 8 years ago |
|
|
67070bf176 | 8 years ago |
|
|
387641637d | 8 years ago |
|
|
8ff7cb11f7 | 8 years ago |
|
|
7007f49db5 | 8 years ago |
|
|
63ba85ae3a | 8 years ago |
|
|
26e770d7d7 | 8 years ago |
|
|
85364bda0f | 8 years ago |
|
|
98c9f36b82 | 8 years ago |
|
|
8d6f506282 | 8 years ago |
|
|
b0b5df3013 | 8 years ago |
|
|
4929e32748 | 8 years ago |
|
|
55499ce99e | 8 years ago |
|
|
222a81933b | 8 years ago |
|
|
08f2eb4c84 | 8 years ago |
|
|
d15098ad62 | 8 years ago |
|
|
702f35c491 | 8 years ago |
|
|
528ac809b3 | 8 years ago |
|
|
e9b464d581 | 8 years ago |
|
|
cfe7c1147f | 8 years ago |
|
|
68300d2121 | 8 years ago |
|
|
9e891cd9ef | 8 years ago |
|
|
88764cee0d | 8 years ago |
|
|
fcd74b4d49 | 8 years ago |
|
|
2ed98945f2 | 8 years ago |
|
|
905420152c | 8 years ago |
|
|
4a1b4ae7d3 | 8 years ago |
|
|
fc1576896b | 8 years ago |
|
|
74559c735c | 8 years ago |
|
|
bf158f23be | 8 years ago |
|
|
04b3e25192 | 8 years ago |
|
|
a40bc4b365 | 8 years ago |
|
|
617fa079ac | 8 years ago |
|
|
e0ff14e7fc | 8 years ago |
|
|
23700cdc5d | 8 years ago |
|
|
41b8ba00ae | 8 years ago |
|
|
55e553162b | 8 years ago |
|
|
125433fa98 | 8 years ago |
|
|
60922ee1dd | 8 years ago |
|
|
457885c107 | 8 years ago |
|
|
5e79bf9933 | 8 years ago |
|
|
bc89c0429d | 8 years ago |
|
|
86fe466187 | 8 years ago |
|
|
9c3f0beb34 | 8 years ago |
|
|
c00def709a | 8 years ago |
|
|
ae7ded23c8 | 8 years ago |
|
|
7718e2b120 | 8 years ago |
|
|
66641d1a41 | 8 years ago |
|
|
eb91a4a5b8 | 8 years ago |
|
|
ca20258e61 | 8 years ago |
|
|
d9ef21e1c6 | 8 years ago |
|
|
dda526aa73 | 8 years ago |
|
|
258a45b867 | 8 years ago |
|
|
fd461d70cd | 8 years ago |
|
|
0749602694 | 8 years ago |
|
|
ab34be7999 | 8 years ago |
|
|
c91a2f4728 | 8 years ago |
|
|
840aa5ba1a | 8 years ago |
|
|
2565093420 | 8 years ago |
|
|
b0eac09289 | 8 years ago |
|
|
b09a2939a8 | 8 years ago |
|
|
30ce333c2d | 8 years ago |
|
|
fbca65601e | 8 years ago |
|
|
32ac54ba59 | 8 years ago |
|
|
48aa909f8a | 8 years ago |
|
|
00df1bb19c | 8 years ago |
|
|
849953064f | 8 years ago |
|
|
248fab5b60 | 8 years ago |
|
|
e2f742eac9 | 8 years ago |
|
|
6e214fafb7 | 8 years ago |
|
|
5e913cb11f | 8 years ago |
|
|
e22ba164fa | 8 years ago |
|
|
0dd35d814e | 8 years ago |
|
|
8d54e74e11 | 8 years ago |
|
|
e5d4af0be5 | 8 years ago |
@ -0,0 +1,2 @@
|
||||
.git
|
||||
uim-index-dev/
|
||||
@ -1,22 +0,0 @@
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
tab_width = 4
|
||||
|
||||
[*.php]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
@ -1,2 +0,0 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an new idea for this project
|
||||
title: "[Feature Request]"
|
||||
labels: enhancement
|
||||
|
||||
---
|
||||
|
||||
- [ ] I acknowledge if I don't follow the format below or I don't check these box, my issue could be closed without any notice.
|
||||
- [ ] I certify that I have read project Wiki and other issue may related to this one.
|
||||
|
||||
**Feature**
|
||||
The feature you want.
|
||||
|
||||
**Solution**
|
||||
If you have some solution about this issue, type it here.
|
||||
|
||||
**Addition**
|
||||
Additional context here.
|
||||
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ss-panel-v3-mod_UIChanges</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.aptana.ide.core.unifiedBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.aptana.projects.webnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1522297588605</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
||||
@ -0,0 +1,26 @@
|
||||
FROM indexyz/php
|
||||
LABEL maintainer="Indexyz <indexyz@protonmail.com>"
|
||||
|
||||
COPY . /var/www
|
||||
WORKDIR /var/www
|
||||
|
||||
RUN cp config/.config.example.php config/.config.php && \
|
||||
chmod -R 755 storage && \
|
||||
chmod -R 777 /var/www/storage/framework/smarty/compile/ && \
|
||||
curl -SL https://getcomposer.org/installer -o composer-setup.php && \
|
||||
php composer-setup.php && \
|
||||
php composer.phar install && \
|
||||
php xcat initQQWry && \
|
||||
php xcat initdownload && \
|
||||
crontab -l | { cat; echo "30 22 * * * php /var/www/xcat sendDiaryMail"; } | crontab - && \
|
||||
crontab -l | { cat; echo "0 0 * * * php /var/www/xcat dailyjob"; } | crontab - && \
|
||||
crontab -l | { cat; echo "*/1 * * * * php /var/www/xcat checkjob"; } | crontab - && \
|
||||
crontab -l | { cat; echo "*/1 * * * * php /var/www/xcat syncnode"; } | crontab - && \
|
||||
{ \
|
||||
echo '[program:crond]'; \
|
||||
echo 'command=cron -f'; \
|
||||
echo 'autostart=true'; \
|
||||
echo 'autorestart=true'; \
|
||||
echo 'killasgroup=true'; \
|
||||
echo 'stopasgroup=true'; \
|
||||
} | tee /etc/supervisor/crond.conf
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\Config;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
class Malio
|
||||
{
|
||||
public static function GenerateUUIDforAllUsers()
|
||||
{
|
||||
$users = User::all();
|
||||
foreach ($users as $user) {
|
||||
if ($user->uuid == null) {
|
||||
$user->uuid = Uuid::uuid3(Uuid::NAMESPACE_DNS, ($user->passwd) . Config::get('key') . $user->id)->toString();
|
||||
if ($user->save()) {
|
||||
echo ($user->id . " 生成UUID成功 " . $user->uuid . PHP_EOL);
|
||||
} else {
|
||||
echo ($user->id . " 失败 " . $user->uuid . PHP_EOL);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin;
|
||||
|
||||
use App\Controllers\AdminController;
|
||||
use Ozdemir\Datatables\Datatables;
|
||||
use App\Utils\DatatablesHelper;
|
||||
|
||||
class DetectBanLogController extends AdminController
|
||||
{
|
||||
public function index($request, $response, $args)
|
||||
{
|
||||
$table_config['total_column'] = array("id" => "ID", "user_id" => "用户ID",
|
||||
"user_name" => "用户名", "email" => "用户邮箱",
|
||||
"detect_number" => "违规次数", "ban_time" => "封禁时长(分钟)",
|
||||
"start_time" => "统计开始时间", "end_time" => "统计结束以及封禁开始时间",
|
||||
"ban_end_time" => "封禁结束时间", "all_detect_number" => "累计违规次数");
|
||||
$table_config['default_show_column'] = array();
|
||||
foreach ($table_config['total_column'] as $column => $value) {
|
||||
array_push($table_config['default_show_column'], $column);
|
||||
}
|
||||
$table_config['ajax_url'] = 'ban/ajax';
|
||||
return $this->view()->assign('table_config', $table_config)->display('admin/detect/ban.tpl');
|
||||
}
|
||||
|
||||
public function ajax_log($request, $response, $args)
|
||||
{
|
||||
$datatables = new Datatables(new DatatablesHelper());
|
||||
$datatables->query('Select detect_ban_log.id,detect_ban_log.user_id,detect_ban_log.user_name,detect_ban_log.email,detect_ban_log.detect_number,detect_ban_log.ban_time,detect_ban_log.start_time,detect_ban_log.end_time,detect_ban_log.all_detect_number,detect_ban_log.end_time as ban_end_time from detect_ban_log');
|
||||
$datatables->edit('start_time', function ($data) {
|
||||
return date('Y-m-d H:i:s', $data['start_time']);
|
||||
});
|
||||
$datatables->edit('end_time', function ($data) {
|
||||
return date('Y-m-d H:i:s', $data['end_time']);
|
||||
});
|
||||
$datatables->edit('ban_end_time', function ($data) {
|
||||
return date('Y-m-d H:i:s', $data['ban_end_time']+$data['ban_time']*60);
|
||||
});
|
||||
|
||||
$body = $response->getBody();
|
||||
$body->write($datatables->generate());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,108 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin;
|
||||
|
||||
use App\Controllers\AdminController;
|
||||
use App\Services\Auth;
|
||||
use App\Models\GConfig;
|
||||
|
||||
class GConfigController extends AdminController
|
||||
{
|
||||
public function update($request, $response, $args)
|
||||
{
|
||||
$key = trim($args['key']);
|
||||
$user = Auth::getUser();
|
||||
|
||||
$config = GConfig::find($key);
|
||||
$config->oldvalue = $config->value;
|
||||
$config->value = $request->getParam('value');
|
||||
$config->operator_id = $user->id;
|
||||
$config->operator_name = $user->user_name;
|
||||
$config->operator_email = $user->email;
|
||||
$config->last_update = time();
|
||||
if (!$config->save()) {
|
||||
$rs['ret'] = 0;
|
||||
$rs['msg'] = '修改失败';
|
||||
return $response->write(json_encode($rs));
|
||||
}
|
||||
$rs['ret'] = 1;
|
||||
$rs['msg'] = '修改成功';
|
||||
return $response->write(json_encode($rs));
|
||||
}
|
||||
|
||||
public function telegram($request, $response, $args)
|
||||
{
|
||||
$table_config['total_column'] = array(
|
||||
'op' => '操作',
|
||||
'name' => '配置名称',
|
||||
'key' => '配置名',
|
||||
'value' => '配置值',
|
||||
'operator_id' => '操作员 ID',
|
||||
'operator_name' => '操作员名称',
|
||||
'operator_email' => '操作员邮箱',
|
||||
'last_update' => '修改时间'
|
||||
);
|
||||
$table_config['default_show_column'] = array();
|
||||
foreach ($table_config['total_column'] as $column => $value) {
|
||||
$table_config['default_show_column'][] = $column;
|
||||
}
|
||||
$table_config['ajax_url'] = 'telegram/ajax';
|
||||
return $this->view()->assign('table_config', $table_config)->fetch('admin/config/telegram/index.tpl');
|
||||
}
|
||||
|
||||
public function telegram_edit($request, $response, $args)
|
||||
{
|
||||
$key = trim($args['key']);
|
||||
$config = GConfig::find($key);
|
||||
return $this->view()->assign('edit_config', $config)->fetch('admin/config/telegram/edit.tpl');
|
||||
}
|
||||
|
||||
public function telegram_update($request, $response, $args)
|
||||
{
|
||||
return self::update($request, $response, $args);
|
||||
}
|
||||
|
||||
public function telegram_ajax($request, $response, $args)
|
||||
{
|
||||
$start = $request->getParam("start");
|
||||
$limit_length = $request->getParam('length');
|
||||
$configs = GConfig::skip($start)->where('key', 'LIKE', "%Telegram%")->limit($limit_length)->get();
|
||||
$total_conut = GConfig::where('key', 'LIKE', "%Telegram%")->count();
|
||||
$data = [];
|
||||
foreach ($configs as $config) {
|
||||
$tempdata = [];
|
||||
$tempdata['op'] = '<a class="btn btn-brand" href="/admin/config/telegram/' . $config->key . '/edit">编辑</a>';
|
||||
$tempdata['name'] = $config->name;
|
||||
$tempdata['key'] = $config->key;
|
||||
$tempdata['value'] = $config->value;
|
||||
$tempdata['operator_id'] = $config->operator_id;
|
||||
$tempdata['operator_name'] = $config->operator_name;
|
||||
$tempdata['operator_email'] = $config->operator_email;
|
||||
$tempdata['last_update'] = date('Y-m-d H:i:s', $config->last_update);
|
||||
if (strpos($config->key, '.enable.')) {
|
||||
switch ((int) $config->value) {
|
||||
case 0:
|
||||
$tempdata['value'] = '关闭';
|
||||
break;
|
||||
case 1:
|
||||
$tempdata['value'] = '开启';
|
||||
break;
|
||||
default:
|
||||
$tempdata['value'] = '未知';
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$tempdata['value'] = '(请在编辑页面查看)';
|
||||
}
|
||||
$data[] = $tempdata;
|
||||
}
|
||||
$info = [
|
||||
'draw' => $request->getParam('draw'),
|
||||
'recordsTotal' => $total_conut,
|
||||
'recordsFiltered' => $total_conut,
|
||||
'data' => $data
|
||||
];
|
||||
|
||||
return json_encode($info, true);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Admin;
|
||||
|
||||
use App\Controllers\AdminController;
|
||||
use App\Utils\QQWry;
|
||||
|
||||
use Ozdemir\Datatables\Datatables;
|
||||
use App\Utils\DatatablesHelper;
|
||||
|
||||
class SubscribeLogController extends AdminController
|
||||
{
|
||||
public function index($request, $response, $args)
|
||||
{
|
||||
$table_config['total_column'] = array('id' => 'ID', 'user_name' => '用户名',
|
||||
'user_id' => '用户ID', 'email' => '用户邮箱', 'subscribe_type' => '类型',
|
||||
'request_ip' => 'IP', 'location' => '归属地', 'request_time' => '时间',
|
||||
'request_user_agent' => 'User-Agent');
|
||||
$table_config['default_show_column'] = array();
|
||||
foreach ($table_config['total_column'] as $column => $value) {
|
||||
$table_config['default_show_column'][] = $column;
|
||||
}
|
||||
$table_config['ajax_url'] = 'subscribe/ajax';
|
||||
return $this->view()->assign('table_config', $table_config)->display('admin/subscribe.tpl');
|
||||
}
|
||||
|
||||
public function ajax_subscribe_log($request, $response, $args)
|
||||
{
|
||||
$datatables = new Datatables(new DatatablesHelper());
|
||||
$datatables->query('Select user_subscribe_log.id,user_subscribe_log.user_name,user_subscribe_log.user_id,user_subscribe_log.email,user_subscribe_log.subscribe_type,user_subscribe_log.request_ip,user_subscribe_log.request_ip as location,user_subscribe_log.request_time,user_subscribe_log.request_user_agent from user_subscribe_log');
|
||||
|
||||
$iplocation = new QQWry();
|
||||
$datatables->edit('location', static function ($data) use ($iplocation) {
|
||||
$location = $iplocation->getlocation($data['location']);
|
||||
return iconv('gbk', 'utf-8//IGNORE', $location['country'] . $location['area']);
|
||||
});
|
||||
|
||||
$body = $response->getBody();
|
||||
$body->write($datatables->generate());
|
||||
}
|
||||
}
|
||||
@ -1,162 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\Node;
|
||||
use App\Models\User;
|
||||
use App\Services\Factory;
|
||||
use App\Services\Config;
|
||||
use App\Utils\Tools;
|
||||
use App\Utils\Hash;
|
||||
use App\Utils\Helper;
|
||||
|
||||
/**
|
||||
* ApiController
|
||||
*/
|
||||
class ApiController extends BaseController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
}
|
||||
|
||||
public function token($request, $response, $args)
|
||||
{
|
||||
$accessToken = $id = $args['token'];
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
if ($token == null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token is null';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data'] = $token;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function newToken($request, $response, $args)
|
||||
{
|
||||
// $data = $request->post('sdf');
|
||||
$email = $request->getParam('email');
|
||||
|
||||
$email = strtolower($email);
|
||||
$passwd = $request->getParam('passwd');
|
||||
|
||||
// Handle Login
|
||||
$user = User::where('email', '=', $email)->first();
|
||||
|
||||
if ($user == null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = '401 邮箱或者密码错误';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
if (!Hash::checkPassword($user->pass, $passwd)) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = '402 邮箱或者密码错误';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$tokenStr = Tools::genToken();
|
||||
$storage = Factory::createTokenStorage();
|
||||
$expireTime = time() + 3600 * 24 * 7;
|
||||
if ($storage->store($tokenStr, $user, $expireTime)) {
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data']['token'] = $tokenStr;
|
||||
$res['data']['user_id'] = $user->id;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'system error';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function node($request, $response, $args)
|
||||
{
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
$user = User::find($token->userId);
|
||||
$nodes = Node::where('sort', 0)->where('type', '1')->where(
|
||||
static function ($query) use ($user) {
|
||||
$query->where('node_group', '=', $user->node_group)
|
||||
->orWhere('node_group', '=', 0);
|
||||
}
|
||||
)->orderBy('name')->get();
|
||||
|
||||
$mu_nodes = Node::where('sort', 9)->where('node_class', '<=', $user->class)->where('type', '1')->where(
|
||||
static function ($query) use ($user) {
|
||||
$query->where('node_group', '=', $user->node_group)
|
||||
->orWhere('node_group', '=', 0);
|
||||
}
|
||||
)->orderBy('name')->get();
|
||||
|
||||
$temparray = array();
|
||||
foreach ($nodes as $node) {
|
||||
if ($node->mu_only == 0) {
|
||||
$temparray[] = array('remarks' => $node->name,
|
||||
'server' => $node->server,
|
||||
'server_port' => $user->port,
|
||||
'method' => $node->custom_method == 1 ? $user->method : $node->method,
|
||||
'obfs' => str_replace('_compatible', '', (($node->custom_rss == 1 && !($user->obfs == 'plain' && $user->protocol == 'origin')) ? $user->obfs : 'plain')),
|
||||
'obfsparam' => ($node->custom_rss == 1 && !($user->obfs == 'plain' && $user->protocol == 'origin')) ? $user->obfs_param : '',
|
||||
'remarks_base64' => base64_encode($node->name),
|
||||
'password' => $user->passwd,
|
||||
'tcp_over_udp' => false,
|
||||
'udp_over_tcp' => false,
|
||||
'group' => Config::get('appName'),
|
||||
'protocol' => str_replace('_compatible', '', (($node->custom_rss == 1 && !($user->obfs == 'plain' && $user->protocol == 'origin')) ? $user->protocol : 'origin')),
|
||||
'obfs_udp' => false,
|
||||
'enable' => true);
|
||||
}
|
||||
|
||||
if ($node->custom_rss == 1) {
|
||||
foreach ($mu_nodes as $mu_node) {
|
||||
$mu_user = User::where('port', '=', $mu_node->server)->first();
|
||||
$mu_user->obfs_param = $user->getMuMd5();
|
||||
|
||||
$temparray[] = array('remarks' => $node->name . '- ' . $mu_node->server . ' 单端口',
|
||||
'server' => $node->server,
|
||||
'server_port' => $mu_user->port,
|
||||
'method' => $mu_user->method,
|
||||
'group' => Config::get('appName'),
|
||||
'obfs' => str_replace('_compatible', '', (($node->custom_rss == 1 && !($mu_user->obfs == 'plain' && $mu_user->protocol == 'origin')) ? $mu_user->obfs : 'plain')),
|
||||
'obfsparam' => ($node->custom_rss == 1 && !($mu_user->obfs == 'plain' && $mu_user->protocol == 'origin')) ? $mu_user->obfs_param : '',
|
||||
'remarks_base64' => base64_encode($node->name . '- ' . $mu_node->server . ' 单端口'),
|
||||
'password' => $mu_user->passwd,
|
||||
'tcp_over_udp' => false,
|
||||
'udp_over_tcp' => false,
|
||||
'protocol' => str_replace('_compatible', '', (($node->custom_rss == 1 && !($mu_user->obfs == 'plain' && $mu_user->protocol == 'origin')) ? $mu_user->protocol : 'origin')),
|
||||
'obfs_udp' => false,
|
||||
'enable' => true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data'] = $temparray;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function userInfo($request, $response, $args)
|
||||
{
|
||||
$id = $args['id'];
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
if ($id != $token->userId) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'access denied';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$user = User::find($token->userId);
|
||||
$user->pass = null;
|
||||
$data = $user;
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data'] = $data;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: kaguya
|
||||
* Date: 2018/06/30
|
||||
* Time: 21:40
|
||||
*/
|
||||
|
||||
namespace App\Controllers\Client;
|
||||
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Controllers\LinkController;
|
||||
use App\Models\Ann;
|
||||
use App\Models\User;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Services\Factory;
|
||||
use App\Utils\Helper;
|
||||
|
||||
class ClientApiController extends BaseController
|
||||
{
|
||||
public function GetAnnouncement($request, $response, $args)
|
||||
{
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
$user = User::find($token->userId);
|
||||
$Anns = Ann::orderBy('date', 'desc')->first();
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data'] = $Anns;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function Redirect($request, $response, $args)
|
||||
{
|
||||
$user = Auth::getUser();
|
||||
$url = $request->getQueryParams()['target'];
|
||||
if (!$user->isLogin) {
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
if ($token == null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token is null';
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$user = User::find($token->userId);
|
||||
$time = 3600 * 24;
|
||||
Auth::login($user->id, $time);
|
||||
}
|
||||
return $response->withRedirect($url);
|
||||
}
|
||||
|
||||
public function GetSubLink($request, $response, $args)
|
||||
{
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
$user = User::find($token->userId);
|
||||
$ssr_sub_token = LinkController::GenerateSSRSubCode($user->id, 0);
|
||||
$mu = 0;
|
||||
if ($request->getQueryParams()['mu'] != '') {
|
||||
$mu = $request->getQueryParams()['mu'];
|
||||
}
|
||||
$res['ret'] = 1;
|
||||
$res['msg'] = 'ok';
|
||||
$res['data'] = Config::get('subUrl') . $ssr_sub_token . '?mu=' . $mu;
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,591 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 部分应用自定义配置
|
||||
*
|
||||
* PHP version 7.2+
|
||||
*
|
||||
* @category GeekQu
|
||||
* @package App/Controllers/ConfController
|
||||
* @author GeekQu <iloves@live.com>
|
||||
* @license MIT https://github.com/GeekQu/ss-panel-v3-mod_Uim/blob/dev/LICENSE
|
||||
* @link https://github.com/GeekQu
|
||||
*/
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\Config;
|
||||
use App\Utils\ConfRender;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Symfony\Component\Yaml\Exception\ParseException;
|
||||
|
||||
/**
|
||||
* ConfController
|
||||
*
|
||||
* @category GeekQu
|
||||
* @package App/Controllers/ConfController
|
||||
* @author GeekQu <iloves@live.com>
|
||||
* @license MIT https://github.com/GeekQu/ss-panel-v3-mod_Uim/blob/dev/LICENSE
|
||||
* @link https://github.com/GeekQu
|
||||
*/
|
||||
class ConfController extends BaseController
|
||||
{
|
||||
|
||||
/**
|
||||
* YAML 转数组
|
||||
*
|
||||
* @param string $Content YAML 字符串
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function YAML2Array($Content)
|
||||
{
|
||||
try {
|
||||
return Yaml::parse($Content);
|
||||
} catch (ParseException $exception) {
|
||||
return printf('无法解析 YAML 字符串: %s', $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从远端自定义配置文件生成 Surge 托管配置
|
||||
*
|
||||
* @param object $User 用户
|
||||
* @param string $AllProxys Surge 格式的全部节点
|
||||
* @param array $Nodes 全部节点数组
|
||||
* @param string $SourceContent 远程配置内容
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSurgeConfs($User, $AllProxys, $Nodes, $Configs, $local = false)
|
||||
{
|
||||
$General = self::getSurgeConfGeneral($Configs['General']);
|
||||
$Proxys = (isset($Configs['Proxy'])
|
||||
? self::getSurgeConfProxy($Configs['Proxy'])
|
||||
: '');
|
||||
|
||||
if (isset($Configs['Proxy Group'])) {
|
||||
$Configs['ProxyGroup'] = $Configs['Proxy Group'];
|
||||
}
|
||||
$ProxyGroups = self::getSurgeConfProxyGroup(
|
||||
$Nodes,
|
||||
$Configs['ProxyGroup']
|
||||
);
|
||||
$ProxyGroup = self::getSurgeProxyGroup2String($ProxyGroups);
|
||||
|
||||
$Rule = self::getSurgeConfRule($Configs['Rule'], $local);
|
||||
$Conf = '#!MANAGED-CONFIG '
|
||||
. Config::get('baseUrl') . $_SERVER['REQUEST_URI'] .
|
||||
"\n\n#---------------------------------------------------#" .
|
||||
"\n## 上次更新于:" . date("Y-m-d h:i:s") .
|
||||
"\n#---------------------------------------------------#" .
|
||||
"\n\n[General]"
|
||||
. $General .
|
||||
"\n\n[Proxy]\n"
|
||||
. $AllProxys . $Proxys .
|
||||
"\n\n[Proxy Group]"
|
||||
. $ProxyGroup .
|
||||
"\n\n[Rule]\n"
|
||||
. $Rule;
|
||||
|
||||
return $Conf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge 配置中的 General
|
||||
*
|
||||
* @param array $General Surge General 定义
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSurgeConfGeneral($General)
|
||||
{
|
||||
$return = '';
|
||||
if (count($General) != 0) {
|
||||
foreach ($General as $key => $value) {
|
||||
$return .= "\n$key = $value";
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge 配置中的 Proxy
|
||||
*
|
||||
* @param array $Proxys 自定义配置中的额外 Proxy
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSurgeConfProxy($Proxys)
|
||||
{
|
||||
$return = '';
|
||||
if (count($Proxys) != 0) {
|
||||
foreach ($Proxys as $value) {
|
||||
if (!preg_match('/(\[General|Replica|Proxy|Proxy\sGroup|Rule|Host|URL\sRewrite|Header\sRewrite|MITM|Script\])/', $value)) {
|
||||
$return .= "\n$value";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge 配置中的 ProxyGroup
|
||||
*
|
||||
* @param array $Nodes 全部节点数组
|
||||
* @param array $ProxyGroups Surge 策略组定义
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getSurgeConfProxyGroup($Nodes, $ProxyGroups)
|
||||
{
|
||||
$return = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
if (in_array($ProxyGroup['type'], ['select', 'url-test', 'fallback'])) {
|
||||
$proxies = [];
|
||||
if (
|
||||
isset($ProxyGroup['content']['left-proxies'])
|
||||
&& count($ProxyGroup['content']['left-proxies']) != 0
|
||||
) {
|
||||
$proxies = $ProxyGroup['content']['left-proxies'];
|
||||
}
|
||||
foreach ($Nodes as $item) {
|
||||
$item = self::getMatchProxy($item, $ProxyGroup);
|
||||
if ($item !== null && !in_array($item['remark'], $proxies)) {
|
||||
$proxies[] = $item['remark'];
|
||||
}
|
||||
}
|
||||
if (isset($ProxyGroup['content']['right-proxies'])) {
|
||||
$proxies = array_merge($proxies, $ProxyGroup['content']['right-proxies']);
|
||||
}
|
||||
$ProxyGroup['proxies'] = $proxies;
|
||||
}
|
||||
$return[] = $ProxyGroup;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取匹配的节点
|
||||
*
|
||||
* @param array $Proxy 节点
|
||||
* @param array $Rule 匹配规则
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getMatchProxy($Proxy, $Rule)
|
||||
{
|
||||
$return = null;
|
||||
switch (true) {
|
||||
case (isset($Rule['content']['class'])):
|
||||
if (in_array($Proxy['class'], $Rule['content']['class'])) {
|
||||
if (isset($Rule['content']['regex'])) {
|
||||
if (preg_match('/' . $Rule['content']['regex'] . '/i', $Proxy['remark'])) {
|
||||
$return = $Proxy;
|
||||
}
|
||||
} else {
|
||||
$return = $Proxy;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (isset($Rule['content']['noclass'])):
|
||||
if (!in_array($Proxy['class'], $Rule['content']['noclass'])) {
|
||||
if (isset($Rule['content']['regex'])) {
|
||||
if (preg_match('/' . $Rule['content']['regex'] . '/i', $Proxy['remark'])) {
|
||||
$return = $Proxy;
|
||||
}
|
||||
} else {
|
||||
$return = $Proxy;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (!isset($Rule['content']['class'])
|
||||
&& !isset($Rule['content']['noclass'])
|
||||
&& isset($Rule['content']['regex'])
|
||||
&& preg_match('/' . $Rule['content']['regex'] . '/i', $Proxy['remark'])
|
||||
):
|
||||
$return = $Proxy;
|
||||
break;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge ProxyGroup 去除无用策略组
|
||||
*
|
||||
* @param array $ProxyGroups 策略组
|
||||
* @param array $checks 要检查的策略组名
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function fixSurgeProxyGroup($ProxyGroups, $checks)
|
||||
{
|
||||
if (count($checks) == 0) {
|
||||
return $ProxyGroups;
|
||||
}
|
||||
$clean_names = [];
|
||||
$newProxyGroups = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
if (in_array($ProxyGroup['name'], $checks) && count($ProxyGroup['proxies']) == 0) {
|
||||
$clean_names[] = $ProxyGroup['name'];
|
||||
continue;
|
||||
}
|
||||
$newProxyGroups[] = $ProxyGroup;
|
||||
}
|
||||
if (count($clean_names) >= 1) {
|
||||
$ProxyGroups = $newProxyGroups;
|
||||
$newProxyGroups = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
if (!in_array($ProxyGroup['name'], $checks) && $ProxyGroup['type'] != 'ssid') {
|
||||
$newProxies = [];
|
||||
foreach ($ProxyGroup['proxies'] as $proxie) {
|
||||
if (!in_array($proxie, $clean_names)) {
|
||||
$newProxies[] = $proxie;
|
||||
}
|
||||
}
|
||||
$ProxyGroup['proxies'] = $newProxies;
|
||||
}
|
||||
$newProxyGroups[] = $ProxyGroup;
|
||||
}
|
||||
}
|
||||
|
||||
return $newProxyGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge ProxyGroup 转字符串
|
||||
*
|
||||
* @param array $ProxyGroups Surge 策略组定义
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSurgeProxyGroup2String($ProxyGroups)
|
||||
{
|
||||
$return = '';
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
$str = '';
|
||||
if (in_array($ProxyGroup['type'], ['select', 'url-test', 'fallback'])) {
|
||||
$proxies = implode(', ', $ProxyGroup['proxies']);
|
||||
if (in_array($ProxyGroup['type'], ['url-test', 'fallback'])) {
|
||||
$str .= ($ProxyGroup['name']
|
||||
. ' = '
|
||||
. $ProxyGroup['type']
|
||||
. ', '
|
||||
. $proxies
|
||||
. ', url = ' . $ProxyGroup['url']
|
||||
. ', interval = ' . $ProxyGroup['interval']);
|
||||
} else {
|
||||
$str .= ($ProxyGroup['name']
|
||||
. ' = '
|
||||
. $ProxyGroup['type']
|
||||
. ', '
|
||||
. $proxies);
|
||||
}
|
||||
} elseif ($ProxyGroup['type'] == 'ssid') {
|
||||
$wifi = '';
|
||||
foreach ($ProxyGroup['content'] as $key => $value) {
|
||||
$wifi .= ', "' . $key . '" = ' . $value;
|
||||
}
|
||||
$cellular = (isset($ProxyGroup['cellular'])
|
||||
? ', cellular = ' . $ProxyGroup['cellular']
|
||||
: '');
|
||||
$str .= ($ProxyGroup['name']
|
||||
. ' = '
|
||||
. $ProxyGroup['type']
|
||||
. ', default = '
|
||||
. $ProxyGroup['default']
|
||||
. $cellular
|
||||
. $wifi);
|
||||
} else {
|
||||
$str .= '';
|
||||
}
|
||||
$return .= "\n$str";
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surge 配置中的 Rule
|
||||
*
|
||||
* @param array $Rules Surge 规则加载地址
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getSurgeConfRule($Rules, $local)
|
||||
{
|
||||
// 加载本地规则文件
|
||||
if ($local) {
|
||||
$render = ConfRender::getTemplateRender();
|
||||
return $render->fetch(trim($Rules['source']));
|
||||
}
|
||||
|
||||
// 加载远程规则文件
|
||||
$return = '';
|
||||
if (isset($Rules['source']) && $Rules['source'] != '') {
|
||||
$sourceURL = trim($Rules['source']);
|
||||
// 远程规则仅支持 github 以及 gitlab
|
||||
if (preg_match('/^https:\/\/((gist\.)?github\.com|raw\.githubusercontent\.com|gitlab\.com)/i', $sourceURL)) {
|
||||
$return = @file_get_contents($sourceURL);
|
||||
if (!$return) {
|
||||
$return = ('// 远程规则加载失败'
|
||||
. PHP_EOL
|
||||
. 'GEOIP,CN,DIRECT'
|
||||
. PHP_EOL
|
||||
. 'FINAL,DIRECT,dns-failed');
|
||||
}
|
||||
} else {
|
||||
$return = ('// 远程规则仅支持 github 以及 gitlab'
|
||||
. PHP_EOL
|
||||
. 'GEOIP,CN,DIRECT'
|
||||
. PHP_EOL
|
||||
. 'FINAL,DIRECT,dns-failed');
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从远端自定义配置文件生成 Clash 配置
|
||||
*
|
||||
* @param object $User 用户
|
||||
* @param array $AllProxys 全部节点数组
|
||||
* @param string $SourceContent 远程配置内容
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getClashConfs($User, $AllProxys, $Configs, $local = false)
|
||||
{
|
||||
$confStr = [
|
||||
'Proxy' => 'proxies',
|
||||
'ProxyGroup' => 'proxy-groups',
|
||||
];
|
||||
if (isset($_GET['newconf']) && (int) $_GET['newconf'] == 0) {
|
||||
$confStr = [
|
||||
'Proxy' => 'Proxy',
|
||||
'ProxyGroup' => 'Proxy Group',
|
||||
];
|
||||
}
|
||||
|
||||
if (isset($Configs['Proxy']) || count($Configs['Proxy']) != 0) {
|
||||
$tmpProxys = array_merge($AllProxys, $Configs['Proxy']);
|
||||
} else {
|
||||
$tmpProxys = $AllProxys;
|
||||
}
|
||||
$Proxys = [];
|
||||
foreach ($tmpProxys as $Proxy) {
|
||||
unset($Proxy['class']);
|
||||
$Proxys[] = $Proxy;
|
||||
}
|
||||
$tmp = self::getClashConfGeneral($Configs['General']);
|
||||
$tmp[$confStr['Proxy']] = $Proxys;
|
||||
if (isset($Configs['ProxyGroup'])) {
|
||||
$tmp[$confStr['ProxyGroup']] = self::getClashConfProxyGroup(
|
||||
$AllProxys,
|
||||
$Configs['ProxyGroup']
|
||||
);
|
||||
} else {
|
||||
$tmp[$confStr['ProxyGroup']] = self::getClashConfProxyGroup(
|
||||
$AllProxys,
|
||||
$Configs['Proxy Group']
|
||||
);
|
||||
}
|
||||
$Conf = '#!MANAGED-CONFIG '
|
||||
. Config::get('baseUrl') . $_SERVER['REQUEST_URI'] .
|
||||
"\n\n#---------------------------------------------------#" .
|
||||
"\n## 上次更新于:" . date("Y-m-d h:i:s") .
|
||||
"\n#---------------------------------------------------#" .
|
||||
"\n\n"
|
||||
. Yaml::dump($tmp, 4, 2) .
|
||||
"\n\n"
|
||||
. self::getClashConfRule($Configs['Rule'], $local);
|
||||
|
||||
return $Conf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash 配置中的 General
|
||||
*
|
||||
* @param array $General Clash General 定义
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getClashConfGeneral($General)
|
||||
{
|
||||
if (count($General) != 0) {
|
||||
foreach ($General as $key) {
|
||||
if (in_array(
|
||||
$key,
|
||||
[
|
||||
'Proxy',
|
||||
'Proxy Group',
|
||||
'Rule'
|
||||
]
|
||||
)) {
|
||||
unset($key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $General;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash 配置中的 ProxyGroup
|
||||
*
|
||||
* @param array $Nodes 全部节点数组
|
||||
* @param array $ProxyGroups Clash 策略组定义
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getClashConfProxyGroup($Nodes, $ProxyGroups)
|
||||
{
|
||||
$return = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
$tmp = [];
|
||||
if (in_array($ProxyGroup['type'], ['select', 'url-test', 'fallback', 'load-balance'])) {
|
||||
$proxies = [];
|
||||
if (
|
||||
isset($ProxyGroup['content']['left-proxies'])
|
||||
&& count($ProxyGroup['content']['left-proxies']) != 0
|
||||
) {
|
||||
$proxies = $ProxyGroup['content']['left-proxies'];
|
||||
}
|
||||
foreach ($Nodes as $item) {
|
||||
$item['remark'] = $item['name'];
|
||||
$item = self::getMatchProxy($item, $ProxyGroup);
|
||||
if ($item !== null && !in_array($item['name'], $proxies)) {
|
||||
$proxies[] = $item['name'];
|
||||
}
|
||||
}
|
||||
if (isset($ProxyGroup['content']['right-proxies'])) {
|
||||
$proxies = array_merge($proxies, $ProxyGroup['content']['right-proxies']);
|
||||
}
|
||||
$tmp = [
|
||||
'name' => $ProxyGroup['name'],
|
||||
'type' => $ProxyGroup['type'],
|
||||
'proxies' => $proxies
|
||||
];
|
||||
if ($ProxyGroup['type'] != 'select') {
|
||||
$tmp['url'] = $ProxyGroup['url'];
|
||||
$tmp['interval'] = $ProxyGroup['interval'];
|
||||
}
|
||||
$return[] = $tmp;
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash 配置中的 Rule
|
||||
*
|
||||
* @param array $Rules Clash 规则加载地址
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getClashConfRule($Rules, $local)
|
||||
{
|
||||
$confStr = 'rules';
|
||||
if (isset($_GET['newconf']) && (int) $_GET['newconf'] == 0) {
|
||||
$confStr = 'Rule';
|
||||
}
|
||||
$return = ($confStr . ':' . PHP_EOL);
|
||||
|
||||
// 加载本地规则文件
|
||||
if ($local) {
|
||||
$render = ConfRender::getTemplateRender();
|
||||
return $return . $render->fetch(trim($Rules['source']));
|
||||
}
|
||||
|
||||
// 加载远程规则文件
|
||||
if (isset($Rules['source']) && $Rules['source'] != '') {
|
||||
$sourceURL = trim($Rules['source']);
|
||||
// 远程规则仅支持 github 以及 gitlab
|
||||
if (preg_match('/^https:\/\/((gist\.)?github\.com|raw\.githubusercontent\.com|gitlab\.com)/i', $sourceURL)) {
|
||||
$sourceContent = @file_get_contents($sourceURL);
|
||||
if (!$sourceContent) {
|
||||
$return .= ('// 远程规则加载失败'
|
||||
. PHP_EOL
|
||||
. 'GEOIP,CN,DIRECT'
|
||||
. PHP_EOL
|
||||
. 'MATCH,DIRECT');
|
||||
} else {
|
||||
try {
|
||||
$sourceRule = Yaml::parse($sourceContent);
|
||||
} catch (ParseException $exception) {
|
||||
$sourceRule['error'] = printf('无法解析 YAML 字符串: %s', $exception->getMessage());
|
||||
}
|
||||
if (isset($sourceRule['error']) || !isset($sourceRule[$confStr])) {
|
||||
$return .= $sourceContent;
|
||||
} else {
|
||||
$return .= Yaml::dump($sourceRule[$confStr], 4, 2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$return .= ('// 远程规则仅支持 github 以及 gitlab'
|
||||
. PHP_EOL
|
||||
. 'GEOIP,CN,DIRECT'
|
||||
. PHP_EOL
|
||||
. 'MATCH,DIRECT');
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash ProxyGroup 去除无用策略组
|
||||
*
|
||||
* @param array $ProxyGroups 策略组
|
||||
* @param array $checks 要检查的策略组名
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function fixClashProxyGroup($ProxyGroups, $checks)
|
||||
{
|
||||
if (count($checks) == 0) {
|
||||
return $ProxyGroups;
|
||||
}
|
||||
$clean_names = [];
|
||||
$newProxyGroups = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
if (in_array($ProxyGroup['name'], $checks) && count($ProxyGroup['proxies']) == 0) {
|
||||
$clean_names[] = $ProxyGroup['name'];
|
||||
continue;
|
||||
}
|
||||
$newProxyGroups[] = $ProxyGroup;
|
||||
}
|
||||
if (count($clean_names) >= 1) {
|
||||
$ProxyGroups = $newProxyGroups;
|
||||
$newProxyGroups = [];
|
||||
foreach ($ProxyGroups as $ProxyGroup) {
|
||||
if (!in_array($ProxyGroup['name'], $checks)) {
|
||||
$newProxies = [];
|
||||
foreach ($ProxyGroup['proxies'] as $proxie) {
|
||||
if (!in_array($proxie, $clean_names)) {
|
||||
$newProxies[] = $proxie;
|
||||
}
|
||||
}
|
||||
$ProxyGroup['proxies'] = $newProxies;
|
||||
}
|
||||
$newProxyGroups[] = $ProxyGroup;
|
||||
}
|
||||
}
|
||||
|
||||
return $newProxyGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash ProxyGroup 转字符串
|
||||
*
|
||||
* @param array $ProxyGroups ProxyGroup
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getClashProxyGroup2String($ProxyGroups)
|
||||
{
|
||||
return Yaml::dump($ProxyGroups, 4, 2);
|
||||
}
|
||||
|
||||
// 待续 Quantumult...
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Controllers\Mu;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\NodeOnlineLog;
|
||||
use App\Models\NodeInfoLog;
|
||||
|
||||
class NodeController extends BaseController
|
||||
{
|
||||
public function onlineUserLog($request, $response, $args)
|
||||
{
|
||||
$node_id = $args['id'];
|
||||
$count = $request->getParam('count');
|
||||
$log = new NodeOnlineLog();
|
||||
$log->node_id = $node_id;
|
||||
$log->online_user = $count;
|
||||
$log->log_time = time();
|
||||
if (!$log->save()) {
|
||||
$res = [
|
||||
'ret' => 0,
|
||||
'msg' => 'update failed',
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$res = [
|
||||
'ret' => 1,
|
||||
'msg' => 'ok',
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
public function info($request, $response, $args)
|
||||
{
|
||||
$node_id = $args['id'];
|
||||
$load = $request->getParam('load');
|
||||
$uptime = $request->getParam('uptime');
|
||||
$log = new NodeInfoLog();
|
||||
$log->node_id = $node_id;
|
||||
$log->load = $load;
|
||||
$log->uptime = $uptime;
|
||||
$log->log_time = time();
|
||||
if (!$log->save()) {
|
||||
$res = [
|
||||
'ret' => 0,
|
||||
'msg' => 'update failed',
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
$res = [
|
||||
'ret' => 1,
|
||||
'msg' => 'ok',
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
}
|
||||
@ -1,122 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controllers\Mu;
|
||||
|
||||
use App\Models\Node;
|
||||
use App\Models\TrafficLog;
|
||||
use App\Models\User;
|
||||
use App\Controllers\BaseController;
|
||||
use App\Utils\Tools;
|
||||
|
||||
class UserController extends BaseController
|
||||
{
|
||||
// User List
|
||||
public function index($request, $response, $args)
|
||||
{
|
||||
$node = Node::where('node_ip', '=', $_SERVER['REMOTE_ADDR'])->where(
|
||||
static function ($query) {
|
||||
$query->where('sort', '=', 0)
|
||||
->orWhere('sort', '=', 10)->orWhere('sort', '=', 12);
|
||||
}
|
||||
)->first();
|
||||
$node->node_heartbeat = time();
|
||||
$node->save();
|
||||
|
||||
if ($node->node_group != 0) {
|
||||
$users_raw = User::where(
|
||||
static function ($query) use ($node) {
|
||||
$query->where(
|
||||
static function ($query1) use ($node) {
|
||||
$query1->where('class', '>=', $node->node_class)
|
||||
->where('node_group', '=', $node->node_group);
|
||||
}
|
||||
)->orwhere('is_admin', 1);
|
||||
}
|
||||
)
|
||||
->where('enable', 1)->where('expire_in', '>', date('Y-m-d H:i:s'))->get();
|
||||
} else {
|
||||
$users_raw = User::where(
|
||||
static function ($query) use ($node) {
|
||||
$query->where(
|
||||
static function ($query1) use ($node) {
|
||||
$query1->where('class', '>=', $node->node_class);
|
||||
}
|
||||
)->orwhere('is_admin', 1);
|
||||
}
|
||||
)->where('enable', 1)->where('expire_in', '>', date('Y-m-d H:i:s'))->get();
|
||||
}
|
||||
if (($node->node_bandwidth_limit != 0) && $node->node_bandwidth_limit < $node->node_bandwidth) {
|
||||
$users = null;
|
||||
|
||||
$res = [
|
||||
'ret' => 1,
|
||||
'data' => $users
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
$key_list = array('method', 'id', 'port', 'passwd', 'u', 'd', 'enable',
|
||||
't', 'transfer_enable', 'switch', 'email');
|
||||
|
||||
$users_output = array();
|
||||
|
||||
foreach ($users_raw as $user_raw) {
|
||||
if ($user_raw->transfer_enable > $user_raw->u + $user_raw->d) {
|
||||
$user_raw = Tools::keyFilter($user_raw, $key_list);
|
||||
$users_output[] = $user_raw;
|
||||
}
|
||||
}
|
||||
|
||||
$res = [
|
||||
'ret' => 1,
|
||||
'msg' => 'ok',
|
||||
'data' => $users_output
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
|
||||
// Update Traffic
|
||||
public function addTraffic($request, $response, $args)
|
||||
{
|
||||
$id = $args['id'];
|
||||
$u = $request->getParam('u');
|
||||
$d = $request->getParam('d');
|
||||
$nodeId = $request->getParam('node_id');
|
||||
$node = Node::find($nodeId);
|
||||
|
||||
$node->node_bandwidth = $node->node_bandwidth + $d + $u;
|
||||
|
||||
$node->save();
|
||||
|
||||
|
||||
$rate = $node->traffic_rate;
|
||||
$user = User::find($id);
|
||||
|
||||
$user->t = time();
|
||||
$user->u += ($u * $rate);
|
||||
$user->d += ($d * $rate);
|
||||
if (!$user->save()) {
|
||||
$res = [
|
||||
'ret' => 0,
|
||||
'msg' => 'update failed',
|
||||
];
|
||||
//return $this->echoJson($response, $res);
|
||||
}
|
||||
// log
|
||||
$traffic = new TrafficLog();
|
||||
$traffic->user_id = $id;
|
||||
$traffic->u = $u;
|
||||
$traffic->d = $d;
|
||||
$traffic->node_id = $nodeId;
|
||||
$traffic->rate = $rate;
|
||||
$traffic->traffic = Tools::flowAutoShow(($u + $d) * $rate);
|
||||
$traffic->log_time = time();
|
||||
$traffic->save();
|
||||
|
||||
$res = [
|
||||
'ret' => 1,
|
||||
'msg' => 'ok',
|
||||
];
|
||||
return $this->echoJson($response, $res);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Middleware;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use App\Services\Factory;
|
||||
use App\Utils\Helper;
|
||||
|
||||
class Api
|
||||
{
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next)
|
||||
{
|
||||
$accessToken = Helper::getParam($request, 'access_token');
|
||||
if ($accessToken == null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token is null';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
$storage = Factory::createTokenStorage();
|
||||
$token = $storage->get($accessToken);
|
||||
if ($token == null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token is null';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
if ($token->expireTime < time()) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token is expire';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
$response = $next($request, $response);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@ -1,51 +1,50 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Middleware;
|
||||
|
||||
use App\Services\Config;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use App\Utils\Helper;
|
||||
use App\Models\Node;
|
||||
use App\Services\MalioConfig;
|
||||
|
||||
class Mod_Mu
|
||||
{
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next)
|
||||
/**
|
||||
* @param \Slim\Http\Request $request
|
||||
* @param \Slim\Http\Response $response
|
||||
* @param callable $next
|
||||
*
|
||||
* @return \Slim\Http\Response
|
||||
*/
|
||||
public function __invoke($request, $response, $next)
|
||||
{
|
||||
$key = Helper::getParam($request, 'key');
|
||||
$key = $request->getQueryParam('key');
|
||||
if ($key === null) {
|
||||
$res['ret'] = 0;
|
||||
$res['data'] = 'null';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
return $response->withjson([
|
||||
'ret' => 0,
|
||||
'data' => 'Your key is null.'
|
||||
]);
|
||||
}
|
||||
|
||||
$auth = false;
|
||||
$keys = Config::getMuKey();
|
||||
foreach ($keys as $k) {
|
||||
if ($key == $k) {
|
||||
$auth = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$auth = in_array($key, $keys);
|
||||
|
||||
$node = Node::where('node_ip', 'LIKE', $_SERVER['REMOTE_ADDR'] . '%')->first();
|
||||
if ($node == null && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
|
||||
if ($auth == false) {
|
||||
$res['ret'] = 0;
|
||||
$res['data'] = 'token or source is invalid, Your ip address is ' . $_SERVER['REMOTE_ADDR'];
|
||||
$res['data'] = 'token is invalid';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
|
||||
if ($auth == false) {
|
||||
$res['ret'] = 0;
|
||||
$res['data'] = 'token or source is invalid';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
if (Config::get('checkNodeIp') === true){
|
||||
$node = Node::where('node_ip', 'LIKE', $_SERVER['REMOTE_ADDR'] . '%')->first();
|
||||
if ($auth === false || ($node === null && $_SERVER['REMOTE_ADDR'] != '127.0.0.1')) {
|
||||
return $response->withJson([
|
||||
'ret' => 0,
|
||||
'data' => 'Token or IP is invalid. Now, your IP address is ' . $_SERVER['REMOTE_ADDR']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$response = $next($request, $response);
|
||||
return $response;
|
||||
return $next($request, $response);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Middleware;
|
||||
|
||||
use App\Services\Config;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use App\Utils\Helper;
|
||||
use App\Models\Node;
|
||||
|
||||
class Mu
|
||||
{
|
||||
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next)
|
||||
{
|
||||
$key = Helper::getParam($request, 'key');
|
||||
if ($key === null) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'key is null';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
|
||||
$auth = false;
|
||||
$keyset = explode(',', Config::get('muKey'));
|
||||
foreach ($keyset as $sinkey) {
|
||||
if ($key == $sinkey) {
|
||||
$auth = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($auth == false) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token or source is invalid';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
|
||||
$node = Node::where('node_ip', 'LIKE', $_SERVER['REMOTE_ADDR'] . '%')->first();
|
||||
if ($node == null && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'token or source is invalid';
|
||||
$response->getBody()->write(json_encode($res));
|
||||
return $response;
|
||||
}
|
||||
|
||||
$response = $next($request, $response);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class DetectBanLog extends Model
|
||||
{
|
||||
protected $connection = "default";
|
||||
protected $table = "detect_ban_log";
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\DefaultConfig;
|
||||
|
||||
class GConfig extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* The connection name for the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $connection = 'default';
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'gconfig';
|
||||
|
||||
/**
|
||||
* The primary key associated with the table.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $primaryKey = 'key';
|
||||
|
||||
/**
|
||||
* Indicates if the IDs are auto-incrementing.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
public $incrementing = false;
|
||||
|
||||
/**
|
||||
* The "type" of the auto-incrementing ID.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $keyType = 'string';
|
||||
|
||||
public static function recover($user)
|
||||
{
|
||||
$this->oldvalue = $this->value;
|
||||
$this->value = DefaultConfig::default_value($this->key)['value'];
|
||||
$this->operator_id = $user->id;
|
||||
$this->operator_name = ('[恢复默认] - ' . $user->user_name);
|
||||
$this->operator_email = $user->email;
|
||||
$this->last_update = time();
|
||||
$this->save();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
/**
|
||||
* SmsVerify Model
|
||||
*/
|
||||
class SmsVerify extends Model
|
||||
{
|
||||
protected $connection = 'default';
|
||||
protected $table = 'sms_verify';
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
class UserSubscribeLog extends Model
|
||||
{
|
||||
protected $connection = 'default';
|
||||
protected $table = 'user_subscribe_log';
|
||||
}
|
||||
@ -0,0 +1,554 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
class AppsProfiles
|
||||
{
|
||||
/**
|
||||
* Surge 策略组配置
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function Surge()
|
||||
{
|
||||
$Apps_Profiles = [
|
||||
'lhie1' => [
|
||||
'Checks' => ['🇭🇰 香港', '🇯🇵 日本', '🇸🇬 坡坡', '🇨🇳 台湾', '🇺🇸 美国', '🇰🇷 韩国', '🇨🇳 中继'],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '🍃 Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🇭🇰 香港', '🇯🇵 日本', '🇸🇬 坡坡', '🇨🇳 台湾', '🇺🇸 美国', '🇰🇷 韩国', '🇨🇳 中继', '🚀 Direct']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍂 Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🍃 Proxy', '🇨🇳 中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍎 Only',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🇭🇰 香港', '🇯🇵 日本', '🇸🇬 坡坡', '🇨🇳 台湾', '🇺🇸 美国', '🇰🇷 韩国', '🇨🇳 中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '☁️ Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🍃 Proxy', '🍂 Domestic']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🇭🇰 香港',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(香港|HK)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇯🇵 日本',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(日本|JP)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇸🇬 坡坡',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(新加坡|SG)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇨🇳 台湾',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(台湾|TW)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇺🇸 美国',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(美国|US)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇰🇷 韩国',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(韩国|KR)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇨🇳 中继',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(中继|中转|中国|回国|China)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
]
|
||||
]
|
||||
],
|
||||
'123456' => [
|
||||
'Checks' => [],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '🍃 Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(.*)'
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍂 Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🍃 Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍎 Only',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🍃 Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '☁️ Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🍃 Proxy', '🍂 Domestic']
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $Apps_Profiles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Surfboard 策略组配置
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function Surfboard()
|
||||
{
|
||||
$Apps_Profiles = [
|
||||
'lhie1' => [
|
||||
'Checks' => ['🇭🇰 香港', '🇯🇵 日本', '🇸🇬 坡坡', '🇨🇳 台湾', '🇺🇸 美国', '🇰🇷 韩国', '🇨🇳 中继'],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '🍃 Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🇭🇰 香港', '🇯🇵 日本', '🇸🇬 坡坡', '🇨🇳 台湾', '🇺🇸 美国', '🇰🇷 韩国', '🇨🇳 中继', '🚀 Direct']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍂 Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🍃 Proxy', '🇨🇳 中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '☁️ Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🍃 Proxy', '🍂 Domestic']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🇭🇰 香港',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(香港|HK)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇯🇵 日本',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(日本|JP)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇸🇬 坡坡',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(新加坡|SG)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇨🇳 台湾',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(台湾|TW)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇺🇸 美国',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(美国|US)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇰🇷 韩国',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(韩国|KR)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '🇨🇳 中继',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(中继|中转|中国|回国|China)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
]
|
||||
]
|
||||
],
|
||||
'123456' => [
|
||||
'Checks' => [],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '🍃 Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(.*)'
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '🍂 Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🚀 Direct', '🍃 Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => '☁️ Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['🍃 Proxy', '🍂 Domestic']
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $Apps_Profiles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clash 策略组配置
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function Clash()
|
||||
{
|
||||
$Apps_Profiles = [
|
||||
'lhie1' => [
|
||||
'Checks' => ['香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继'],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '香港',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(香港|HK)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '日本',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(日本|JP)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '坡坡',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(新加坡|SG)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '美国',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(美国|US)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '台湾',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(台湾|TW)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '韩国',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(韩国|KR)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '中继',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(中继|中转|中国|回国|China)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => 'Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['DIRECT', 'Proxy', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'AsianTV',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Domestic', 'Proxy', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'GlobalTV',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Proxy', '香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Proxy', 'Domestic']
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'ConnersHua_Pro' => [
|
||||
'Checks' => ['香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继'],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => '香港',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(香港|HK)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '日本',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(日本|JP)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '坡坡',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(新加坡|SG)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '美国',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(美国|US)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '台湾',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(台湾|TW)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '韩国',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(韩国|KR)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => '中继',
|
||||
'type' => 'url-test',
|
||||
'content' => [
|
||||
'regex' => '(中继|中转|中国|回国|China|CN)'
|
||||
],
|
||||
'url' => 'http://www.qualcomm.cn/generate_204',
|
||||
'interval' => 3600
|
||||
],
|
||||
[
|
||||
'name' => 'PROXY',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Final',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['PROXY', 'DIRECT']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'ForeignMedia',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['PROXY', '香港', '日本', '坡坡', '台湾', '美国', '韩国', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'DomesticMedia',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['DIRECT', 'PROXY', '中继']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Apple',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['DIRECT', 'PROXY']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Hijacking',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['DIRECT', 'REJECT']
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'ConnersHua_BacktoCN' => [
|
||||
'Checks' => [],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => 'PROXY',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(中继|中转|中国|回国|China)'
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
'123456' => [
|
||||
'Checks' => [],
|
||||
'ProxyGroup' => [
|
||||
[
|
||||
'name' => 'Proxy',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'regex' => '(.*)'
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Domestic',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['DIRECT', 'Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'AsianTV',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Domestic', 'Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'GlobalTV',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Proxy']
|
||||
]
|
||||
],
|
||||
[
|
||||
'name' => 'Others',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'left-proxies' => ['Proxy', 'Domestic']
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
|
||||
return $Apps_Profiles;
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Auth;
|
||||
|
||||
class File
|
||||
{
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace App\Services\Auth;
|
||||
|
||||
use App\Services\Factory;
|
||||
|
||||
class Token extends Base
|
||||
{
|
||||
protected $storage;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->storage = Factory::createTokenStorage();
|
||||
}
|
||||
|
||||
public function login($uid, $time)
|
||||
{
|
||||
// TODO: Implement getUser() method.
|
||||
}
|
||||
|
||||
public function logout()
|
||||
{
|
||||
// TODO: Implement logout() method.
|
||||
}
|
||||
|
||||
public function getUser()
|
||||
{
|
||||
$token = Cookie::get('token');
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
class Cache
|
||||
{
|
||||
}
|
||||
@ -0,0 +1,288 @@
|
||||
<?php
|
||||
/**
|
||||
* BitPayX - Yet Another Payment for FIAT
|
||||
* Make Payment Safer, Faster, Cheaper.
|
||||
*
|
||||
* Date: 2019/6/15
|
||||
* Time: 10:08 AM PST
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Models\Paylist;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Services\MalioConfig;
|
||||
use App\Services\View;
|
||||
|
||||
class BitPayX extends AbstractPayment
|
||||
{
|
||||
private $bitpayAppSecret;
|
||||
private $bitpayGatewayUri;
|
||||
|
||||
/*****************************************************************
|
||||
* BitPay Helper Function
|
||||
******************************************************************/
|
||||
public function __construct($bitpayAppSecret)
|
||||
{
|
||||
$this->bitpayAppSecret = $bitpayAppSecret;
|
||||
$this->bitpayGatewayUri = 'https://api.mugglepay.com/v1/';
|
||||
}
|
||||
|
||||
public function prepareSignId($tradeno)
|
||||
{
|
||||
$data_sign = array();
|
||||
$data_sign['merchant_order_id'] = $tradeno;
|
||||
$data_sign['secret'] = $this->bitpayAppSecret;
|
||||
$data_sign['type'] = 'FIAT';
|
||||
ksort($data_sign);
|
||||
return http_build_query($data_sign);
|
||||
}
|
||||
|
||||
public function sign($data)
|
||||
{
|
||||
return strtolower(md5(md5($data) . $this->bitpayAppSecret));
|
||||
}
|
||||
|
||||
public function verify($data, $signature)
|
||||
{
|
||||
$mySign = $this->sign($data);
|
||||
return $mySign === $signature;
|
||||
}
|
||||
|
||||
public function mprequest($data, $type = 'pay')
|
||||
{
|
||||
$headers = array('content-type: application/json', 'token: ' . $this->bitpayAppSecret);
|
||||
$curl = curl_init();
|
||||
if ($type === 'pay') {
|
||||
$this->bitpayGatewayUri .= 'orders';
|
||||
curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
$data_string = json_encode($data);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);
|
||||
} elseif ($type === 'query') {
|
||||
$this->bitpayGatewayUri .= 'orders/merchant_order_id/status?id=' . $data['merchant_order_id'];
|
||||
curl_setopt($curl, CURLOPT_URL, $this->bitpayGatewayUri);
|
||||
curl_setopt($curl, CURLOPT_HTTPGET, 1);
|
||||
}
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
$data = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function query($tradeNo)
|
||||
{
|
||||
$data['merchant_order_id'] = $tradeNo;
|
||||
return json_decode($this->mprequest($data, 'query'), true);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
* Abstract Payment Implentation
|
||||
******************************************************************/
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
$mobile = $request->getParam('mobile');
|
||||
// file_put_contents(BASE_PATH.'/bitpay_purchase.log', $price . " " . $type . "\r\n", FILE_APPEND);
|
||||
if ($price <= 0) {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => '请输入合理的金额。']);
|
||||
}
|
||||
if (MalioConfig::get('bitpyax_alipay_type') == 'ALIGLOBAL' && $type == 'ALIPAY') {
|
||||
$type = 'ALIGLOBAL';
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->datetime = time(); // date("Y-m-d H:i:s");
|
||||
$pl->save();
|
||||
$data['merchant_order_id'] = $pl->tradeno;
|
||||
$data['price_amount'] = (float)$price;
|
||||
$data['price_currency'] = 'CNY';
|
||||
if ($type === 'WECHAT') {
|
||||
$data['pay_currency'] = $type;
|
||||
}
|
||||
if ($type === 'ALIGLOBAL' || $type === 'ALIPAY') {
|
||||
$data['pay_currency'] = $type;
|
||||
}
|
||||
$data['mobile'] = $mobile;
|
||||
$data['title'] = '支付单号:' . $pl->tradeno;
|
||||
$data['description'] = '充值:' . $price . ' 元';
|
||||
$data['callback_url'] = Config::get('baseUrl') . '/payment/notify';
|
||||
|
||||
$data['success_url'] = Config::get('baseUrl') . '/user/payment/return?merchantTradeNo=';
|
||||
$data['success_url'] .= $pl->tradeno;
|
||||
$data['cancel_url'] = Config::get('baseUrl') . '/user/code';
|
||||
|
||||
$str_to_sign = $this->prepareSignId($pl->tradeno);
|
||||
$data['token'] = $this->sign($str_to_sign);
|
||||
$result = json_decode($this->mprequest($data), true);
|
||||
$result['pid'] = $pl->tradeno;
|
||||
// file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($data)."\r\n", FILE_APPEND);
|
||||
// file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($result)."\r\n", FILE_APPEND);
|
||||
$qrcode_url = '';
|
||||
$click_url = '';
|
||||
if ($result['status'] === 200 || $result['status'] === 201) {
|
||||
$result['payment_url'] .= '&lang=zh';
|
||||
if ($result['invoice'] && $result['invoice']['pay_currency']) {
|
||||
$pay_currency = $result['invoice']['pay_currency'];
|
||||
$order_id = $result['invoice']['order_id'];
|
||||
$base_url = 'https://www.zhihu.com/qrcode?url=';
|
||||
if ($pay_currency === 'ALIPAY') {
|
||||
$click_url = 'https://qrcode.icedropper.com/invoices/?id=' . $order_id . '&type=ALIPAY';
|
||||
$qrcode_url = $base_url . $click_url;
|
||||
} else if ($pay_currency === 'ALIGLOBAL') {
|
||||
$click_url = 'https://qrcode.oceanlunettes.com/invoices/?id=' . $order_id . '&type=ALIGLOBAL';
|
||||
$qrcode_url = $base_url . $click_url;
|
||||
} else if ($pay_currency === 'WECHAT') {
|
||||
$qrcode_url = $base_url . $result['invoice']['qrcode'];
|
||||
$click_url = "#";
|
||||
}
|
||||
}
|
||||
// file_put_contents(BASE_PATH.'/bitpay_purchase.log', json_encode($result) . "\r\n" . $qrcode_url . "\r\n", FILE_APPEND);
|
||||
return json_encode(array('url' => $result['payment_url'], 'qrcode_url' => $qrcode_url, 'click_url' => $click_url, 'errcode' => 0, 'pid' => $pl->tradeno));
|
||||
}
|
||||
return json_encode(['errcode' => -1, 'errmsg' => $result . error]);
|
||||
}
|
||||
|
||||
public function purchase_maliopay($type, $price)
|
||||
{
|
||||
$user = Auth::getUser();
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->datetime = time(); // date("Y-m-d H:i:s");
|
||||
$pl->save();
|
||||
|
||||
$data['merchant_order_id'] = $pl->tradeno;
|
||||
$data['price_amount'] = (float)$price;
|
||||
$data['price_currency'] = 'CNY';
|
||||
$type = strtoupper($type);
|
||||
if ($type === 'WECHAT') {
|
||||
$data['pay_currency'] = $type;
|
||||
}
|
||||
if ($type === 'ALIGLOBAL' || $type === 'ALIPAY') {
|
||||
$data['pay_currency'] = $type;
|
||||
}
|
||||
|
||||
$data['mobile'] = false;
|
||||
$data['title'] = '支付单号:' . $pl->tradeno;
|
||||
$data['description'] = '充值:' . $price . ' 元';
|
||||
$data['callback_url'] = Config::get('baseUrl') . '/payment/notify/bitpayx';
|
||||
|
||||
$data['success_url'] = Config::get('baseUrl') . '/user/payment/return?merchantTradeNo='.$pl->tradeno.'&tradeno='.$pl->tradeno;
|
||||
$data['cancel_url'] = Config::get('baseUrl') . '/user/code';
|
||||
|
||||
$str_to_sign = $this->prepareSignId($pl->tradeno);
|
||||
$data['token'] = $this->sign($str_to_sign);
|
||||
$result = json_decode($this->mprequest($data), true);
|
||||
$result['pid'] = $pl->tradeno;
|
||||
$qrcode_url = '';
|
||||
$click_url = '';
|
||||
if ($result['status'] === 200 || $result['status'] === 201) {
|
||||
$result['payment_url'] .= '&lang=zh';
|
||||
if ($result['invoice'] && $result['invoice']['pay_currency']) {
|
||||
$pay_currency = $result['invoice']['pay_currency'];
|
||||
$order_id = $result['invoice']['order_id'];
|
||||
$base_url = 'https://www.zhihu.com/qrcode?url=';
|
||||
if ($pay_currency === 'ALIPAY') {
|
||||
$click_url = 'https://qrcode.icedropper.com/invoices/?id=' . $order_id . '&type=ALIPAY';
|
||||
$qrcode_url = $base_url . $click_url;
|
||||
} else if ($pay_currency === 'ALIGLOBAL') {
|
||||
$click_url = 'https://qrcode.oceanlunettes.com/invoices/?id=' . $order_id . '&type=ALIGLOBAL';
|
||||
$qrcode_url = $base_url . $click_url;
|
||||
} else if ($pay_currency === 'WECHAT') {
|
||||
$qrcode_url = $result['invoice']['qrcode'];
|
||||
$click_url = "#";
|
||||
}
|
||||
}
|
||||
return array('url' => $result['payment_url'], 'qrcode_url' => $qrcode_url, 'click_url' => $click_url, 'errcode' => 0, 'tradeno' => $pl->tradeno);
|
||||
}
|
||||
|
||||
return ['errcode' => -1, 'errmsg' => $result];
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
if (!$this->bitpayAppSecret || $this->bitpayAppSecret === '') {
|
||||
$return = [];
|
||||
$return['status'] = 400;
|
||||
echo json_encode($return);
|
||||
return;
|
||||
}
|
||||
$inputString = file_get_contents('php://input', 'r');
|
||||
$inputStripped = str_replace(array("\r", "\n", "\t", "\v"), '', $inputString);
|
||||
$inputJSON = json_decode($inputStripped, true); //convert JSON into array
|
||||
$data = array();
|
||||
if ($inputJSON !== null) {
|
||||
$data['status'] = $inputJSON['status'];
|
||||
$data['order_id'] = $inputJSON['order_id'];
|
||||
$data['merchant_order_id'] = $inputJSON['merchant_order_id'];
|
||||
$data['price_amount'] = $inputJSON['price_amount'];
|
||||
$data['price_currency'] = $inputJSON['price_currency'];
|
||||
$data['created_at_t'] = $inputJSON['created_at_t'];
|
||||
}
|
||||
// file_put_contents(BASE_PATH.'/bitpay_notify.log', json_encode($data)."\r\n", FILE_APPEND);
|
||||
// 准备待签名数据
|
||||
$str_to_sign = $this->prepareSignId($inputJSON['merchant_order_id']);
|
||||
$resultVerify = $this->verify($str_to_sign, $inputJSON['token']);
|
||||
$isPaid = $data !== null && $data['status'] !== null && $data['status'] === 'PAID';
|
||||
// file_put_contents(BASE_PATH.'/bitpay_notify.log', $resultVerify."\r\n".$isPaid."\r\n", FILE_APPEND);
|
||||
if ($resultVerify && $isPaid) {
|
||||
$this->postPayment($data['merchant_order_id'], 'BitPayX ' . $data['merchant_order_id']);
|
||||
// echo 'SUCCESS';
|
||||
$return = [];
|
||||
$return['status'] = 200;
|
||||
echo json_encode($return);
|
||||
} else {
|
||||
// echo 'FAIL';
|
||||
$return = [];
|
||||
$return['status'] = 400;
|
||||
echo json_encode($return);
|
||||
}
|
||||
}
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$pid = $_GET['merchantTradeNo'];
|
||||
$p = Paylist::where('tradeno', '=', $pid)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status === 1) {
|
||||
$success = 1;
|
||||
} else {
|
||||
$data = $this->query($pid);
|
||||
$isPaid = $data !== null && $data['order'] !== null && $data['order']['status'] !== null && $data['order']['status'] === 'PAID';
|
||||
// file_put_contents(BASE_PATH.'/bitpay_return.log', $pid . " " . $data ."\r\n". $isPaid . "\r\n", FILE_APPEND);
|
||||
if ($isPaid) {
|
||||
$this->postPayment($pid, 'BitPayX');
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$return = [];
|
||||
$p = Paylist::where('tradeno', $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
// file_put_contents(BASE_PATH.'/bitpay_status_success.log', json_encode($return)."\r\n", FILE_APPEND);
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,161 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Author:
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午4:01
|
||||
*/
|
||||
|
||||
/**
|
||||
* Made By Leo
|
||||
* 黛米付接口
|
||||
* 2.1.4版本
|
||||
* 适用于 V1 API 黛米付面板V1
|
||||
* copyright all rights reserved
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
|
||||
use App\Models\Paylist;
|
||||
|
||||
|
||||
class DoiAMPay extends AbstractPayment
|
||||
{
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return View::getSmarty()->assign('enabled', Config::get('doiampay')['enabled'])->fetch('user/doiam.tpl');
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$order_data = $_POST;
|
||||
$status = $order_data['status']; //获取传递过来的交易状态
|
||||
$invoiceid = $order_data['out_trade_no']; //订单号
|
||||
$transid = $order_data['trade_no']; //转账交易号
|
||||
$amount = $order_data['money']; //获取递过来的总价格
|
||||
if (!DoiAM::checksign($_POST, Config::get('doiampay')['mchdata'][$args['type']]['token'])) {
|
||||
return json_encode(array('errcode' => 2333));
|
||||
}
|
||||
if ($status == 'success') {
|
||||
$this->postPayment($invoiceid, '黛米付' . ['wepay' => '(微信)', 'qqpay' => '(QQ支付)', 'alipay' => '(支付宝)'][$args['type']]);
|
||||
return json_encode(['errcode' => 0]);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$type = $request->getParam('type');
|
||||
$price = $request->getParam('price');
|
||||
if (Config::get('doiampay')['enabled'][$type] == 0) {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => '非法的支付方式.']);
|
||||
}
|
||||
if ($price <= 0) {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => '非法的金额.']);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get('doiampay')['mchdata'][$type];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
$data = [
|
||||
'trade' => $pl->tradeno,
|
||||
'price' => $price,
|
||||
'phone' => $settings['phone'],
|
||||
'mchid' => $settings['mchid'],
|
||||
'subject' => Config::get('appName') . '充值' . $price . '元',
|
||||
'body' => Config::get('appName') . '充值' . $price . '元',
|
||||
'type' => 'Mod',
|
||||
];
|
||||
$data = DoiAM::sign($data, $settings['token']);
|
||||
$ret = DoiAM::post('https://api.daimiyun.cn/v2/' . $type . '/create', $data);
|
||||
$result = json_decode($ret, true);
|
||||
if ($result && $result['errcode'] == 0) {
|
||||
$result['pid'] = $pl->tradeno;
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
return json_encode([
|
||||
'errcode' => -1,
|
||||
'errmsg' => '接口调用失败!' . $ret,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$money = $_GET['money'];
|
||||
echo "您已经成功支付 $money 元,正在跳转..";
|
||||
echo <<<HTML
|
||||
<script>
|
||||
location.href="/user/code";
|
||||
</script>
|
||||
HTML;
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where('tradeno', $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
|
||||
class DoiAM
|
||||
{
|
||||
public static function sort(&$array)
|
||||
{
|
||||
ksort($array);
|
||||
}
|
||||
|
||||
public static function getsign($array, $key)
|
||||
{
|
||||
unset($array['sign']);
|
||||
self::sort($array);
|
||||
$sss = http_build_query($array);
|
||||
$sign = hash('sha256', $sss . $key);
|
||||
$sign = sha1($sign . hash('sha256', $key));
|
||||
return $sign;
|
||||
}
|
||||
|
||||
public static function sign($array, $key)
|
||||
{
|
||||
$array['sign'] = self::getSign($array, $key);
|
||||
return $array;
|
||||
}
|
||||
|
||||
public static function checksign($array, $key)
|
||||
{
|
||||
$new = $array;
|
||||
$new = self::sign($new, $key);
|
||||
if (!isset($array['sign'])) {
|
||||
return false;
|
||||
}
|
||||
return $array['sign'] == $new['sign'];
|
||||
}
|
||||
|
||||
public static function post($url, $data = null)
|
||||
{
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $url);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
if (!empty($data)) {
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
}
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
$output = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,236 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tonyzou
|
||||
* Date: 2018/9/24
|
||||
* Time: 下午9:24
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
use App\Services\View;
|
||||
use Exception;
|
||||
use Omnipay\Omnipay;
|
||||
|
||||
class F2Fpay_PAYJS extends AbstractPayment
|
||||
{
|
||||
// f2fpay
|
||||
private function createGateway()
|
||||
{
|
||||
$gateway = Omnipay::create('Alipay_AopF2F');
|
||||
$gateway->setSignType('RSA2'); //RSA/RSA2
|
||||
$gateway->setAppId(Config::get('f2fpay_app_id'));
|
||||
$gateway->setPrivateKey(Config::get('merchant_private_key')); // 可以是路径,也可以是密钥内容
|
||||
$gateway->setAlipayPublicKey(Config::get('alipay_public_key')); // 可以是路径,也可以是密钥内容
|
||||
$notifyUrl = Config::get('f2fNotifyUrl') ?? (Config::get('baseUrl') . '/payment/notify');
|
||||
$gateway->setNotifyUrl($notifyUrl);
|
||||
return $gateway;
|
||||
}
|
||||
// f2fpay end
|
||||
|
||||
// payjs
|
||||
public function __construct()
|
||||
{
|
||||
$this->appSecret = Config::get('payjs_key');
|
||||
$this->gatewayUri = 'https://payjs.cn/api/';
|
||||
}
|
||||
public function prepareSign($data)
|
||||
{
|
||||
$data['mchid'] = Config::get('payjs_mchid');
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
return http_build_query($data);
|
||||
}
|
||||
|
||||
public function sign($data)
|
||||
{
|
||||
return strtoupper(md5(urldecode($data) . '&key=' . $this->appSecret));
|
||||
}
|
||||
|
||||
public function verify($data, $signature)
|
||||
{
|
||||
$mySign = $this->sign($data);
|
||||
return $mySign === $signature;
|
||||
}
|
||||
|
||||
public function post($data, $type = 'pay')
|
||||
{
|
||||
if ($type == 'pay') {
|
||||
$this->gatewayUri .= 'cashier';
|
||||
} elseif ($type == 'refund') {
|
||||
$this->gatewayUri .= 'refund';
|
||||
} else {
|
||||
$this->gatewayUri .= 'check';
|
||||
}
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $this->gatewayUri);
|
||||
curl_setopt($curl, CURLOPT_HEADER, 0);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
$data = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function query($tradeNo)
|
||||
{
|
||||
$data['payjs_order_id'] = $tradeNo;
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
return json_decode($this->post($data, $type = 'query'), true);
|
||||
}
|
||||
|
||||
public function refund($merchantTradeNo)
|
||||
{
|
||||
$data['payjs_order_id'] = $merchantTradeNo;
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
return $this->post($data, 'refund');
|
||||
}
|
||||
// payjs end
|
||||
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$payment = $request->getParam('payment');
|
||||
if ($payment == 'alipay') {
|
||||
$amount = $request->getParam('amount');
|
||||
$user = Auth::getUser();
|
||||
if ($amount == '') {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = '订单金额错误:' . $amount;
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->total = $amount;
|
||||
$pl->save();
|
||||
|
||||
$gateway = $this->createGateway();
|
||||
|
||||
$request = $gateway->purchase();
|
||||
$request->setBizContent([
|
||||
'subject' => $pl->tradeno,
|
||||
'out_trade_no' => $pl->tradeno,
|
||||
'total_amount' => $pl->total
|
||||
]);
|
||||
|
||||
/** @var \Omnipay\Alipay\Responses\AopTradePreCreateResponse $response */
|
||||
$aliResponse = $request->send();
|
||||
|
||||
// 获取收款二维码内容
|
||||
$qrCodeContent = $aliResponse->getQrCode();
|
||||
|
||||
$return['ret'] = 1;
|
||||
$return['qrcode'] = $qrCodeContent;
|
||||
$return['amount'] = $pl->total;
|
||||
$return['pid'] = $pl->tradeno;
|
||||
|
||||
return json_encode($return);
|
||||
|
||||
} else if ($payment == 'wechat') {
|
||||
$price = $request->getParam('amount');
|
||||
if ($price <= 0) {
|
||||
return json_encode(['ret' => -1, 'errmsg' => '非法的金额.']);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
$data['mchid'] = Config::get('payjs_mchid');
|
||||
$data['out_trade_no'] = $pl->tradeno;
|
||||
$data['total_fee'] = (float) $price * 100;
|
||||
$data['notify_url'] = Config::get('baseUrl') . '/payment/notify?way=payjs';
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
$url = 'https://payjs.cn/api/cashier?' . http_build_query($data);
|
||||
return json_encode(['ret' => 1, 'qrcode' => $url, 'pid' => $data['out_trade_no']]);
|
||||
} else {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = 'payment参数缺失';
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$way = $_GET['way'];
|
||||
if ($way == 'payjs') {
|
||||
$data = $_POST;
|
||||
|
||||
if($data['return_code'] == 1){
|
||||
// 验证签名
|
||||
$in_sign = $data['sign'];
|
||||
unset($data['sign']);
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
$sign = strtoupper(md5(urldecode(http_build_query($data) . '&key=' . $this->appSecret)));
|
||||
$resultVerify = $sign ? true : false;
|
||||
|
||||
//$str_to_sign = $this->prepareSign($data);
|
||||
//$resultVerify = $this->verify($str_to_sign, $request->getParam('sign'));
|
||||
|
||||
if ($resultVerify) {
|
||||
// 验重
|
||||
$p = Paylist::where('tradeno', '=', $data['out_trade_no'])->first();
|
||||
$money = $p->total;
|
||||
if ($p->status != 1) {
|
||||
$this->postPayment($data['out_trade_no'], '微信支付');
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
} else {
|
||||
echo 'FAIL2';
|
||||
}
|
||||
} else {
|
||||
echo 'FAIL1';
|
||||
}
|
||||
} else {
|
||||
$gateway = $this->createGateway();
|
||||
$aliRequest = $gateway->completePurchase();
|
||||
$aliRequest->setParams($_POST);
|
||||
|
||||
try {
|
||||
/** @var \Omnipay\Alipay\Responses\AopCompletePurchaseResponse $response */
|
||||
$aliResponse = $aliRequest->send();
|
||||
$pid = $aliResponse->data('out_trade_no');
|
||||
if ($aliResponse->isPaid()) {
|
||||
$this->postPayment($pid, '支付宝当面付 ' . $pid);
|
||||
die('success'); //The response should be 'success' only
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
die('fail');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where('tradeno', $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,458 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
use App\Services\MalioConfig;
|
||||
use Omnipay\Omnipay;
|
||||
use Stripe\Stripe;
|
||||
use Stripe\Charge;
|
||||
|
||||
class MalioPay extends AbstractPayment
|
||||
{
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
$user = Auth::getUser();
|
||||
if ($type != 'alipay' and $type != 'wechat') {
|
||||
return json_encode(['ret' => 0, 'msg' => 'wrong type']);
|
||||
}
|
||||
|
||||
if ($price < MalioConfig::get('mups_minimum_amount')) {
|
||||
return json_encode(['ret' => 0, 'errmsg' => '充值最低金额为' . MalioConfig::get('mups_minimum_amount') . '元']);
|
||||
}
|
||||
|
||||
if ($price <= 0) {
|
||||
return json_encode(['ret' => 0, 'msg' => "金额必须大于0元"]);
|
||||
}
|
||||
|
||||
if ($type == 'alipay') {
|
||||
$payment_system = MalioConfig::get('mups_alipay');
|
||||
switch ($payment_system) {
|
||||
case ('bitpayx'):
|
||||
$bitpayx = new BitPayX(Config::get('bitpay_secret'));
|
||||
$result = $bitpayx->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('tomatopay'):
|
||||
$tomatopay = new TomatoPay();
|
||||
$result = $tomatopay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['code']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('f2fpay'):
|
||||
$f2fpay = new AopF2F();
|
||||
$result = $f2fpay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'qrcode',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('stripe'):
|
||||
$stripe = new StripePay();
|
||||
$result = $stripe->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('wolfpay'):
|
||||
$wolfpay = new Wolfpay();
|
||||
$result = $wolfpay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('materialpay'):
|
||||
$materialpay = new MaterialPay(Config::get('materialpay_secret'));
|
||||
$result = $materialpay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
}
|
||||
} else if ($type == 'wechat') {
|
||||
$payment_system = MalioConfig::get('mups_wechat');
|
||||
switch ($payment_system) {
|
||||
case ('bitpayx'):
|
||||
$bitpayx = new BitPayX(Config::get('bitpay_secret'));
|
||||
$result = $bitpayx->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'qrcode',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['qrcode_url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('tomatopay'):
|
||||
$tomatopay = new TomatoPay();
|
||||
$result = $tomatopay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'url',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['code']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('stripe'):
|
||||
$stripe = new StripePay();
|
||||
$result = $stripe->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'qrcode',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
case ('materialpay'):
|
||||
$materialpay = new MaterialPay(Config::get('materialpay_secret'));
|
||||
$result = $materialpay->purchase_maliopay($type, $price);
|
||||
if ($result['errcode'] == 0) {
|
||||
$return = array(
|
||||
'ret' => 1,
|
||||
'type' => 'qrcode',
|
||||
'tradeno' => $result['tradeno'],
|
||||
'url' => $result['url']
|
||||
);
|
||||
} else {
|
||||
$return = array(
|
||||
'ret' => 0,
|
||||
'msg' => $result['errmsg']
|
||||
);
|
||||
}
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$path = $request->getUri()->getPath();
|
||||
$path_exploded = explode('/', $path);
|
||||
$payment_system = $path_exploded[3];
|
||||
|
||||
switch ($payment_system) {
|
||||
case ('bitpayx'):
|
||||
$bitpayx = new BitPayX(Config::get('bitpay_secret'));
|
||||
if (!Config::get('bitpay_secret') || Config::get('bitpay_secret') === '') {
|
||||
$return = [];
|
||||
$return['status'] = 400;
|
||||
echo json_encode($return);
|
||||
return $return;
|
||||
}
|
||||
$inputString = file_get_contents('php://input', 'r');
|
||||
$inputStripped = str_replace(array("\r", "\n", "\t", "\v"), '', $inputString);
|
||||
$inputJSON = json_decode($inputStripped, true); //convert JSON into array
|
||||
$data = array();
|
||||
if ($inputJSON !== null) {
|
||||
$data['status'] = $inputJSON['status'];
|
||||
$data['order_id'] = $inputJSON['order_id'];
|
||||
$data['merchant_order_id'] = $inputJSON['merchant_order_id'];
|
||||
$data['price_amount'] = $inputJSON['price_amount'];
|
||||
$data['price_currency'] = $inputJSON['price_currency'];
|
||||
$data['created_at_t'] = $inputJSON['created_at_t'];
|
||||
}
|
||||
$str_to_sign = $bitpayx->prepareSignId($inputJSON['merchant_order_id']);
|
||||
$resultVerify = $bitpayx->verify($str_to_sign, $inputJSON['token']);
|
||||
$isPaid = $data !== null && $data['status'] !== null && $data['status'] === 'PAID';
|
||||
if ($resultVerify && $isPaid) {
|
||||
$bitpayx->postPaymentMaliopay($data['merchant_order_id'], '在线支付 ' . $data['merchant_order_id']);
|
||||
// echo 'SUCCESS';
|
||||
$return = [];
|
||||
$return['status'] = 200;
|
||||
echo json_encode($return);
|
||||
} else {
|
||||
// echo 'FAIL';
|
||||
$return = [];
|
||||
$return['status'] = 400;
|
||||
echo json_encode($return);
|
||||
}
|
||||
return $return;
|
||||
case ('tomatopay'):
|
||||
$type = 'alipay';
|
||||
$settings = Config::get("tomatopay")[$type];
|
||||
$order_data = $_REQUEST;
|
||||
$transid = $order_data['trade_no']; //转账交易号
|
||||
$invoiceid = $order_data['out_trade_no']; //订单号
|
||||
$amount = $order_data['total_fee']; //获取递过来的总价格
|
||||
$status = $order_data['trade_status']; //获取传递过来的交易状态
|
||||
$signs = $order_data['sign'];
|
||||
|
||||
if ($request->isGet()) {
|
||||
header("Location: /user/payment/return?tradeno=".$order_data['out_trade_no']);
|
||||
return 0;
|
||||
}
|
||||
|
||||
$security = array();
|
||||
$security['out_trade_no'] = $invoiceid;
|
||||
$security['total_fee'] = $amount;
|
||||
$security['trade_no'] = $transid;
|
||||
$security['trade_status'] = $status;
|
||||
foreach ($security as $k => $v) {
|
||||
$o .= "$k=" . urlencode($v) . "&";
|
||||
}
|
||||
$sign = md5(substr($o, 0, -1) . $settings['token']);
|
||||
|
||||
|
||||
if ($sign == $signs) {
|
||||
//验重
|
||||
$p = Paylist::where('tradeno', '=', $order_data['out_trade_no'])->first();
|
||||
$money = $p->total;
|
||||
if ($p->status != 1) {
|
||||
$this->postPaymentMaliopay($order_data['out_trade_no'], "在线支付");
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
echo 'success';
|
||||
} else {
|
||||
echo '验证失败';
|
||||
}
|
||||
|
||||
return 'tomatopay';
|
||||
case ('f2fpay'):
|
||||
$f2fpay = new AopF2F();
|
||||
|
||||
$gateway = Omnipay::create('Alipay_AopF2F');
|
||||
$gateway->setSignType('RSA2'); //RSA/RSA2
|
||||
$gateway->setAppId(Config::get('f2fpay_app_id'));
|
||||
$gateway->setPrivateKey(Config::get('merchant_private_key')); // 可以是路径,也可以是密钥内容
|
||||
$gateway->setAlipayPublicKey(Config::get('alipay_public_key')); // 可以是路径,也可以是密钥内容
|
||||
|
||||
$aliRequest = $gateway->completePurchase();
|
||||
$aliRequest->setParams($_POST);
|
||||
|
||||
$aliResponse = $aliRequest->send();
|
||||
$pid = $aliResponse->data('out_trade_no');
|
||||
if ($aliResponse->isPaid()) {
|
||||
$this->postPaymentMaliopay($pid, '支付宝');
|
||||
die('success'); //The response should be 'success' only
|
||||
}
|
||||
return 'f2fpay';
|
||||
case ('stripe'):
|
||||
Stripe::setApiKey(Config::get('stripe_key'));
|
||||
$endpoint_secret = Config::get('stripe_webhook_endpoint_secret');
|
||||
$payload = @file_get_contents('php://input');
|
||||
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
|
||||
$event = null;
|
||||
|
||||
try {
|
||||
$event = \Stripe\Webhook::constructEvent(
|
||||
$payload,
|
||||
$sig_header,
|
||||
$endpoint_secret
|
||||
);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
http_response_code(400);
|
||||
exit();
|
||||
} catch (\Stripe\Error\SignatureVerification $e) {
|
||||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
|
||||
switch ($event->type) {
|
||||
case 'source.chargeable':
|
||||
$source = $event->data->object;
|
||||
$charge = Charge::create([
|
||||
'amount' => $source['amount'],
|
||||
'currency' => $source['currency'],
|
||||
'source' => $source['id'],
|
||||
]);
|
||||
if ($charge['status'] == 'succeeded') {
|
||||
$type = null;
|
||||
if ($source['type'] == 'alipay') {
|
||||
$type = '支付宝支付';
|
||||
} else if ($source['type'] == 'wechat') {
|
||||
$type = '微信支付';
|
||||
}
|
||||
$order = Paylist::where('tradeno', '=', $source['id'])->first();
|
||||
if ($order->status != 1) {
|
||||
$this->postPaymentMaliopay($source['id'], 'Stripe '.$type);
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
|
||||
http_response_code(200);
|
||||
case ('wolfpay'):
|
||||
$type = $args['method'];
|
||||
$settings = Config::get("wolfpay") ['config'];
|
||||
$security['orderid'] = $_REQUEST['out_trade_no'];
|
||||
if ($security['orderid'] == '' OR $security['orderid'] == null) {
|
||||
header("Location: /user/code");
|
||||
} else {
|
||||
//实例化支付类
|
||||
//$pay = new Pays($settings['hid'], $settings['key']);
|
||||
$wolfpay = new Wolfpay();
|
||||
//接收异步通知数据
|
||||
$data = $_GET;
|
||||
//商户订单号
|
||||
$out_trade_no = $data['out_trade_no'];
|
||||
//验证签名
|
||||
if ($wolfpay->verify($data)) {
|
||||
//验证支付状态
|
||||
if ($data['trade_status'] == 'TRADE_SUCCESS') {
|
||||
$wolfpay->postPaymentMaliopay($data['out_trade_no'], "在线支付");
|
||||
echo "success";
|
||||
header("Location: /user/code");
|
||||
}
|
||||
} else {
|
||||
echo '錯誤';
|
||||
}
|
||||
}
|
||||
case ('materialpay'):
|
||||
$data = array();
|
||||
$data['tradeStatus'] = $request->getParam('tradeStatus');
|
||||
$data['payAmount'] = number_format($request->getParam('payAmount'),2);
|
||||
$data['tradeNo'] = $request->getParam('tradeNo');
|
||||
$data['payType'] = $request->getParam('payType');
|
||||
$data['outTradeNo'] = $request->getParam('outTradeNo');
|
||||
|
||||
$pl = Paylist::where('tradeno',$data['outTradeNo'])->first();
|
||||
if ($pl->status == 1) {
|
||||
echo 'success';
|
||||
return;
|
||||
}
|
||||
|
||||
$materialpay = new MaterialPay(Config::get('materialpay_secret'));
|
||||
// 准备待签名数据
|
||||
$str_to_sign = $materialpay->prepareSign($data);
|
||||
// 验证签名
|
||||
$resultVerify = $materialpay->verify($str_to_sign, $request->getParam('sign'));
|
||||
if ($resultVerify) {
|
||||
$materialpay->postPaymentMaliopay($data['outTradeNo'], 'MaterialPay - ' . $data['outTradeNo']);
|
||||
echo 'success';
|
||||
return;
|
||||
} else {
|
||||
echo 'fail';
|
||||
return;
|
||||
}
|
||||
default:
|
||||
return 'failed';
|
||||
}
|
||||
}
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$tradeno = $_GET['tradeno'];
|
||||
if ($tradeno == '' || $tradeno == null) {
|
||||
$tradeno = $_GET['source'];
|
||||
}
|
||||
if ($tradeno == '' || $tradeno == null) {
|
||||
$tradeno = $_GET['out_trade_no'];
|
||||
}
|
||||
$p = Paylist::where('tradeno', '=', $tradeno)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status === 1) {
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where('tradeno', $_POST['tradeno'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,189 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
|
||||
class PAYJS extends AbstractPayment
|
||||
{
|
||||
private $appSecret;
|
||||
private $gatewayUri;
|
||||
/**
|
||||
* 签名初始化
|
||||
* @param merKey 签名密钥
|
||||
*/
|
||||
public function __construct($appSecret)
|
||||
{
|
||||
$this->appSecret = $appSecret;
|
||||
$this->gatewayUri = 'https://payjs.cn/api/';
|
||||
}
|
||||
/**
|
||||
* @name 准备签名/验签字符串
|
||||
*/
|
||||
public function prepareSign($data)
|
||||
{
|
||||
$data['mchid'] = Config::get('payjs_mchid');
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
return http_build_query($data);
|
||||
}
|
||||
/**
|
||||
* @name 生成签名
|
||||
* @param sourceData
|
||||
* @return 签名数据
|
||||
*/
|
||||
public function sign($data)
|
||||
{
|
||||
return strtoupper(md5(urldecode($data) . '&key=' . $this->appSecret));
|
||||
}
|
||||
/*
|
||||
* @name 验证签名
|
||||
* @param signData 签名数据
|
||||
* @param sourceData 原数据
|
||||
* @return
|
||||
*/
|
||||
public function verify($data, $signature)
|
||||
{
|
||||
$mySign = $this->sign($data);
|
||||
return $mySign === $signature;
|
||||
}
|
||||
public function post($data, $type = 'pay')
|
||||
{
|
||||
if ($type == 'pay') {
|
||||
$this->gatewayUri .= 'cashier';
|
||||
} elseif ($type == 'refund') {
|
||||
$this->gatewayUri .= 'refund';
|
||||
} else {
|
||||
$this->gatewayUri .= 'check';
|
||||
}
|
||||
$curl = curl_init();
|
||||
curl_setopt($curl, CURLOPT_URL, $this->gatewayUri);
|
||||
curl_setopt($curl, CURLOPT_HEADER, 0);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
|
||||
curl_setopt($curl, CURLOPT_POST, 1);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
|
||||
$data = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
return $data;
|
||||
}
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
if ($price <= 0) {
|
||||
return json_encode(['code' => -1, 'errmsg' => '非法的金额.']);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
//if ($type != 'alipay') {
|
||||
//$type = '';
|
||||
//}
|
||||
$data['mchid'] = Config::get('payjs_mchid');
|
||||
//$data['type'] = $type;
|
||||
$data['out_trade_no'] = $pl->tradeno;
|
||||
$data['total_fee'] = (float) $price * 100;
|
||||
$data['notify_url'] = Config::get('baseUrl') . '/payment/notify?way=payjs';
|
||||
//$data['callback_url'] = Config::get('baseUrl') . '/user/code';
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
$url = 'https://payjs.cn/api/cashier?' . http_build_query($data);
|
||||
return json_encode(['code' => 0, 'url' => $url, 'pid' => $data['out_trade_no']]);
|
||||
//$result = json_decode($this->post($data), true);
|
||||
//$result['pid'] = $pl->tradeno;
|
||||
//return json_encode($result);
|
||||
}
|
||||
public function query($tradeNo)
|
||||
{
|
||||
$data['payjs_order_id'] = $tradeNo;
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
return json_decode($this->post($data, $type = 'query'), true);
|
||||
}
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$data = $_POST;
|
||||
|
||||
if($data['return_code'] == 1){
|
||||
// 验证签名
|
||||
$in_sign = $data['sign'];
|
||||
unset($data['sign']);
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
$sign = strtoupper(md5(urldecode(http_build_query($data) . '&key=' . $this->appSecret)));
|
||||
$resultVerify = $sign ? true : false;
|
||||
|
||||
//$str_to_sign = $this->prepareSign($data);
|
||||
//$resultVerify = $this->verify($str_to_sign, $request->getParam('sign'));
|
||||
|
||||
if ($resultVerify) {
|
||||
// 验重
|
||||
$p = Paylist::where('tradeno', '=', $data['out_trade_no'])->first();
|
||||
$money = $p->total;
|
||||
if ($p->status != 1) {
|
||||
$this->postPayment($data['out_trade_no'], '微信支付');
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
} else {
|
||||
echo 'FAIL2';
|
||||
}
|
||||
} else {
|
||||
echo 'FAIL1';
|
||||
}
|
||||
}
|
||||
public function refund($merchantTradeNo)
|
||||
{
|
||||
$data['payjs_order_id'] = $merchantTradeNo;
|
||||
$params = $this->prepareSign($data);
|
||||
$data['sign'] = $this->sign($params);
|
||||
return $this->post($data, 'refund');
|
||||
}
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$pid = $_GET['merchantTradeNo'];
|
||||
$p = Paylist::where('tradeno', '=', $pid)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status == 1) {
|
||||
$success = 1;
|
||||
} else {
|
||||
$data = $_POST;
|
||||
|
||||
$in_sign = $data['sign'];
|
||||
unset($data['sign']);
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
$sign = strtoupper(md5(urldecode(http_build_query($data) . '&key=' . $this->appSecret)));
|
||||
$resultVerify = $sign ? true : false;
|
||||
|
||||
if ($resultVerify) {
|
||||
$this->postPayment($data['out_trade_no'], '微信支付');
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$return = [];
|
||||
$p = Paylist::where('tradeno', $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
use App\Services\View;
|
||||
use App\Services\MalioConfig;
|
||||
use Exception;
|
||||
use App\Services\Gateway\PayssionClient;
|
||||
|
||||
class Payssion extends AbstractPayment
|
||||
{
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
$user = Auth::getUser();
|
||||
if ($type != 'alipay' and $type != 'unionpay') {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => 'wrong payment.']);
|
||||
}
|
||||
|
||||
if ($type == 'alipay') {
|
||||
$type = 'alipay_cn';
|
||||
} else if ($type == 'unionpay') {
|
||||
$type = 'unionpay_cn';
|
||||
}
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
|
||||
$payssion = new PayssionClient(Config::get('payssion_api_key'), Config::get('payssion_secret_key'));
|
||||
|
||||
|
||||
$payssion_response = null;
|
||||
try {
|
||||
//$type = 'dotpay_pl'; // for test
|
||||
$payssion_response = $payssion->create(array(
|
||||
'amount' => $price,
|
||||
'currency' => 'CNY',
|
||||
'pm_id' => $type,
|
||||
'description' => 'Shadowsocks Product',
|
||||
'order_id' => $pl->tradeno,
|
||||
'return_url' => Config::get('baseUrl').'/user/payment/return' //optional, the return url after payments (for both of paid and non-paid)
|
||||
));
|
||||
} catch (\Exception $e) {
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = "创建订单失败。".$e->getMessage();
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
if ($payssion->isSuccess()) {
|
||||
$todo = $payssion_response['todo'];
|
||||
if ($todo) {
|
||||
$todo_list = explode('|', $todo);
|
||||
if (in_array("redirect", $todo_list)) {
|
||||
$res['ret'] = 1;
|
||||
$res['url'] = $payssion_response['redirect_url'];
|
||||
$res['pid'] = $pl->id;
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
} else {
|
||||
//just in case, should not be here
|
||||
}
|
||||
} else {
|
||||
return json_encode($payssion_response);
|
||||
}
|
||||
|
||||
$res['ret'] = 0;
|
||||
$res['msg'] = "购买失败";
|
||||
return $response->getBody()->write(json_encode($res));
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$api_key=Config::get('payssion_api_key');
|
||||
$pm_id=$request->getParam('pm_id');
|
||||
$amount=$request->getParam('amount');
|
||||
$currency=$request->getParam('currency');
|
||||
$order_id=$request->getParam('order_id');
|
||||
$secret_key=Config::get('payssion_secret_key');
|
||||
$state=$request->getParam('state');
|
||||
$msg = implode('|', array($api_key, $pm_id, $amount, $currency,$order_id,$state, $secret_key));
|
||||
if($request->getParam('notify_sig')!= md5($msg)){
|
||||
return;
|
||||
}
|
||||
$state_code=3;
|
||||
switch ($state) {
|
||||
case 'error':
|
||||
$state_code=2;
|
||||
break;
|
||||
case 'pending':
|
||||
$state_code=3;
|
||||
break;
|
||||
case 'completed':
|
||||
$state_code=4;
|
||||
break;
|
||||
case 'paid_partial':
|
||||
$state_code=5;
|
||||
break;
|
||||
case 'failed':
|
||||
$state_code=6;
|
||||
break;
|
||||
case 'cancelled':
|
||||
$state_code=7;
|
||||
break;
|
||||
case 'expired':
|
||||
$state_code=8;
|
||||
break;
|
||||
case 'refunded':
|
||||
$state_code=9;
|
||||
break;
|
||||
case 'refund_pending':
|
||||
$state_code=10;
|
||||
break;
|
||||
case 'refund_failed':
|
||||
$state_code=11;
|
||||
break;
|
||||
case 'refund_cancelled':
|
||||
$state_code=12;
|
||||
break;
|
||||
case 'chargeback':
|
||||
$state_code=13;
|
||||
break;
|
||||
default:
|
||||
$state_code=14;
|
||||
break;
|
||||
}
|
||||
|
||||
if ($state_code != 4) {
|
||||
return;
|
||||
}
|
||||
|
||||
$type = null;
|
||||
if ($pm_id == 'alipay_cn') {
|
||||
$type = '支付宝支付';
|
||||
} else if ($pm_id == 'unionpay_cn') {
|
||||
$type = '银联支付';
|
||||
}
|
||||
$order = Paylist::where('tradeno', '=', $order_id)->first();
|
||||
if ($order->status != 1) {
|
||||
$this->postPayment($order_id, 'Payssion '.$type);
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$pid = $_GET['order_id'];
|
||||
$p = Paylist::where('tradeno', '=', $pid)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status === 1) {
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,313 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
/**
|
||||
* Client library for Payssion API.
|
||||
*/
|
||||
class PayssionClient
|
||||
{
|
||||
/**
|
||||
* @const string
|
||||
*/
|
||||
const VERSION = '1.3.0.160612';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $api_url;
|
||||
protected $api_key = ''; //your api key
|
||||
protected $secret_key = ''; //your secret key
|
||||
|
||||
protected static $sig_keys = array(
|
||||
'create' => array(
|
||||
'api_key', 'pm_id', 'amount', 'currency', 'order_id', 'secret_key'
|
||||
),
|
||||
'details' => array(
|
||||
'api_key', 'transaction_id', 'order_id', 'secret_key'
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $http_errors = array
|
||||
(
|
||||
400 => '400 Bad Request',
|
||||
401 => '401 Unauthorized',
|
||||
500 => '500 Internal Server Error',
|
||||
501 => '501 Not Implemented',
|
||||
502 => '502 Bad Gateway',
|
||||
503 => '503 Service Unavailable',
|
||||
504 => '504 Gateway Timeout',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $is_success = false;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $allowed_request_methods = array(
|
||||
'get',
|
||||
'put',
|
||||
'post',
|
||||
'delete',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
protected $ssl_verify = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $api_key Payssion App api_key
|
||||
* @param string $secret_key Payssion App secret_key
|
||||
* @param bool $is_livemode false if you use sandbox api_key and true for live mode
|
||||
*/
|
||||
public function __construct($api_key, $secret_key, $is_livemode = true)
|
||||
{
|
||||
$this->api_key = $api_key;
|
||||
$this->secret_key = $secret_key;
|
||||
|
||||
$validate_params = array
|
||||
(
|
||||
false === extension_loaded('curl') => 'The curl extension must be loaded for using this class!',
|
||||
false === extension_loaded('json') => 'The json extension must be loaded for using this class!',
|
||||
empty($this->api_key) => 'api_key is not set!',
|
||||
empty($this->secret_key) => 'secret_key is not set!',
|
||||
);
|
||||
$this->checkForErrors($validate_params);
|
||||
|
||||
$this->setLiveMode($is_livemode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set LiveMode
|
||||
*
|
||||
* @param bool $is_livemode
|
||||
*/
|
||||
public function setLiveMode($is_livemode)
|
||||
{
|
||||
if ($is_livemode) {
|
||||
$this->api_url = 'https://www.payssion.com/api/v1/payment/';
|
||||
} else {
|
||||
$this->api_url = 'http://sandbox.payssion.com/api/v1/payment/';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Api URL
|
||||
*
|
||||
* @param string $url Api URL
|
||||
*/
|
||||
public function setUrl($url)
|
||||
{
|
||||
$this->api_url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets SSL verify
|
||||
*
|
||||
* @param bool $ssl_verify SSL verify
|
||||
*/
|
||||
public function setSSLverify($ssl_verify)
|
||||
{
|
||||
$this->ssl_verify = $ssl_verify;
|
||||
}
|
||||
|
||||
/**
|
||||
* Request state getter
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isSuccess()
|
||||
{
|
||||
return $this->is_success;
|
||||
}
|
||||
|
||||
/**
|
||||
* create payment order
|
||||
*
|
||||
* @param $params create Params
|
||||
* @return array
|
||||
*/
|
||||
public function create(array $params)
|
||||
{
|
||||
return $this->call(
|
||||
'create',
|
||||
'post',
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* get payment details
|
||||
*
|
||||
* @param $params query Params
|
||||
* @return array
|
||||
*/
|
||||
public function getDetails(array $params)
|
||||
{
|
||||
return $this->call(
|
||||
'details',
|
||||
'post',
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method responsible for preparing, setting state and returning answer from rest server
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $request
|
||||
* @param array $params
|
||||
* @return array
|
||||
*/
|
||||
protected function call($method, $request, $params)
|
||||
{
|
||||
$this->is_success = false;
|
||||
|
||||
$validate_params = array
|
||||
(
|
||||
false === is_string($method) => 'Method name must be string',
|
||||
false === $this->checkRequestMethod($request) => 'Not allowed request method type',
|
||||
true === empty($params) => 'params is null',
|
||||
);
|
||||
|
||||
$this->checkForErrors($validate_params);
|
||||
|
||||
$params['api_key'] = $this->api_key;
|
||||
$params['api_sig'] = $this->getSig($params, self::$sig_keys[$method]);
|
||||
|
||||
$response = $this->pushData($method, $request, $params);
|
||||
|
||||
$response = json_decode($response, true);
|
||||
|
||||
if (isset($response['result_code']) && 200 == $response['result_code'])
|
||||
{
|
||||
$this->is_success = true;
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
/**
|
||||
* Checking error mechanism
|
||||
*
|
||||
* @param array $validateArray
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function getSig(array &$params, array $sig_keys)
|
||||
{
|
||||
$msg_array = array();
|
||||
foreach ($sig_keys as $key) {
|
||||
$msg_array[$key] = isset($params[$key]) ? $params[$key] : '';
|
||||
}
|
||||
$msg_array['secret_key'] = $this->secret_key;
|
||||
|
||||
$msg = implode('|', $msg_array);
|
||||
$sig = md5($msg);
|
||||
return $sig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checking error mechanism
|
||||
*
|
||||
* @param array $validateArray
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function checkForErrors(&$validate_params)
|
||||
{
|
||||
foreach ($validate_params as $key => $error)
|
||||
{
|
||||
if ($key)
|
||||
{
|
||||
throw new Exception($error, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if method is allowed
|
||||
*
|
||||
* @param string $method_type
|
||||
* @return bool
|
||||
*/
|
||||
protected function checkRequestMethod($method_type)
|
||||
{
|
||||
$request_method = strtolower($method_type);
|
||||
|
||||
if(in_array($request_method, $this->allowed_request_methods))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method responsible for pushing data to server
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $method_type
|
||||
* @param array|string $vars
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function pushData($method, $method_type, $vars)
|
||||
{
|
||||
$ch = curl_init();
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $this->api_url. $method);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
|
||||
if (is_array($vars)) $vars = http_build_query($vars, '', '&');
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $vars);
|
||||
|
||||
curl_setopt($ch, CURLOPT_HEADER, false);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $this->getHeaders());
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->ssl_verify);
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
|
||||
if (isset($this->http_errors[$code]))
|
||||
{
|
||||
throw new Exception('Response Http Error - ' . $this->http_errors[$code], $code);
|
||||
}
|
||||
|
||||
$code = curl_errno($ch);
|
||||
if (0 < $code)
|
||||
{
|
||||
throw new Exception('Unable to connect to ' . $this->api_url . ' Error: ' . "$code :". curl_error($ch), $code);
|
||||
}
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
protected function &getHeaders() {
|
||||
$langVersion = phpversion();
|
||||
$uname = php_uname();
|
||||
$ua = array(
|
||||
'version' => self::VERSION,
|
||||
'lang' => 'php',
|
||||
'lang_version' => $langVersion,
|
||||
'publisher' => 'payssion',
|
||||
'uname' => $uname,
|
||||
);
|
||||
$headers = array(
|
||||
'X-Payssion-Client-User-Agent: ' . json_encode($ua),
|
||||
"User-Agent: Payssion/php/$langVersion/" . self::VERSION,
|
||||
'Content-Type: application/x-www-form-urlencoded',
|
||||
);
|
||||
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
use App\Services\View;
|
||||
use App\Services\MalioConfig;
|
||||
use Exception;
|
||||
use Stripe\Stripe;
|
||||
use Stripe\Charge;
|
||||
use Stripe\Source;
|
||||
|
||||
class StripePay extends AbstractPayment
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
Stripe::setApiKey(Config::get('stripe_key'));
|
||||
}
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$price = $request->getParam('price');
|
||||
$type = $request->getParam('type');
|
||||
$user = Auth::getUser();
|
||||
if ($type != 'alipay' and $type != 'wechat') {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => 'wrong payment.']);
|
||||
}
|
||||
$stripe_minimum_amount = MalioConfig::get('stripe_minimum_amount');
|
||||
if ($price < $stripe_minimum_amount) {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => '充值最低金额为'.$stripe_minimum_amount.'元']);
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
$url = 'https://api.exchangeratesapi.io/latest?symbols=CNY&base='.strtoupper(MalioConfig::get('stripe_currency'));
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
$currency = json_decode(curl_exec($ch));
|
||||
curl_close($ch);
|
||||
|
||||
$price_exchanged = ((double)$price) / ($currency->rates->CNY);
|
||||
|
||||
$source = Source::create([
|
||||
'amount' => floor($price_exchanged * 100),
|
||||
'currency' => MalioConfig::get('stripe_currency'),
|
||||
'type' => $type,
|
||||
'redirect' => [
|
||||
'return_url' => Config::get('baseUrl') . '/user/payment/return',
|
||||
],
|
||||
]);
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = $source['id'];
|
||||
$pl->save();
|
||||
|
||||
if ($type == 'alipay') {
|
||||
return json_encode(array('url' => $source['redirect']['url'], 'errcode' => 0, 'pid' => $pl->id));
|
||||
} else {
|
||||
return json_encode(array('url' => $source['wechat']['qr_code_url'], 'errcode' => 0, 'pid' => $pl->id));
|
||||
}
|
||||
}
|
||||
|
||||
public function purchase_maliopay($type, $price)
|
||||
{
|
||||
$user = Auth::getUser();
|
||||
if ($type != 'alipay' and $type != 'wechat') {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => 'wrong payment.']);
|
||||
}
|
||||
$stripe_minimum_amount = MalioConfig::get('stripe_minimum_amount');
|
||||
if ($price < $stripe_minimum_amount) {
|
||||
return json_encode(['errcode' => -1, 'errmsg' => '充值最低金额为'.$stripe_minimum_amount.'元']);
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
$url = 'https://api.exchangeratesapi.io/latest?symbols=CNY&base='.strtoupper(MalioConfig::get('stripe_currency'));
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
$currency = json_decode(curl_exec($ch));
|
||||
curl_close($ch);
|
||||
|
||||
$price_exchanged = ((double)$price) / ($currency->rates->CNY);
|
||||
|
||||
$source = Source::create([
|
||||
'amount' => floor($price_exchanged * 100),
|
||||
'currency' => MalioConfig::get('stripe_currency'),
|
||||
'type' => $type,
|
||||
'redirect' => [
|
||||
'return_url' => Config::get('baseUrl') . '/user/payment/return',
|
||||
],
|
||||
]);
|
||||
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = $source['id'];
|
||||
$pl->save();
|
||||
|
||||
if ($type == 'alipay') {
|
||||
return array(
|
||||
'url' => $source['redirect']['url'],
|
||||
'errcode' => 0,
|
||||
'tradeno' => $pl->tradeno
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'url' => $source['wechat']['qr_code_url'],
|
||||
'errcode' => 0,
|
||||
'tradeno' => $pl->tradeno
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$endpoint_secret = Config::get('stripe_webhook_endpoint_secret');
|
||||
$payload = @file_get_contents('php://input');
|
||||
$sig_header = $_SERVER['HTTP_STRIPE_SIGNATURE'];
|
||||
$event = null;
|
||||
|
||||
try {
|
||||
$event = \Stripe\Webhook::constructEvent(
|
||||
$payload,
|
||||
$sig_header,
|
||||
$endpoint_secret
|
||||
);
|
||||
} catch (\UnexpectedValueException $e) {
|
||||
http_response_code(400);
|
||||
exit();
|
||||
} catch (\Stripe\Error\SignatureVerification $e) {
|
||||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
|
||||
switch ($event->type) {
|
||||
case 'source.chargeable':
|
||||
$source = $event->data->object;
|
||||
$charge = Charge::create([
|
||||
'amount' => $source['amount'],
|
||||
'currency' => $source['currency'],
|
||||
'source' => $source['id'],
|
||||
]);
|
||||
if ($charge['status'] == 'succeeded') {
|
||||
$type = null;
|
||||
if ($source['type'] == 'alipay') {
|
||||
$type = '支付宝支付';
|
||||
} else if ($source['type'] == 'wechat') {
|
||||
$type = '微信支付';
|
||||
}
|
||||
$order = Paylist::where('tradeno', '=', $source['id'])->first();
|
||||
if ($order->status != 1) {
|
||||
$this->postPayment($source['id'], 'Stripe '.$type);
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
http_response_code(400);
|
||||
exit();
|
||||
}
|
||||
|
||||
http_response_code(200);
|
||||
}
|
||||
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
$pid = $_GET['source'];
|
||||
$p = Paylist::where('tradeno', '=', $pid)->first();
|
||||
$money = $p->total;
|
||||
if ($p->status === 1) {
|
||||
$success = 1;
|
||||
} else {
|
||||
$success = 0;
|
||||
}
|
||||
return View::getSmarty()->assign('money', $money)->assign('success', $success)->fetch('user/pay_success.tpl');
|
||||
}
|
||||
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
$p = Paylist::where('id', $_POST['pid'])->first();
|
||||
$return['ret'] = 1;
|
||||
$return['result'] = $p->status;
|
||||
return json_encode($return);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,202 @@
|
||||
<?php
|
||||
namespace App\Services\Gateway;
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
class TomatoPay extends AbstractPayment
|
||||
{
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$type = $request->getParam('type');
|
||||
$price = $request->getParam('price');
|
||||
if($price <= 0){
|
||||
return json_encode(['errcode'=>-1,'errmsg'=>"非法的金额."]);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get("tomatopay")[$type];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
|
||||
$fqaccount=$settings['account'];
|
||||
$fqkey=$settings['token'];
|
||||
$fqmchid = $settings['mchid'];
|
||||
$fqtype = 1;
|
||||
$fqtrade = $pl->tradeno;
|
||||
$fqcny = $price;
|
||||
$data = [
|
||||
'account' => $settings['account'],
|
||||
'mchid' => $settings['mchid'],
|
||||
'type' => 1,
|
||||
'trade' => $pl->tradeno,
|
||||
'cny' => $price,
|
||||
];
|
||||
$signs = md5("mchid=".$fqmchid."&account=".$fqaccount."&cny=".$fqcny."&type=1&trade=".$fqtrade.$fqkey);
|
||||
$url="https://b.fanqieui.com/gateways/".$type.".php?account=".$fqaccount."&mchid=".$fqmchid."&type=".$fqtype."&trade=".$fqtrade."&cny=".$fqcny."&signs=".$signs;
|
||||
$result = "<script language='javascript' type='text/javascript'>window.location.href='".$url."';</script>";
|
||||
$result = json_encode(array('code'=>$url,'errcode'=>0,'pid' =>$pl->id));
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function purchase_maliopay($type, $price)
|
||||
{
|
||||
if($price <= 0){
|
||||
return json_encode(['errcode'=>-1,'errmsg'=>"非法的金额."]);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get("tomatopay")[$type];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
|
||||
$fqaccount=$settings['account'];
|
||||
$fqkey=$settings['token'];
|
||||
$fqmchid = $settings['mchid'];
|
||||
$fqtype = 1;
|
||||
$fqtrade = $pl->tradeno;
|
||||
$fqcny = $price;
|
||||
$data = [
|
||||
'account' => $settings['account'],
|
||||
'mchid' => $settings['mchid'],
|
||||
'type' => 1,
|
||||
'trade' => $pl->tradeno,
|
||||
'cny' => $price,
|
||||
];
|
||||
$signs = md5("mchid=".$fqmchid."&account=".$fqaccount."&cny=".$fqcny."&type=1&trade=".$fqtrade.$fqkey);
|
||||
$url="https://b.fanqieui.com/gateways/".$type.".php?account=".$fqaccount."&mchid=".$fqmchid."&type=".$fqtype."&trade=".$fqtrade."&cny=".$fqcny."&signs=".$signs;
|
||||
$result = array('code'=>$url,'errcode'=>0,'tradeno' => $pl->tradeno );
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$type = $args['type'];
|
||||
$settings = Config::get("tomatopay")[$type];
|
||||
$order_data = $_REQUEST;
|
||||
$transid = $order_data['trade_no']; //转账交易号
|
||||
$invoiceid = $order_data['out_trade_no']; //订单号
|
||||
$amount = $order_data['total_fee']; //获取递过来的总价格
|
||||
$status = $order_data['trade_status']; //获取传递过来的交易状态
|
||||
$signs = $order_data['sign'];
|
||||
|
||||
$security = array();
|
||||
$security['out_trade_no'] = $invoiceid;
|
||||
$security['total_fee'] = $amount;
|
||||
$security['trade_no'] = $transid;
|
||||
$security['trade_status'] = $status;
|
||||
foreach ($security as $k=>$v)
|
||||
{
|
||||
$o.= "$k=".urlencode($v)."&";
|
||||
}
|
||||
$sign = md5(substr($o,0,-1).$settings['token']);
|
||||
|
||||
|
||||
if ($sign == $signs) {
|
||||
//验重
|
||||
$p = Paylist::where('tradeno', '=', $order_data['out_trade_no'])->first();
|
||||
$money = $p->total;
|
||||
if ($p->status != 1) {
|
||||
$this->postPayment($order_data['out_trade_no'], "在线支付");
|
||||
echo 'SUCCESS';
|
||||
} else {
|
||||
echo 'ERROR';
|
||||
}
|
||||
echo 'success';
|
||||
if($ispost==0) header("Location: /user/code");
|
||||
|
||||
|
||||
}else{
|
||||
echo '验证失败';
|
||||
}
|
||||
}
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return '
|
||||
<div class="card-inner">
|
||||
<p class="card-heading">充值</p>
|
||||
<h5>支付方式:</h5>
|
||||
<nav class="tab-nav margin-top-no">
|
||||
<ul class="nav nav-list">
|
||||
|
||||
<li>
|
||||
<a class="waves-attach waves-effect type active" data-toggle="tab" data-pay="wxpay">微信支付</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a class="waves-attach waves-effect type" data-toggle="tab" data-pay="alipay">支付宝</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-nav-indicator"></div>
|
||||
</nav>
|
||||
<div class="form-group form-group-label">
|
||||
<label class="floating-label" for="amount">金额</label>
|
||||
<input class="form-control" id="amount" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<div class="card-action-btn pull-left">
|
||||
<button class="btn btn-flat waves-attach" id="code-update" ><span class="icon">check</span> 充值</NOtton>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var type = "wxpay";
|
||||
var type = "alipay";
|
||||
var pid = 0;
|
||||
$(".type").click(function(){
|
||||
type = $(this).data("pay");
|
||||
});
|
||||
$("#code-update").click(function(){
|
||||
var price = parseFloat($("#amount").val());
|
||||
console.log("将要使用"+type+"方法充值"+price+"元")
|
||||
if(isNaN(price)){
|
||||
$("#result").modal();
|
||||
$("#msg").html("非法的金额!");
|
||||
}
|
||||
$.ajax({
|
||||
\'url\':"/user/payment/purchase",
|
||||
\'data\':{
|
||||
\'price\':price,
|
||||
\'type\':type,
|
||||
},
|
||||
\'dataType\':\'json\',
|
||||
\'type\':"POST",
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data.errcode==-1){
|
||||
$("#result").modal();
|
||||
$("#msg").html(data.errmsg);
|
||||
}
|
||||
if(data.errcode==0){
|
||||
pid = data.pid;
|
||||
if(type=="wxpay"){
|
||||
$("#result").modal();
|
||||
$("#msg").html("正在跳转到微信..."+data.code);
|
||||
}else if(type=="alipay"){
|
||||
$("#result").modal();
|
||||
$("#msg").html("正在跳转到支付宝..."+data.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
|
||||
}
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getStatus() method.
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
namespace App\Services\Gateway;
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
|
||||
class Wolfpay extends AbstractPayment {
|
||||
private $pid;
|
||||
private $key;
|
||||
private $url;
|
||||
public function __construct() {
|
||||
$config = Config::get("wolfpay") ['config'];
|
||||
$this->pid = $config['hid'];
|
||||
$this->key = $config['key'];
|
||||
$this->url = $config['url'];
|
||||
}
|
||||
|
||||
public function purchase($request, $response, $args) {
|
||||
return '';
|
||||
}
|
||||
|
||||
public function purchase_maliopay($type, $price) {
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get("wolfpay")['config'];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
|
||||
//支付方式
|
||||
$type = 'all'; //$type;
|
||||
//订单号
|
||||
$out_trade_no = $pl->tradeno;
|
||||
//异步通知地址
|
||||
$notify_url = 'https://' . $_SERVER['HTTP_HOST'] . '/payment/notify/wolfpay/' . $type;
|
||||
//回调通知地址
|
||||
$return_url = 'https://' . $_SERVER['HTTP_HOST'] . '/user/payment/return';
|
||||
//商品名称
|
||||
$name = 'SS商品-' . $_SERVER['HTTP_HOST'];
|
||||
//支付金额(保留小数点后两位)
|
||||
$money = round($price, 2);
|
||||
//站点名称
|
||||
$sitename = $_SERVER['HTTP_HOST'];
|
||||
//发起支付
|
||||
$url = $this->submit($type, $out_trade_no, $notify_url, $return_url, $name, $money, $sitename);
|
||||
|
||||
return array(
|
||||
'url' => $url,
|
||||
'errcode' => 0,
|
||||
'tradeno' => $pl->tradeno
|
||||
);
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args) {
|
||||
return '';
|
||||
}
|
||||
public function getPurchaseHTML() {
|
||||
return '';
|
||||
}
|
||||
public function getReturnHTML($request, $response, $args) {
|
||||
}
|
||||
public function getStatus($request, $response, $args) {
|
||||
// TODO: Implement getStatus() method.
|
||||
|
||||
}
|
||||
|
||||
public function verify($data) {
|
||||
if (!isset($data['sign']) || !$data['sign']) {
|
||||
return false;
|
||||
}
|
||||
$sign = $data['sign'];
|
||||
unset($data['sign']);
|
||||
unset($data['sign_type']);
|
||||
$sign2 = $this->getSign($data, $this->key);
|
||||
if ($sign != $sign2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function submit($type, $out_trade_no, $notify_url, $return_url, $name, $money, $sitename) {
|
||||
$data = ['pid' => $this->pid, 'type' => $type, 'out_trade_no' => $out_trade_no, 'notify_url' => $notify_url, 'return_url' => $return_url, 'name' => $name, 'money' => $money, 'sitename' => $sitename];
|
||||
$string = http_build_query($data);
|
||||
$keys = $this->ensy($string, $this->pid);
|
||||
$keyss = $this->base64url_encode($this->pid . '-' . $keys);
|
||||
$sign = substr($this->ensy($keyss, $this->key) , 0, 15);
|
||||
return 'https://' . $this->url . '/submit?skey=' . $keyss . '&sign=' . $sign . '&sign_type=MD5';
|
||||
}
|
||||
|
||||
private function getSign($data) {
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
$str1 = '';
|
||||
foreach ($data as $k => $v) {
|
||||
$str1.= '&' . $k . "=" . $v;
|
||||
}
|
||||
$str = $str1 . $this->key;
|
||||
$str = trim($str, '&');
|
||||
$sign = md5($str);
|
||||
return $sign;
|
||||
}
|
||||
|
||||
public function ensy($data, $key) {
|
||||
$key = md5($key);
|
||||
$len = strlen($data);
|
||||
$code = '';
|
||||
for ($i = 0; $i < ceil($len / 32); $i++) {
|
||||
for ($j = 0; $j < 32; $j++) {
|
||||
$p = $i * 32 + $j;
|
||||
if ($p < $len) {
|
||||
$code.= $data{$p} ^ $key{$j};
|
||||
}
|
||||
}
|
||||
}
|
||||
$code = str_replace(array(
|
||||
'+',
|
||||
'/',
|
||||
'='
|
||||
) , array(
|
||||
'_',
|
||||
'$',
|
||||
''
|
||||
) , base64_encode($code));
|
||||
return $code;
|
||||
}
|
||||
public function base64url_encode($data) {
|
||||
return rtrim(strtr(base64_encode($data) , '+/', '-_') , '=');
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: Administrator
|
||||
* Date: 2019/10/10
|
||||
* Time: 17:05
|
||||
*/
|
||||
|
||||
namespace App\Services\Gateway;
|
||||
class YftPayConfig{
|
||||
public $pay_config;
|
||||
public function init()
|
||||
{
|
||||
$this->pay_config = [
|
||||
"return_url" => "/user/code",
|
||||
"type" => "aliPay"
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,239 @@
|
||||
<?php
|
||||
namespace App\Services\Gateway;
|
||||
use App\Services\View;
|
||||
use App\Services\Auth;
|
||||
use App\Services\Config;
|
||||
use App\Models\Paylist;
|
||||
|
||||
class Pays
|
||||
{
|
||||
private $pid;
|
||||
private $key;
|
||||
|
||||
public function __construct($pid, $key)
|
||||
{
|
||||
$this->pid = $pid;
|
||||
$this->key = $key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Note 支付发起
|
||||
* @param $type 支付方式
|
||||
* @param $out_trade_no 订单号
|
||||
* @param $notify_url 异步通知地址
|
||||
* @param $return_url 回调通知地址
|
||||
* @param $name 商品名称
|
||||
* @param $money 金额
|
||||
* @param $sitename 站点名称
|
||||
* @return string
|
||||
*/
|
||||
public function submit($type, $out_trade_no, $notify_url, $return_url, $name, $money, $sitename)
|
||||
{
|
||||
$data = [
|
||||
'pid' => $this->pid,
|
||||
'type' => $type,
|
||||
'out_trade_no' => $out_trade_no,
|
||||
'notify_url' => $notify_url,
|
||||
'return_url' => $return_url,
|
||||
'name' => $name,
|
||||
'money' => $money,
|
||||
'sitename' => $sitename
|
||||
];
|
||||
$string = http_build_query($data);
|
||||
$sign = $this->getsign($data);
|
||||
return 'https://api.jxspay.cn/submit/?' . $string . '&sign=' . $sign . '&sign_type=MD5';
|
||||
}
|
||||
|
||||
/**
|
||||
* @Note 验证签名
|
||||
* @param $data 待验证参数
|
||||
* @return bool
|
||||
*/
|
||||
public function verify($data)
|
||||
{
|
||||
if (!isset($data['sign']) || !$data['sign']) {
|
||||
return false;
|
||||
}
|
||||
$sign = $data['sign'];
|
||||
unset($data['sign']);
|
||||
unset($data['sign_type']);
|
||||
$sign2 = $this->getSign($data, $this->key);
|
||||
if ($sign != $sign2) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Note 生成签名
|
||||
* @param $data 参与签名的参数
|
||||
* @return string
|
||||
*/
|
||||
private function getSign($data)
|
||||
{
|
||||
$data = array_filter($data);
|
||||
ksort($data);
|
||||
$str1 = '';
|
||||
foreach ($data as $k => $v) {
|
||||
$str1 .= '&' . $k . "=" . $v;
|
||||
}
|
||||
$str = $str1 . $this->key;
|
||||
$str = trim($str, '&');
|
||||
$sign = md5($str);
|
||||
return $sign;
|
||||
}
|
||||
}
|
||||
class flyfoxpay extends AbstractPayment
|
||||
{
|
||||
|
||||
public function purchase($request, $response, $args)
|
||||
{
|
||||
$type = $request->getParam('type');
|
||||
$price = $request->getParam('price');
|
||||
if($price <= 0){
|
||||
return json_encode(['errcode'=>-1,'errmsg'=>"非法的金额."]);
|
||||
}
|
||||
$user = Auth::getUser();
|
||||
$settings = Config::get("flyfoxpay")['config'];
|
||||
$pl = new Paylist();
|
||||
$pl->userid = $user->id;
|
||||
$pl->total = $price;
|
||||
$pl->tradeno = self::generateGuid();
|
||||
$pl->save();
|
||||
$return='https://'.$_SERVER['HTTP_HOST'].'/flyfoxpay_back/'.$type;
|
||||
$pay = new Pays($settings['hid'], $settings['key']);
|
||||
|
||||
//支付方式
|
||||
$type = 'all';
|
||||
|
||||
//订单号
|
||||
$out_trade_no = $pl->tradeno;
|
||||
|
||||
//异步通知地址
|
||||
$notify_url = $return;
|
||||
|
||||
//回调通知地址
|
||||
$return_url = $return;
|
||||
|
||||
//商品名称
|
||||
$name = 'SS商品-'.$_SERVER['HTTP_HOST'];
|
||||
|
||||
//支付金额(保留小数点后两位)
|
||||
$money = $price;
|
||||
|
||||
//站点名称
|
||||
$sitename = $_SERVER['HTTP_HOST'];
|
||||
|
||||
//发起支付
|
||||
$url = $pay->submit($type, $out_trade_no, $notify_url, $return_url, $name, $money, $sitename);
|
||||
|
||||
$result = "<script language='javascript' type='text/javascript'>window.location.href='".$url."';</script>";
|
||||
$result = json_encode(array('code'=>$url,'errcode'=>0,'pid' =>$pl->id));
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function notify($request, $response, $args)
|
||||
{
|
||||
$type = $args['type'];
|
||||
$settings = Config::get("flyfoxpay")['config'];
|
||||
$security['orderid'] = $_REQUEST['out_trade_no'];
|
||||
if($security['orderid']=='' OR $security['orderid']==null){header("Location: /user/code");}else{
|
||||
//实例化支付类
|
||||
$pay = new Pays($settings['hid'], $settings['key']);
|
||||
|
||||
//接收异步通知数据
|
||||
$data = $_GET;
|
||||
|
||||
//商户订单号
|
||||
$out_trade_no = $data['out_trade_no'];
|
||||
|
||||
//验证签名
|
||||
if ($pay->verify($data)) {
|
||||
//验证支付状态
|
||||
if ($data['trade_status'] == 'TRADE_SUCCESS') {
|
||||
$this->postPayment($data['out_trade_no'], "在线支付");
|
||||
header("Location: /user/code");
|
||||
//这里就可以放心的处理您的业务流程了
|
||||
//您可以通过上面的商户订单号进行业务流程处理
|
||||
}
|
||||
} else {
|
||||
echo '錯誤';
|
||||
}
|
||||
}}
|
||||
public function getPurchaseHTML()
|
||||
{
|
||||
return '
|
||||
<div class="card-inner">
|
||||
<p class="card-heading">充值</p>
|
||||
<h5>支付方式:</h5>
|
||||
<nav class="tab-nav margin-top-no">
|
||||
<ul class="nav nav-list">
|
||||
|
||||
<li>
|
||||
<a class="waves-attach waves-effect type active" data-toggle="tab" data-pay="wxpay">聚合支付</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-nav-indicator"></div>
|
||||
</nav>
|
||||
<div class="form-group form-group-label">
|
||||
<label class="floating-label" for="amount">金额</label>
|
||||
<input class="form-control" id="amount" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<div class="card-action-btn pull-left">
|
||||
<button class="btn btn-flat waves-attach" id="code-updates" ><span class="icon">check</span> 充值</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var type = "wxpay";
|
||||
var pid = 0;
|
||||
$(".type").click(function(){
|
||||
type = $(this).data("pay");
|
||||
});
|
||||
$("#code-updates").click(function(){
|
||||
var price = parseFloat($("#amount").val());
|
||||
console.log("将要使用"+type+"方法充值"+price+"元")
|
||||
if(isNaN(price)){
|
||||
$("#result").modal();
|
||||
$("#msg").html("非法的金额!");
|
||||
}
|
||||
$.ajax({
|
||||
\'url\':"/user/payment/purchase",
|
||||
\'data\':{
|
||||
\'price\':price,
|
||||
\'type\':type,
|
||||
},
|
||||
\'dataType\':\'json\',
|
||||
\'type\':"POST",
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
if(data.errcode==-1){
|
||||
$("#result").modal();
|
||||
$("#msg").html(data.errmsg);
|
||||
}
|
||||
if(data.errcode==0){
|
||||
pid = data.pid;
|
||||
if(type=="wxpay"){
|
||||
$("#result").modal();
|
||||
$("#msg").html("正在跳转到支付系統..."+data.code);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
';
|
||||
}
|
||||
public function getReturnHTML($request, $response, $args)
|
||||
{
|
||||
|
||||
}
|
||||
public function getStatus($request, $response, $args)
|
||||
{
|
||||
// TODO: Implement getStatus() method.
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Utils\Cookie;
|
||||
|
||||
class Internationalization
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->lang = MalioConfig::get('default_lang');
|
||||
}
|
||||
|
||||
public function detectLang($request, $response, $args)
|
||||
{
|
||||
$user = Auth::getUser();
|
||||
if ($user->isLogin == true && $user->lang != null) {
|
||||
$lang = $user->lang;
|
||||
} else {
|
||||
$cookie = Cookie::get('lang');
|
||||
if ($cookie != null || $cookie != '') {
|
||||
$lang = $cookie;
|
||||
} else {
|
||||
$accept_language = $request->getHeader('Accept-Language');
|
||||
$accept_language = strtolower($accept_language[0]);
|
||||
$accept_language = explode(";",$accept_language)[0];
|
||||
$accept_language = explode(",",$accept_language)[0];
|
||||
if (strpos($accept_language, 'zh') !== false) {
|
||||
if (strpos($accept_language, 'cn') !== false || strpos($accept_language, 'sg') !== false) {
|
||||
$lang = 'zh-cn';
|
||||
} elseif (strpos($accept_language, 'tw') !== false || strpos($accept_language, 'hk') !== false) {
|
||||
$lang = 'zh-cn';
|
||||
} else {
|
||||
$lang = 'zh-cn';
|
||||
}
|
||||
} else if (strpos($accept_language, 'en') !== false) {
|
||||
$lang = 'en';
|
||||
}
|
||||
|
||||
if ($lang == null) {
|
||||
$lang = MalioConfig::get('default_lang');
|
||||
}
|
||||
|
||||
Cookie::set([
|
||||
'lang' => $lang
|
||||
],'1775445251');
|
||||
}
|
||||
}
|
||||
|
||||
$this->lang = $lang;
|
||||
return $lang;
|
||||
}
|
||||
|
||||
public function get($name, $args=null) {
|
||||
global $I18N;
|
||||
if ($args == null){
|
||||
return $I18N[$name][$this->lang];
|
||||
} else {
|
||||
$counter = 1;
|
||||
$text = $I18N[$name][$this->lang];
|
||||
foreach ($args as $arg) {
|
||||
$text = str_replace("$".$counter, $arg, $text);
|
||||
$counter += 1;
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getPublicConfig()
|
||||
{
|
||||
global $I18N;
|
||||
return $I18N;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue