@alipay/ams-checkout 0.0.1698890614-dev.0 → 0.0.1699585541-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.
- package/dist/umd/ams-checkout.min.js +1 -1
- package/esm/core/instance/index.js +9 -7
- package/esm/plugin/component/cashierApp.d.ts +4 -1
- package/esm/plugin/component/cashierApp.js +4 -1
- package/esm/plugin/component/index.d.ts +3 -1
- package/esm/plugin/component/index.js +167 -93
- package/esm/request/index.d.ts +2 -2
- package/esm/request/index.js +1 -1
- package/esm/service/index.d.ts +3 -9
- package/esm/service/index.js +23 -1
- package/esm/types/index.d.ts +53 -2
- package/esm/types/index.js +6 -0
- package/esm/util/jshield-apdid/apdid-core.umd.min.js +1 -0
- package/esm/util/logger.js +12 -10
- package/esm/util/security.js +1 -1
- package/package.json +1 -1
package/esm/service/index.js
CHANGED
@@ -14,7 +14,6 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
|
|
14
14
|
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE; and
|
15
15
|
* 2. If applicable, the use of the Software is also subject to the terms and conditions of any non-disclosure agreement signed by you and the relevant Ant Group entity.
|
16
16
|
*/
|
17
|
-
|
18
17
|
import { request } from "../request";
|
19
18
|
export function queryPaymentInfo(_x, _x2, _x3) {
|
20
19
|
return _queryPaymentInfo.apply(this, arguments);
|
@@ -38,4 +37,27 @@ function _queryPaymentInfo() {
|
|
38
37
|
}, _callee);
|
39
38
|
}));
|
40
39
|
return _queryPaymentInfo.apply(this, arguments);
|
40
|
+
}
|
41
|
+
export function submitPayInfo(_x4, _x5, _x6) {
|
42
|
+
return _submitPayInfo.apply(this, arguments);
|
43
|
+
}
|
44
|
+
function _submitPayInfo() {
|
45
|
+
_submitPayInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params, options, logger) {
|
46
|
+
var hostSign;
|
47
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
48
|
+
while (1) switch (_context2.prev = _context2.next) {
|
49
|
+
case 0:
|
50
|
+
hostSign = ((params === null || params === void 0 ? void 0 : params.paymentSessionData) || '').split('&&')[1] || '';
|
51
|
+
return _context2.abrupt("return", request(params, _objectSpread(_objectSpread({}, options), {}, {
|
52
|
+
hostSign: hostSign,
|
53
|
+
needEnvInfo: true,
|
54
|
+
'Operation-Type': 'com.ipay.iexpcashier.cashier.submitPayByPaymentSession'
|
55
|
+
}), logger));
|
56
|
+
case 2:
|
57
|
+
case "end":
|
58
|
+
return _context2.stop();
|
59
|
+
}
|
60
|
+
}, _callee2);
|
61
|
+
}));
|
62
|
+
return _submitPayInfo.apply(this, arguments);
|
41
63
|
}
|
package/esm/types/index.d.ts
CHANGED
@@ -104,6 +104,7 @@ export interface IpaymentSessionMetaData {
|
|
104
104
|
paymentMethodInfoView?: any;
|
105
105
|
action?: {
|
106
106
|
autoDebitWithToken: boolean;
|
107
|
+
skipSdkQuery: boolean;
|
107
108
|
};
|
108
109
|
}
|
109
110
|
export declare enum localeEnum {
|
@@ -239,7 +240,7 @@ export declare enum errorEnum {
|
|
239
240
|
SIGNIN = "SIGNIN",
|
240
241
|
GETSIGNPARAMSERROR = "GETSIGNPARAMSERROR"
|
241
242
|
}
|
242
|
-
export interface
|
243
|
+
export interface RequestConfig {
|
243
244
|
env?: string;
|
244
245
|
baseURL?: string;
|
245
246
|
timeout?: number;
|
@@ -251,8 +252,11 @@ export interface IrequestConfig {
|
|
251
252
|
beforerRequest?: () => void;
|
252
253
|
afterRequest?: () => void;
|
253
254
|
needEnvInfo?: boolean;
|
254
|
-
locale?: string;
|
255
255
|
hostSign?: string;
|
256
|
+
appId?: string;
|
257
|
+
sandbox?: boolean;
|
258
|
+
deviceId?: string;
|
259
|
+
locale?: string;
|
256
260
|
envInfo?: Record<string, any>;
|
257
261
|
}
|
258
262
|
export interface CashierSdkActionQueryRequest {
|
@@ -262,6 +266,29 @@ export interface CashierSdkActionQueryRequest {
|
|
262
266
|
notRedirectAfterComplete?: boolean;
|
263
267
|
extParams?: any;
|
264
268
|
}
|
269
|
+
export interface CashierSubmitPayRequest {
|
270
|
+
/**
|
271
|
+
* @description payment method type
|
272
|
+
*/
|
273
|
+
paymentMethodType?: string;
|
274
|
+
/**
|
275
|
+
* @description payment factors
|
276
|
+
*/
|
277
|
+
paymentFactors?: Record<string, string>;
|
278
|
+
/**
|
279
|
+
* @description 需要验证的场景
|
280
|
+
*/
|
281
|
+
verifyFactors?: Record<string, string>;
|
282
|
+
paymentSessionData: string;
|
283
|
+
paymentSessionConfig?: any;
|
284
|
+
}
|
285
|
+
export interface CashierSubmitPayRequest {
|
286
|
+
paymentMethodType?: string;
|
287
|
+
paymentFactors?: Record<string, string>;
|
288
|
+
verifyFactors?: Record<string, string>;
|
289
|
+
paymentSessionData: string;
|
290
|
+
paymentSessionConfig?: any;
|
291
|
+
}
|
265
292
|
export interface CashierSdkActionQueryResult {
|
266
293
|
supportedLanguages?: any[];
|
267
294
|
amountConfirmRequired?: boolean;
|
@@ -279,6 +306,30 @@ export interface CashierSdkActionQueryResult {
|
|
279
306
|
schemeUrl?: string;
|
280
307
|
authUrl?: string;
|
281
308
|
}
|
309
|
+
export declare enum redirectTypeEnum {
|
310
|
+
UNSAFE_BROWSER = "UNSAFE_BROWSER",
|
311
|
+
SAFETY_BROWSER = "SAFETY_BROWSER",
|
312
|
+
INVOKE_SDK = "INVOKE_SDK"
|
313
|
+
}
|
314
|
+
export interface ActionForm {
|
315
|
+
parameters: any;
|
316
|
+
redirectUrl: any;
|
317
|
+
elementValue?: string;
|
318
|
+
redirectType?: redirectTypeEnum;
|
319
|
+
}
|
320
|
+
export interface CashierSubmitPayResult {
|
321
|
+
success: boolean;
|
322
|
+
resultCode?: string;
|
323
|
+
resultMessage?: string;
|
324
|
+
errorActions?: Record<string, string>;
|
325
|
+
errorCode?: string;
|
326
|
+
errorMessage?: string;
|
327
|
+
extendInfo?: Record<string, string>;
|
328
|
+
actionForm?: ActionForm;
|
329
|
+
normalUrl?: string;
|
330
|
+
errorStatus?: string;
|
331
|
+
message?: string;
|
332
|
+
}
|
282
333
|
export declare enum eventCodeEnum {
|
283
334
|
SDK_START_OF_LOADING = "SDK_START_OF_LOADING",
|
284
335
|
SDK_END_OF_LOADING = "SDK_END_OF_LOADING",
|
package/esm/types/index.js
CHANGED
@@ -124,6 +124,12 @@ export var errorEnum = /*#__PURE__*/function (errorEnum) {
|
|
124
124
|
errorEnum["GETSIGNPARAMSERROR"] = "GETSIGNPARAMSERROR";
|
125
125
|
return errorEnum;
|
126
126
|
}({});
|
127
|
+
export var redirectTypeEnum = /*#__PURE__*/function (redirectTypeEnum) {
|
128
|
+
redirectTypeEnum["UNSAFE_BROWSER"] = "UNSAFE_BROWSER";
|
129
|
+
redirectTypeEnum["SAFETY_BROWSER"] = "SAFETY_BROWSER";
|
130
|
+
redirectTypeEnum["INVOKE_SDK"] = "INVOKE_SDK";
|
131
|
+
return redirectTypeEnum;
|
132
|
+
}({}); // 拉SDK
|
127
133
|
export var eventCodeEnum = /*#__PURE__*/function (eventCodeEnum) {
|
128
134
|
eventCodeEnum["SDK_START_OF_LOADING"] = "SDK_START_OF_LOADING";
|
129
135
|
eventCodeEnum["SDK_END_OF_LOADING"] = "SDK_END_OF_LOADING";
|