-
Notifications
You must be signed in to change notification settings - Fork 2
/
revenuecat.js
54 lines (49 loc) · 1.56 KB
/
revenuecat.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
46
47
48
49
50
51
52
53
54
/*
QX: ^https:\/\/api\.revenuecat\.com\/v1\/subscribers\/ url script-response-body revenuecat.js
hostname = api.revenuecat.com
仅限NobyDa Script群组学习交流,严禁外传!
*/
let obj=JSON.parse($response.body);
let url=$request.url;
if(url.endsWith("offerings")||url.endsWith("products")) {
$done({});
} else {
// Noto笔记Lifetime
if (url.indexOf("EE5F4363-50A2-4A57-8172-DA69F76DE2FB")!=-1) {
obj["subscriber"]["entitlements"]["pro"]={
"expires_date": null,
"product_identifier": "com.lkzhao.editor.full.deal",
"purchase_date": "2019-12-01T00:00:00Z"
};
obj["subscriber"]["non_subscriptions"]["com.lkzhao.editor.full.deal"]=[{
"id": "12345qwert",
"is_sandbox": false,
"original_purchase_date": "2019-12-01T00:00:00Z",
"purchase_date": "2019-12-01T00:00:00Z",
"store": "app_store"
}];
}
// Airmail Premium
if (url.indexOf("5647911E-B243-48C9-A25C-29116412A20D")!=-1) {
obj["subscriber"]["entitlements"]={
"Airmail Premium": {
"expires_date": "2099-12-01T00:00:00Z",
"product_identifier": "Airmail_iOS_Yearly",
"purchase_date": "2019-12-01T00:00:00Z"
}
};
obj["subscriber"]["subscriptions"]={
"Airmail_iOS_Yearly": {
"is_sandbox": false,
"period_type": "active",
"billing_issues_detected_at": null,
"unsubscribe_detected_at": null,
"expires_date": "2099-12-01T00:00:00Z",
"original_purchase_date": "2019-10-31T00:00:00Z",
"purchase_date": "2019-10-31T00:00:00Z",
"store": "app_store"
}
};
}
}
$done({body:JSON.stringify(obj)});