@alipay/ams-checkout 2.0.11 → 2.0.13
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/ams-checkout.js +3 -3
- package/dist/ams-checkout.min.js +1 -1
- package/esm/component/popupWindow.style.js +2 -2
- package/esm/foundation/service/container/popup.js +4 -1
- package/esm/modern/index.js +1 -1
- package/esm/plugin/paypal/index.js +2 -2
- package/esm/tsdoc-metadata.json +1 -1
- package/package.json +4 -4
- package/types.d.ts +126 -125
- package/types.untrimmed.d.ts +156 -125
|
@@ -120,8 +120,8 @@ export var createModal = function createModal(_ref2) {
|
|
|
120
120
|
theme = _loadingConfig$theme === void 0 ? 'default' : _loadingConfig$theme,
|
|
121
121
|
_loadingConfig$backgr = loadingConfig.backgroundPrimary,
|
|
122
122
|
backgroundPrimary = _loadingConfig$backgr === void 0 ? '#ffffff' : _loadingConfig$backgr;
|
|
123
|
-
|
|
124
|
-
renderPopupLoading(modal, mode);
|
|
123
|
+
// const mode = getCurrentTheme(theme);
|
|
124
|
+
// renderPopupLoading(modal, mode);
|
|
125
125
|
modal.style.backgroundColor = backgroundPrimary;
|
|
126
126
|
iframe.style.backgroundColor = backgroundPrimary;
|
|
127
127
|
}
|
|
@@ -76,7 +76,10 @@ export var PopupManager = /*#__PURE__*/function () {
|
|
|
76
76
|
styleConfig: {
|
|
77
77
|
backgroundColor: (_data$loadingConfig = data.loadingConfig) === null || _data$loadingConfig === void 0 ? void 0 : _data$loadingConfig.backgroundPrimary
|
|
78
78
|
},
|
|
79
|
-
|
|
79
|
+
// 修复前
|
|
80
|
+
// loadingConfig: undefined,
|
|
81
|
+
// 修复后
|
|
82
|
+
loadingConfig: data.loadingConfig,
|
|
80
83
|
showCloseOnLoading: data.showCloseOnLoading,
|
|
81
84
|
onCloseOnLoading: data.onCloseOnLoading,
|
|
82
85
|
textDirection: data === null || data === void 0 ? void 0 : data.textDirection
|
package/esm/modern/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { createLoader } from '@antglobal/create-sdk-loader';
|
|
|
15
15
|
|
|
16
16
|
import { stageName } from "./stageName";
|
|
17
17
|
var SDKURL = {
|
|
18
|
-
DEV: "https://sdk-dev.marmot-cloud.com/package/ams-checkout/".concat("2.0.
|
|
18
|
+
DEV: "https://sdk-dev.marmot-cloud.com/package/ams-checkout/".concat("2.0.13", "/ams-checkout.js"),
|
|
19
19
|
LOCAL: "http://localhost:3000/ams-checkout.min.js",
|
|
20
20
|
PROD: 'https://js.antom.com/v2/ams-checkout.js'
|
|
21
21
|
};
|
|
@@ -108,7 +108,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
|
108
108
|
var _paypalPluginProps$pa3, _paypalPluginProps$pa4, _paypalPluginProps$pa5, _paypalPluginProps$pa6;
|
|
109
109
|
var channelMerchantAccountId = (_paypalPluginProps$pa3 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa3 === void 0 || (_paypalPluginProps$pa3 = _paypalPluginProps$pa3.merchantInfo) === null || _paypalPluginProps$pa3 === void 0 ? void 0 : _paypalPluginProps$pa3.channelMerchantClientId;
|
|
110
110
|
var accessToken = (_paypalPluginProps$pa4 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa4 === void 0 || (_paypalPluginProps$pa4 = _paypalPluginProps$pa4.paypal) === null || _paypalPluginProps$pa4 === void 0 ? void 0 : _paypalPluginProps$pa4.accessToken;
|
|
111
|
-
var locale = paypalPluginProps.locale;
|
|
111
|
+
var locale = paypalPluginProps.locale || 'en_US';
|
|
112
112
|
var currency = (_paypalPluginProps$pa5 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa5 === void 0 || (_paypalPluginProps$pa5 = _paypalPluginProps$pa5.paymentAmount) === null || _paypalPluginProps$pa5 === void 0 ? void 0 : _paypalPluginProps$pa5.currency;
|
|
113
113
|
var paymentMethodType = (_paypalPluginProps$pa6 = paypalPluginProps.paymentSessionFactor) === null || _paypalPluginProps$pa6 === void 0 || (_paypalPluginProps$pa6 = _paypalPluginProps$pa6.paymentMethodInfo) === null || _paypalPluginProps$pa6 === void 0 ? void 0 : _paypalPluginProps$pa6.paymentMethodType;
|
|
114
114
|
var _ref2 = (paypalPluginProps === null || paypalPluginProps === void 0 ? void 0 : paypalPluginProps.paypalConfiguration) || {},
|
|
@@ -198,7 +198,7 @@ export var PaypalBusSubscriber = /*#__PURE__*/function (_BusSubscriber) {
|
|
|
198
198
|
});
|
|
199
199
|
_this.onEventCallback({
|
|
200
200
|
code: eventCodeEnum.SDK_PAYMENT_FAIL,
|
|
201
|
-
message: 'Create order failed.'
|
|
201
|
+
message: (queryPaymentInfoRes === null || queryPaymentInfoRes === void 0 ? void 0 : queryPaymentInfoRes.errorMessage) || 'Create order failed.'
|
|
202
202
|
});
|
|
203
203
|
return _context2.abrupt("return");
|
|
204
204
|
case 7:
|
package/esm/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alipay/ams-checkout",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
-
"import": "./esm/index.js",
|
|
9
8
|
"types": "./esm/index.d.ts",
|
|
9
|
+
"import": "./esm/index.js",
|
|
10
10
|
"require": "./ams-checkout.js"
|
|
11
11
|
},
|
|
12
12
|
"./types": "./types.d.ts",
|
|
13
13
|
"./antom": "./antom.d.ts",
|
|
14
14
|
"./react-js": {
|
|
15
|
-
"import": "./react-js.js",
|
|
16
15
|
"types": "./react-js.d.ts",
|
|
16
|
+
"import": "./react-js.js",
|
|
17
17
|
"require": "./react-js.cjs"
|
|
18
18
|
},
|
|
19
19
|
"./interface": "./types.untrimmed.d.ts"
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"resourceClass": "L",
|
|
129
129
|
"type": "aci"
|
|
130
130
|
},
|
|
131
|
-
"marmotId": "
|
|
131
|
+
"marmotId": "180020050100010657"
|
|
132
132
|
}
|
package/types.d.ts
CHANGED
|
@@ -368,19 +368,6 @@ declare interface ApplePayProps {
|
|
|
368
368
|
paymentRequest?: ApplePaymentModel;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
/**
|
|
372
|
-
* @public
|
|
373
|
-
* @description onApprove callback parameter
|
|
374
|
-
*/
|
|
375
|
-
export declare interface ApproveData {
|
|
376
|
-
/** Payment method identifier */
|
|
377
|
-
paymentMethod: string;
|
|
378
|
-
/** Raw data returned by payment method */
|
|
379
|
-
data?: Record<string, any>;
|
|
380
|
-
/** Shipping address (if collectShippingAddress is true) */
|
|
381
|
-
shippingAddress?: Record<string, any>;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
371
|
/**
|
|
385
372
|
* @description googlePay risk check
|
|
386
373
|
*/
|
|
@@ -595,11 +582,7 @@ declare type AxiosHeaderMatcher =
|
|
|
595
582
|
| RegExp
|
|
596
583
|
| ((this: AxiosHeaders, value: string, name: string) => boolean);
|
|
597
584
|
|
|
598
|
-
declare type AxiosHeaderParser = (
|
|
599
|
-
this: AxiosHeaders,
|
|
600
|
-
value: AxiosHeaderValue,
|
|
601
|
-
header: string,
|
|
602
|
-
) => any;
|
|
585
|
+
declare type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any;
|
|
603
586
|
|
|
604
587
|
declare class AxiosHeaders {
|
|
605
588
|
constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
|
|
@@ -609,12 +592,9 @@ declare class AxiosHeaders {
|
|
|
609
592
|
set(
|
|
610
593
|
headerName?: string,
|
|
611
594
|
value?: AxiosHeaderValue,
|
|
612
|
-
rewrite?: boolean | AxiosHeaderMatcher
|
|
613
|
-
): AxiosHeaders;
|
|
614
|
-
set(
|
|
615
|
-
headers?: RawAxiosHeaders | AxiosHeaders | string,
|
|
616
|
-
rewrite?: boolean,
|
|
595
|
+
rewrite?: boolean | AxiosHeaderMatcher
|
|
617
596
|
): AxiosHeaders;
|
|
597
|
+
set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
|
|
618
598
|
|
|
619
599
|
get(headerName: string, parser: RegExp): RegExpExecArray | null;
|
|
620
600
|
get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue;
|
|
@@ -628,9 +608,7 @@ declare class AxiosHeaders {
|
|
|
628
608
|
normalize(format: boolean): AxiosHeaders;
|
|
629
609
|
|
|
630
610
|
concat(
|
|
631
|
-
...targets: Array<
|
|
632
|
-
AxiosHeaders | RawAxiosHeaders | string | undefined | null
|
|
633
|
-
>
|
|
611
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
634
612
|
): AxiosHeaders;
|
|
635
613
|
|
|
636
614
|
toJSON(asStrings?: boolean): RawAxiosHeaders;
|
|
@@ -640,55 +618,35 @@ declare class AxiosHeaders {
|
|
|
640
618
|
static accessor(header: string | string[]): AxiosHeaders;
|
|
641
619
|
|
|
642
620
|
static concat(
|
|
643
|
-
...targets: Array<
|
|
644
|
-
AxiosHeaders | RawAxiosHeaders | string | undefined | null
|
|
645
|
-
>
|
|
621
|
+
...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
|
|
646
622
|
): AxiosHeaders;
|
|
647
623
|
|
|
648
|
-
setContentType(
|
|
649
|
-
value: ContentType,
|
|
650
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
651
|
-
): AxiosHeaders;
|
|
624
|
+
setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
652
625
|
getContentType(parser?: RegExp): RegExpExecArray | null;
|
|
653
626
|
getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
654
627
|
hasContentType(matcher?: AxiosHeaderMatcher): boolean;
|
|
655
628
|
|
|
656
|
-
setContentLength(
|
|
657
|
-
value: AxiosHeaderValue,
|
|
658
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
659
|
-
): AxiosHeaders;
|
|
629
|
+
setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
660
630
|
getContentLength(parser?: RegExp): RegExpExecArray | null;
|
|
661
631
|
getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
662
632
|
hasContentLength(matcher?: AxiosHeaderMatcher): boolean;
|
|
663
633
|
|
|
664
|
-
setAccept(
|
|
665
|
-
value: AxiosHeaderValue,
|
|
666
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
667
|
-
): AxiosHeaders;
|
|
634
|
+
setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
668
635
|
getAccept(parser?: RegExp): RegExpExecArray | null;
|
|
669
636
|
getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
670
637
|
hasAccept(matcher?: AxiosHeaderMatcher): boolean;
|
|
671
638
|
|
|
672
|
-
setUserAgent(
|
|
673
|
-
value: AxiosHeaderValue,
|
|
674
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
675
|
-
): AxiosHeaders;
|
|
639
|
+
setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
676
640
|
getUserAgent(parser?: RegExp): RegExpExecArray | null;
|
|
677
641
|
getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
678
642
|
hasUserAgent(matcher?: AxiosHeaderMatcher): boolean;
|
|
679
643
|
|
|
680
|
-
setContentEncoding(
|
|
681
|
-
value: AxiosHeaderValue,
|
|
682
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
683
|
-
): AxiosHeaders;
|
|
644
|
+
setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
684
645
|
getContentEncoding(parser?: RegExp): RegExpExecArray | null;
|
|
685
646
|
getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
686
647
|
hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean;
|
|
687
648
|
|
|
688
|
-
setAuthorization(
|
|
689
|
-
value: AxiosHeaderValue,
|
|
690
|
-
rewrite?: boolean | AxiosHeaderMatcher,
|
|
691
|
-
): AxiosHeaders;
|
|
649
|
+
setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
|
|
692
650
|
getAuthorization(parser?: RegExp): RegExpExecArray | null;
|
|
693
651
|
getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue;
|
|
694
652
|
hasAuthorization(matcher?: AxiosHeaderMatcher): boolean;
|
|
@@ -698,13 +656,7 @@ declare class AxiosHeaders {
|
|
|
698
656
|
[Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>;
|
|
699
657
|
}
|
|
700
658
|
|
|
701
|
-
declare type AxiosHeaderValue =
|
|
702
|
-
| AxiosHeaders
|
|
703
|
-
| string
|
|
704
|
-
| string[]
|
|
705
|
-
| number
|
|
706
|
-
| boolean
|
|
707
|
-
| null;
|
|
659
|
+
declare type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
|
|
708
660
|
|
|
709
661
|
declare interface BankInfo {
|
|
710
662
|
/**
|
|
@@ -1545,6 +1497,28 @@ declare interface ChargeInfo {
|
|
|
1545
1497
|
chargeActualAmountView?: PaymentView;
|
|
1546
1498
|
}
|
|
1547
1499
|
|
|
1500
|
+
/** click 事件 resolve 参数 */
|
|
1501
|
+
export declare interface ClickResolveOptions {
|
|
1502
|
+
amount?: {
|
|
1503
|
+
currency: string;
|
|
1504
|
+
value: string;
|
|
1505
|
+
};
|
|
1506
|
+
shippingAddressRequired?: boolean;
|
|
1507
|
+
allowedShippingCountries?: string[];
|
|
1508
|
+
shippingRates?: Array<{
|
|
1509
|
+
id: string;
|
|
1510
|
+
displayName: string;
|
|
1511
|
+
amount: string;
|
|
1512
|
+
}>;
|
|
1513
|
+
lineItems?: Array<{
|
|
1514
|
+
name: string;
|
|
1515
|
+
amount: string;
|
|
1516
|
+
}>;
|
|
1517
|
+
business?: {
|
|
1518
|
+
name: string;
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1548
1522
|
declare interface CodeFormView {
|
|
1549
1523
|
/**
|
|
1550
1524
|
* @description title
|
|
@@ -2157,12 +2131,12 @@ declare interface ConnectFactor {
|
|
|
2157
2131
|
|
|
2158
2132
|
declare type ContentType =
|
|
2159
2133
|
| AxiosHeaderValue
|
|
2160
|
-
|
|
|
2161
|
-
|
|
|
2162
|
-
|
|
|
2163
|
-
|
|
|
2164
|
-
|
|
|
2165
|
-
|
|
|
2134
|
+
| 'text/html'
|
|
2135
|
+
| 'text/plain'
|
|
2136
|
+
| 'multipart/form-data'
|
|
2137
|
+
| 'application/json'
|
|
2138
|
+
| 'application/x-www-form-urlencoded'
|
|
2139
|
+
| 'application/octet-stream';
|
|
2166
2140
|
|
|
2167
2141
|
declare namespace CSS_2 {
|
|
2168
2142
|
export {
|
|
@@ -3219,8 +3193,8 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3219
3193
|
currency: string;
|
|
3220
3194
|
value: string;
|
|
3221
3195
|
};
|
|
3222
|
-
/** PayPal
|
|
3223
|
-
|
|
3196
|
+
/** PayPal 配置 */
|
|
3197
|
+
paypal?: PayPalConfig;
|
|
3224
3198
|
/**
|
|
3225
3199
|
* Button text type (following Stripe Express Checkout Element design)
|
|
3226
3200
|
* Each payment method can independently set the button display text
|
|
@@ -3249,21 +3223,34 @@ export declare interface ExpressAppConfig extends BaseAppearance<AppearanceSetti
|
|
|
3249
3223
|
* @example ['paypal']
|
|
3250
3224
|
*/
|
|
3251
3225
|
paymentMethods?: string[];
|
|
3252
|
-
|
|
3253
|
-
|
|
3226
|
+
/* Excluded from this release type: setupError */
|
|
3227
|
+
/**
|
|
3228
|
+
* Locale for internationalization, passed from entry params (loadAntom), default to en_US
|
|
3229
|
+
*/
|
|
3230
|
+
locale?: string;
|
|
3254
3231
|
}
|
|
3255
3232
|
|
|
3256
|
-
/**
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
*/
|
|
3260
|
-
export declare interface ExpressCancelInfo {
|
|
3261
|
-
/** Payment method identifier */
|
|
3262
|
-
paymentMethod: string;
|
|
3263
|
-
/** Raw data returned by payment method (PayPal SDK return content, fully passed through) */
|
|
3233
|
+
/** cancel 事件负载 */
|
|
3234
|
+
export declare interface ExpressCancelEvent {
|
|
3235
|
+
expressPaymentType: string;
|
|
3264
3236
|
data?: any;
|
|
3265
3237
|
}
|
|
3266
3238
|
|
|
3239
|
+
/** click 事件负载 */
|
|
3240
|
+
export declare interface ExpressClickEvent {
|
|
3241
|
+
expressPaymentType: string;
|
|
3242
|
+
resolve: (options: ClickResolveOptions) => void;
|
|
3243
|
+
}
|
|
3244
|
+
|
|
3245
|
+
/** confirm 事件负载(统一终态,替代 approve) */
|
|
3246
|
+
export declare interface ExpressConfirmData {
|
|
3247
|
+
expressPaymentType: string;
|
|
3248
|
+
paymentData: any;
|
|
3249
|
+
billingDetails?: any;
|
|
3250
|
+
shippingAddress?: any;
|
|
3251
|
+
sessionData?: string;
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3267
3254
|
/**
|
|
3268
3255
|
* @public
|
|
3269
3256
|
* @description Express element - express checkout element, supports PayPal / Apple Pay / Google Pay
|
|
@@ -3302,62 +3289,55 @@ export declare interface ExpressElementConfig extends BaseElementConfig<ExpressA
|
|
|
3302
3289
|
*/
|
|
3303
3290
|
export declare interface ExpressElementEvents extends AntomBridgeEventMap<ExpressAppConfig> {
|
|
3304
3291
|
/**
|
|
3305
|
-
* @description Element ready event
|
|
3292
|
+
* @description Element ready event — 上报可用支付方式
|
|
3306
3293
|
*/
|
|
3307
|
-
ready:
|
|
3294
|
+
ready: {
|
|
3295
|
+
availablePaymentMethods: Record<string, boolean>;
|
|
3296
|
+
};
|
|
3308
3297
|
/**
|
|
3309
|
-
* @description
|
|
3298
|
+
* @description 用户点击按钮 — 商户必须调用 event.resolve() 后 sheet 才弹出
|
|
3299
|
+
* 对 PayPal: resolve 为 no-op(PayPal 自行弹出 popup)
|
|
3310
3300
|
*/
|
|
3311
|
-
|
|
3301
|
+
click: ExpressClickEvent;
|
|
3312
3302
|
/**
|
|
3313
|
-
* @description
|
|
3303
|
+
* @description 统一支付完成事件(替代 approve)
|
|
3304
|
+
* 用户授权完成后触发,通过 expressPaymentType 区分钱包类型
|
|
3314
3305
|
*/
|
|
3315
|
-
|
|
3306
|
+
confirm: ExpressConfirmData;
|
|
3316
3307
|
/**
|
|
3317
|
-
* @description
|
|
3308
|
+
* @description 支付错误事件(扩展基类 ErrorPayload,新增 expressPaymentType)
|
|
3318
3309
|
*/
|
|
3319
|
-
|
|
3310
|
+
error: ErrorPayload & {
|
|
3311
|
+
expressPaymentType: string;
|
|
3312
|
+
};
|
|
3320
3313
|
/**
|
|
3321
|
-
* @description
|
|
3314
|
+
* @description 用户取消支付
|
|
3322
3315
|
*/
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
/**
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
*/
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
/** Payment error callback */
|
|
3349
|
-
onError?: (error: ExpressErrorData) => void;
|
|
3350
|
-
/** User cancelled payment callback */
|
|
3351
|
-
onCancel?: (info: ExpressCancelInfo) => void;
|
|
3352
|
-
}
|
|
3353
|
-
|
|
3354
|
-
/**
|
|
3355
|
-
* @public
|
|
3356
|
-
* @description onReady callback parameter
|
|
3357
|
-
*/
|
|
3358
|
-
export declare interface ExpressReadyInfo {
|
|
3359
|
-
/** List of currently available payment methods */
|
|
3360
|
-
availablePaymentMethods: string[];
|
|
3316
|
+
cancel: ExpressCancelEvent;
|
|
3317
|
+
/**
|
|
3318
|
+
* @description 用户在 sheet 内变更收货地址(AP/GP only,PayPal 不触发)
|
|
3319
|
+
*/
|
|
3320
|
+
shippingaddresschange: {
|
|
3321
|
+
expressPaymentType: string;
|
|
3322
|
+
address: any;
|
|
3323
|
+
resolve: (options: ShippingResolveOptions) => void;
|
|
3324
|
+
reject: (reason: string) => void;
|
|
3325
|
+
};
|
|
3326
|
+
/**
|
|
3327
|
+
* @description 用户在 sheet 内变更配送方式(AP/GP only,PayPal 不触发)
|
|
3328
|
+
*/
|
|
3329
|
+
shippingratechange: {
|
|
3330
|
+
expressPaymentType: string;
|
|
3331
|
+
shippingRate: any;
|
|
3332
|
+
resolve: (options: RateResolveOptions) => void;
|
|
3333
|
+
};
|
|
3334
|
+
/* Excluded from this release type: contentHeightChanged */
|
|
3335
|
+
/* Excluded from this release type: "paypal:createOrder" */
|
|
3336
|
+
/* Excluded from this release type: "paypal:createOrder:reply" */
|
|
3337
|
+
/* Excluded from this release type: "paypal:onShippingAddressChange" */
|
|
3338
|
+
/* Excluded from this release type: "paypal:onShippingAddressChange:reply" */
|
|
3339
|
+
/* Excluded from this release type: "paypal:onShippingOptionsChange" */
|
|
3340
|
+
/* Excluded from this release type: "paypal:onShippingOptionsChange:reply" */
|
|
3361
3341
|
}
|
|
3362
3342
|
|
|
3363
3343
|
declare interface ExpSupportBank {
|
|
@@ -9601,6 +9581,14 @@ declare interface RateInfo {
|
|
|
9601
9581
|
rate?: Rate;
|
|
9602
9582
|
}
|
|
9603
9583
|
|
|
9584
|
+
/** shippingratechange 事件 resolve 参数 */
|
|
9585
|
+
export declare interface RateResolveOptions {
|
|
9586
|
+
lineItems?: Array<{
|
|
9587
|
+
name: string;
|
|
9588
|
+
amount: string;
|
|
9589
|
+
}>;
|
|
9590
|
+
}
|
|
9591
|
+
|
|
9604
9592
|
declare interface RawAxiosHeaders {
|
|
9605
9593
|
[key: string]: AxiosHeaderValue;
|
|
9606
9594
|
}
|
|
@@ -9919,6 +9907,19 @@ declare interface ShippingInfo {
|
|
|
9919
9907
|
deliveryEstimate?: DeliveryEstimate;
|
|
9920
9908
|
}
|
|
9921
9909
|
|
|
9910
|
+
/** shippingaddresschange 事件 resolve 参数 */
|
|
9911
|
+
export declare interface ShippingResolveOptions {
|
|
9912
|
+
shippingRates?: Array<{
|
|
9913
|
+
id: string;
|
|
9914
|
+
displayName: string;
|
|
9915
|
+
amount: string;
|
|
9916
|
+
}>;
|
|
9917
|
+
lineItems?: Array<{
|
|
9918
|
+
name: string;
|
|
9919
|
+
amount: string;
|
|
9920
|
+
}>;
|
|
9921
|
+
}
|
|
9922
|
+
|
|
9922
9923
|
declare type SimpleI18n = {
|
|
9923
9924
|
get(id: GetI18nQueryParam, variable?: Record<string, any>, localeCode?: string): string;
|
|
9924
9925
|
};
|