cgserver 13.2.21 → 13.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -177,8 +177,8 @@ class NotificationBody {
177
177
  exports.NotificationBody = NotificationBody;
178
178
  class RequestBody {
179
179
  "receipt-data" = "";
180
- password = "5203c7781e254aac8942290a0a2467ac";
181
- "exclude-old-transactions" = true;
180
+ password = "";
181
+ "exclude-old-transactions" = false;
182
182
  }
183
183
  class AppleTool {
184
184
  _verifyUrl = "https://buy.itunes.apple.com/verifyReceipt";
@@ -199,16 +199,13 @@ class AppleTool {
199
199
  Log_1.gLog.info(msg);
200
200
  Log_1.gLog.info(nb);
201
201
  }
202
- async onVerify(receipt, environment) {
203
- Log_1.gLog.info("begin onVerify============================" + environment);
202
+ async onVerify(receipt, password = undefined, exclude_old_transactions = false) {
204
203
  let url = this._verifyUrl;
205
- // if(environment.toLowerCase()=="sandbox")
206
- // {
207
- // url=this._sandboxVerifyUrl
208
- // }
209
204
  Log_1.gLog.info("url============================" + url);
210
205
  let reqb = new RequestBody();
211
206
  reqb['receipt-data'] = receipt;
207
+ reqb.password = password;
208
+ reqb['exclude-old-transactions'] = exclude_old_transactions;
212
209
  //先验证生产环境
213
210
  var resb = (await HttpTool_1.gHttpTool.post({ url, form: JSON.stringify(reqb) })).body;
214
211
  Log_1.gLog.info("production end onVerify_Res============================status=" + (resb ? resb.status : "null"));
@@ -119,7 +119,7 @@ export declare class AppleTool {
119
119
  protected _verifyUrl: string;
120
120
  protected _sandboxVerifyUrl: string;
121
121
  onNotify(nb: NotificationBody): Promise<void>;
122
- onVerify(receipt: string, environment: string): Promise<ResponseBody>;
122
+ onVerify(receipt: string, password?: any, exclude_old_transactions?: boolean): Promise<ResponseBody>;
123
123
  signature(nickname: string, create_time: number, appBundleID: string, productIdentifier: string, offerIdentifier: string): {
124
124
  keyIdentifier: string;
125
125
  nonce: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cgserver",
3
- "version": "13.2.21",
3
+ "version": "13.2.22",
4
4
  "author": "trojan",
5
5
  "type": "commonjs",
6
6
  "description": "free for all.Websocket or Http",