@alipay/ams-checkout 0.0.1704337820-dev.0 → 0.0.1704337820-dev.2

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.
@@ -30,6 +30,7 @@ export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) {
30
30
  productSceneEnum["AUTO_DEBIT"] = "AUTO_DEBIT";
31
31
  productSceneEnum["VAULTING"] = "VAULTING";
32
32
  productSceneEnum["FLASH_BUY"] = "FLASH_BUY";
33
+ productSceneEnum["CARD_APPLE_PAY"] = "CARD_APPLE_PAY";
33
34
  return productSceneEnum;
34
35
  }({});
35
36
  export var paymentMethodCategoryTypeEnum = /*#__PURE__*/function (paymentMethodCategoryTypeEnum) {
@@ -125,6 +126,15 @@ export var errorEnum = /*#__PURE__*/function (errorEnum) {
125
126
  errorEnum["GETSIGNPARAMSERROR"] = "GETSIGNPARAMSERROR";
126
127
  return errorEnum;
127
128
  }({});
129
+
130
+ /**
131
+ * Get App Pay Payment Session Request.
132
+ */
133
+
134
+ /**
135
+ * Get App Pay Payment Session Result.
136
+ */
137
+
128
138
  export var redirectTypeEnum = /*#__PURE__*/function (redirectTypeEnum) {
129
139
  redirectTypeEnum["UNSAFE_BROWSER"] = "UNSAFE_BROWSER";
130
140
  redirectTypeEnum["SAFETY_BROWSER"] = "SAFETY_BROWSER";
@@ -140,6 +150,9 @@ export var eventCodeEnum = /*#__PURE__*/function (eventCodeEnum) {
140
150
  eventCodeEnum["SDK_CREATECOMPONENT_ERROR"] = "SDK_CREATECOMPONENT_ERROR";
141
151
  eventCodeEnum["SDK_CALL_URL_ERROR"] = "SDK_CALL_URL_ERROR";
142
152
  eventCodeEnum["SDK_CALL_URL_SUCCESS"] = "SDK_CALL_URL_SUCCESS";
153
+ eventCodeEnum["SDK_PAYMENT_FINISH"] = "SDK_PAYMENT_FINISH";
154
+ eventCodeEnum["SDK_PAYMENT_FAIL"] = "SDK_PAYMENT_FAIL";
155
+ eventCodeEnum["SDK_PAYMENT_CANCEL"] = "SDK_PAYMENT_CANCEL";
143
156
  return eventCodeEnum;
144
157
  }({});
145
158
  export var RedirectType = /*#__PURE__*/function (RedirectType) {
@@ -48,6 +48,7 @@ export var Logger = /*#__PURE__*/function () {
48
48
  if (this.debug) {
49
49
  console.error(error);
50
50
  }
51
+ this.send();
51
52
  return this;
52
53
  }
53
54
  }, {
@@ -61,6 +62,7 @@ export var Logger = /*#__PURE__*/function () {
61
62
  if (this.debug) {
62
63
  console.log(info);
63
64
  }
65
+ this.send();
64
66
  return this;
65
67
  }
66
68
  }, {
@@ -74,6 +76,7 @@ export var Logger = /*#__PURE__*/function () {
74
76
  if (this.debug) {
75
77
  console.log(rpcData);
76
78
  }
79
+ this.send();
77
80
  return this;
78
81
  }
79
82
  }, {
@@ -14,6 +14,7 @@ export declare const sceneMap: {
14
14
  CASHIER_PAYMENT: string;
15
15
  AUTO_DEBIT: string;
16
16
  VAULTING: string;
17
+ CARD_APPLE_PAY: string;
17
18
  EASYPAY: string;
18
19
  EASY_PAY: string;
19
20
  FLASH_BUY: string;
@@ -24,7 +24,7 @@ export var securityHost = {
24
24
  US: 'https://open-na-global.alipay.com/api/open/risk_client',
25
25
  DE: 'https://open-de-global.alipay.com/api/open/risk_client'
26
26
  };
27
- export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, productSceneEnum.CASHIER_PAYMENT, 'Acquirer'), productSceneEnum.AUTO_DEBIT, 'Acquirer'), productSceneEnum.VAULTING, 'Acquirer'), "EASYPAY", 'EasyPay'), productSceneEnum.EASY_PAY, 'EasyPay'), productSceneEnum.FLASH_BUY, 'OneAccount');
27
+ export var sceneMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, productSceneEnum.CASHIER_PAYMENT, 'Acquirer'), productSceneEnum.AUTO_DEBIT, 'Acquirer'), productSceneEnum.VAULTING, 'Acquirer'), productSceneEnum.CARD_APPLE_PAY, 'Acquirer'), "EASYPAY", 'EasyPay'), productSceneEnum.EASY_PAY, 'EasyPay'), productSceneEnum.FLASH_BUY, 'OneAccount');
28
28
  export var getSecurityHost = function getSecurityHost(region) {
29
29
  return securityHost[region] || securityHost[SecurityRegionEnum.SG];
30
30
  };
