forked from ihaoljy/Rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Photon.js
45 lines (33 loc) · 1.42 KB
/
Photon.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*************************************
项目名称:Photon Camera
软件版本:1.2
下载地址:https://is.gd/DjgwjG
使用声明:⚠️仅供参考,🈲️转载与售卖!
**************************************
[rewrite_local]
^https?:\/\/api\.revenuecat\.com\/v1\/(subscribers\/[^\/]+$|receipts$) url script-response-body https://raw.githubusercontent.com/Yu9191/Rewrite/main/Photon.js
[mitm]
hostname = api.revenuecat.com
************************************/
const anni = {};
const anni1 = JSON.parse(typeof $response != "undefined" && $response.body || null);
if (typeof $response == "undefined") {
delete $request.headers["x-revenuecat-etag"];
delete $request.headers["X-RevenueCat-ETag"];
anni.headers = $request.headers;
} else if (anni1 && anni1.subscriber) {
anni1.subscriber.subscriptions = anni1.subscriber.subscriptions || {};
anni1.subscriber.entitlements = anni1.subscriber.entitlements || {};
const data = {
"expires_date": "2099-12-31T12:00:00Z",
"original_purchase_date": "2022-11-18T03:57:16Z",
"purchase_date": "2022-06-15T12:00:00Z",
"ownership_type": "PURCHASED",
"store": "app_store"
};
anni1.subscriber.subscriptions["photon.paid.yearly"] = data;
anni1.subscriber.entitlements["photon.paid"] = JSON.parse(JSON.stringify(data));
anni1.subscriber.entitlements["photon.paid"].product_identifier = "photon.paid.yearly";
anni.body = JSON.stringify(anni1);
}
$done(anni);