@@ -67,7 +67,7 @@ export var Security = /*#__PURE__*/function () {
67
67
  console.log('initToken result tokenResult', JSON.stringify(tokenResult), msg);
68
68
  });
69
69
  } catch (error) {
70
- failCallback && failCallback(JSON.stringify(error));
70
+ failCallback && failCallback(error === null || error === void 0 ? void 0 : error.toString());
71
71
  }
72
72
  }
73
73
  }, {
package/package.json CHANGED
@@ -1 +1,56 @@
1
- {"name":"@alipay/ams-checkout","version":"0.0.1704337820-dev.0","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/eslint-plugin":"latest","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","eslint-plugin-prettier":"latest","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}}
1
+ {
2
+ "name": "@alipay/ams-checkout",
3
+ "version": "0.0.1704337820-dev.2",
4
+ "description": "",
5
+ "author": "",
6
+ "main": "esm/index.js",
7
+ "module": "esm/index.js",
8
+ "typings": "esm/index.d.ts",
9
+ "files": [
10
+ "dist",
11
+ "esm",
12
+ "LEGAL.md",
13
+ "LICENSE",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "father build",
18
+ "ci": "npm run lint",
19
+ "cov": "jest --coverage",
20
+ "format": "prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"",
21
+ "lint": "eslint ./src",
22
+ "test": "jest"
23
+ },
24
+ "dependencies": {
25
+ "axios": "^1.3.4",
26
+ "uuid": "^9.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@babel/core": "^7.20.7",
30
+ "@babel/preset-env": "^7.20.2",
31
+ "@testing-library/jest-dom": "^5.1.1",
32
+ "@testing-library/react": "^9.5.0",
33
+ "@types/jest": "^29.2.4",
34
+ "@types/uuid": "^9.0.0",
35
+ "@typescript-eslint/eslint-plugin": "latest",
36
+ "@typescript-eslint/parser": "^5.60.0",
37
+ "babel-jest": "^29.3.1",
38
+ "babel-loader": "^9.1.0",
39
+ "babel-plugin-import": "^1.13.0",
40
+ "eslint": "^8.36.0",
41
+ "eslint-plugin-prettier": "latest",
42
+ "father": "^4.2.3",
43
+ "jest": "^29.5.0",
44
+ "jest-environment-jsdom": "^29.3.1",
45
+ "prettier": "^2.8.4",
46
+ "prettier-plugin-organize-imports": "^3.2.3",
47
+ "prettier-plugin-packagejson": "^2.4.5",
48
+ "ts-jest": "^29.0.3",
49
+ "ts-node": "^10.9.1",
50
+ "typescript": "^4.9.5"
51
+ },
52
+ "engines": {},
53
+ "publishConfig": {
54
+ "access": "public"
55
+ }
56
+ }